-
Notifications
You must be signed in to change notification settings - Fork 24
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(AZ-1088)!: module v8 structure and updates
BREAKING CHANGES: AzureRM Provider v4+ and OpenTofu 1.8+
- Loading branch information
Showing
13 changed files
with
191 additions
and
212 deletions.
There are no files selected for viewing
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
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,31 @@ | ||
module "azure_region" { | ||
source = "claranet/regions/azurerm" | ||
version = "x.x.x" | ||
|
||
azure_region = var.azure_region | ||
} | ||
|
||
module "rg" { | ||
source = "claranet/rg/azurerm" | ||
version = "x.x.x" | ||
|
||
location = module.azure_region.location | ||
location_short = module.azure_region.location_short | ||
|
||
client_name = var.client_name | ||
environment = var.environment | ||
stack = var.stack | ||
} | ||
module "vnet" { | ||
source = "claranet/vnet/azurerm" | ||
version = "x.x.x" | ||
|
||
environment = var.environment | ||
location = module.azure_region.location | ||
location_short = module.azure_region.location_short | ||
client_name = var.client_name | ||
stack = var.stack | ||
resource_group_name = module.rg.resource_group_name | ||
|
||
vnet_cidr = ["10.0.1.0/24"] | ||
} |
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 |
---|---|---|
@@ -1,36 +1,41 @@ | ||
output "subnet_id" { | ||
output "resource" { | ||
description = "Subnet resource object." | ||
value = azurerm_subnet.main | ||
} | ||
|
||
output "id" { | ||
description = "ID of the created subnet." | ||
value = azurerm_subnet.subnet.id | ||
value = azurerm_subnet.main.id | ||
} | ||
|
||
output "subnet_cidr_list" { | ||
output "cidrs_list" { | ||
description = "CIDR list of the created subnets." | ||
value = azurerm_subnet.subnet.address_prefixes | ||
value = azurerm_subnet.main.address_prefixes | ||
} | ||
|
||
output "subnet_cidrs_map" { | ||
output "cidrs_map" { | ||
description = "Map with names and CIDRs of the created subnets." | ||
value = { | ||
(azurerm_subnet.subnet.name) = azurerm_subnet.subnet.address_prefixes | ||
(azurerm_subnet.main.name) = azurerm_subnet.main.address_prefixes | ||
} | ||
} | ||
|
||
output "subnet_name" { | ||
output "name" { | ||
description = "Name of the created subnet." | ||
value = azurerm_subnet.subnet.name | ||
value = azurerm_subnet.main.name | ||
} | ||
|
||
output "subnet_ips" { | ||
output "ips" { | ||
description = "The collection of IPs within this subnet." | ||
value = var.subnet_cidr_list[*] | ||
} | ||
|
||
output "subnet_nsg_association_id" { | ||
output "nsg_association_id" { | ||
description = "Subnet network security group association ID." | ||
value = one(azurerm_subnet_network_security_group_association.subnet_association[*].id) | ||
} | ||
|
||
output "subnet_rt_association_id" { | ||
output "rt_association_id" { | ||
description = "Subnet route table association ID." | ||
value = one(azurerm_subnet_route_table_association.route_table_association[*].id) | ||
} |
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 @@ | ||
terraform { | ||
required_providers { | ||
azurerm = { | ||
source = "hashicorp/azurerm" | ||
version = "~> 4.0" | ||
} | ||
azurecaf = { | ||
source = "claranet/azurecaf" | ||
version = "~> 1.2.28" | ||
} | ||
} | ||
} |
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
Oops, something went wrong.