-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* Terraform Resourcegroups * Resourcegroups * updates * Rename files * updates --------- Co-authored-by: Automatic Update <[email protected]>
- Loading branch information
Showing
30 changed files
with
247 additions
and
27 deletions.
There are no files selected for viewing
11 changes: 11 additions & 0 deletions
11
terraform/subscriptions/modules/network_publicipprefix/main.tf
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
data "azurerm_resource_group" "resourcegroup" { | ||
name = var.resource_group_name | ||
} | ||
|
||
resource "azurerm_public_ip_prefix" "publicipprefix" { | ||
name = var.publicipprefixname | ||
location = var.location | ||
resource_group_name = var.resource_group_name | ||
prefix_length = 30 | ||
zones = var.zones | ||
} |
4 changes: 4 additions & 0 deletions
4
terraform/subscriptions/modules/network_publicipprefix/output.tf
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
output "data" { | ||
description = "publicipprefix" | ||
value = azurerm_public_ip_prefix.publicipprefix | ||
} |
20 changes: 20 additions & 0 deletions
20
terraform/subscriptions/modules/network_publicipprefix/variables.tf
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
variable "resource_group_name" { | ||
description = "The name of the resource group in which to create the Public IP Prefix" | ||
type = string | ||
} | ||
|
||
variable "publicipprefixname" { | ||
description = "Specifies the name of the Public IP Prefix resource" | ||
type = string | ||
} | ||
|
||
variable "location" { | ||
description = "Specifies the supported Azure location where the resource exists." | ||
type = string | ||
} | ||
|
||
variable "zones" { | ||
description = "Specifies a list of Availability Zones in which this Public IP Prefix should be located." | ||
type = list(string) | ||
default = [] | ||
} |
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
output "data" { | ||
description = "Networkmanager connectivity" | ||
value = azurerm_network_manager_connectivity_configuration.config | ||
} |
File renamed without changes.
30 changes: 30 additions & 0 deletions
30
terraform/subscriptions/modules/networksecuritygroup/main.tf
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
resource "azurerm_network_security_group" "networksecuritygroup" { | ||
name = var.networksecuritygroupname | ||
location = var.location | ||
resource_group_name = var.resource_group_name | ||
|
||
security_rule = [ | ||
{ | ||
access = "Allow" | ||
description = "" | ||
destination_address_prefix = var.destination_address_prefix | ||
destination_address_prefixes = [] | ||
destination_application_security_group_ids = [] | ||
destination_port_range = "" | ||
destination_port_ranges = [ | ||
"443", | ||
"80", | ||
] | ||
direction = "Inbound" | ||
name = "${var.networksecuritygroupname}-rule" | ||
priority = 100 | ||
protocol = "Tcp" | ||
source_address_prefix = "*" | ||
source_address_prefixes = [] | ||
source_application_security_group_ids = [] | ||
source_port_range = "*" | ||
source_port_ranges = [] | ||
} | ||
] | ||
|
||
} |
4 changes: 4 additions & 0 deletions
4
terraform/subscriptions/modules/networksecuritygroup/output.tf
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
output "data" { | ||
description = "Networks securitygroup" | ||
value = azurerm_network_security_group.networksecuritygroup | ||
} |
19 changes: 19 additions & 0 deletions
19
terraform/subscriptions/modules/networksecuritygroup/variables.tf
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
variable "resource_group_name" { | ||
description = "The name of the resource group in which to create the network security group" | ||
type = string | ||
} | ||
|
||
variable "location" { | ||
description = "Specifies the supported Azure location where the resource exists" | ||
type = string | ||
} | ||
|
||
variable "networksecuritygroupname" { | ||
description = "Specifies the name of the network security group" | ||
type = string | ||
} | ||
|
||
variable "destination_address_prefix" { | ||
description = "List of destination address prefixes." | ||
type = string | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
output "data" { | ||
description = "Policy Assignment" | ||
value = azurerm_subscription_policy_assignment.assignment | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
resource "azurerm_resource_group" "resourcegroup" { | ||
name = var.name | ||
location = var.location | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
output "data" { | ||
description = "resourcegroup" | ||
value = azurerm_resource_group.resourcegroup | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
variable "name" { | ||
description = "The Name which should be used for this Resource Group." | ||
type = string | ||
} | ||
|
||
variable "location" { | ||
description = "The Azure Region where the Resource Group should exist." | ||
type = string | ||
} |
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
locals { | ||
|
||
flattened_clusters = { | ||
for key, value in var.clusters : key => { | ||
name = key | ||
resource_group_name = value.resource_group_name | ||
} | ||
} | ||
|
||
} | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
module "nsg" { | ||
|
||
source = "../../../modules/networksecuritygroup" | ||
networksecuritygroupname = "nsg-weekly-50" | ||
location = local.output.location | ||
resource_group_name = local.output.resource_group | ||
destination_address_prefix = "20.223.40.151" | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
variable "clusters" { | ||
type = map(object({ | ||
resource_group_name = optional(string, "clusters") | ||
#destination_address_prefix = string | ||
})) | ||
default = { | ||
weekly-50 = { | ||
destination_address_prefix = "20.223.40.151" | ||
} | ||
# , | ||
# weekly-51 = {} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,10 +1,9 @@ | ||
locals { | ||
outputs = { | ||
# subscription_id = "16ede44b-1f74-40a5-b428-46cca9a5741b" | ||
# tenant_id = "3aa4a235-b6e2-48d5-9195-7fcf05b459b0" | ||
location = "northeurope" | ||
#subscription_shortname = "s941" | ||
resource_group = "common" | ||
resource_group = "common" | ||
cluster_type = "development" | ||
} | ||
|
||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
13 changes: 13 additions & 0 deletions
13
terraform/subscriptions/s941/dev/networkmanager/variables.tf
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
variable "publicipprefix" { | ||
type = map(object({ | ||
zones = optional(list(string)) | ||
|
||
})) | ||
default = { | ||
ingress-radix = { | ||
zones = ["1", "2", "3"] | ||
}, | ||
radix = { | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
locals { | ||
gh_repos = { | ||
"radix-canary" : ["release", "master"] | ||
} | ||
|
||
flattened_resource_groups = { | ||
for key, value in var.resource_groups : key => { | ||
name = key | ||
location = value.location | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
module "resourcegroups" { | ||
for_each = local.flattened_resource_groups | ||
source = "../../modules/resourcegroups" | ||
name = each.value.name | ||
location = each.value.location | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
variable "resource_groups" { | ||
description = "Shared resourcegroups across enviroments." | ||
type = map(object({ | ||
location = optional(string, "northeurope") | ||
})) | ||
default = { | ||
backups = {}, | ||
clusters = {}, | ||
common = {}, | ||
cost-allocation = {}, | ||
Logs-Dev = {}, | ||
vulnerability-scan = {} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,7 @@ | ||
locals { | ||
outputs = { | ||
location = "northeurope" | ||
resource_group = "common" | ||
location = "northeurope" | ||
resource_group = "common" | ||
cluster_type = "playground" | ||
} | ||
} |
7 changes: 7 additions & 0 deletions
7
terraform/subscriptions/s941/playground/networkmanager/inputs.tf
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
13 changes: 13 additions & 0 deletions
13
terraform/subscriptions/s941/playground/networkmanager/variables.tf
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
variable "publicipprefix" { | ||
type = map(object({ | ||
zones = optional(list(string)) | ||
|
||
})) | ||
default = { | ||
ingress-radix = { | ||
zones = ["1", "2", "3"] | ||
}, | ||
radix = { | ||
} | ||
} | ||
} |