| 1 |
variable "prefix" { |
| 2 |
default = "go-discover-azure-vmss" |
| 3 |
} |
| 4 |
|
| 5 |
resource "azurerm_resource_group" "test" { |
| 6 |
name = "${var.prefix}-dev" |
| 7 |
location = "West Europe" |
| 8 |
} |
| 9 |
|
| 10 |
module "network" { |
| 11 |
source = "./modules/network" |
| 12 |
name = "${var.prefix}-internalnw" |
| 13 |
resource_group = "${azurerm_resource_group.test.name}" |
| 14 |
location = "${azurerm_resource_group.test.location}" |
| 15 |
address_space = "10.0.0.0/16" |
| 16 |
subnet_cidr = "10.0.1.0/24" |
| 17 |
} |
| 18 |
|
| 19 |
module "vmss" { |
| 20 |
source = "./modules/vmss" |
| 21 |
name = "${var.prefix}-01" |
| 22 |
resource_group = "${azurerm_resource_group.test.name}" |
| 23 |
location = "${azurerm_resource_group.test.location}" |
| 24 |
subnet_id = "${module.network.subnet_id}" |
| 25 |
} |