Skip to content

Commit 9a28f71

Browse files
committed
Update Terraform configuration for subnet address prefixes and streamline init command
1 parent af3452f commit 9a28f71

File tree

2 files changed

+15
-15
lines changed

2 files changed

+15
-15
lines changed

.github/workflows/terraform.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ jobs:
3434
RESOURCE_GROUP: ${{ secrets.RESOURCE_GROUP }}
3535
STORAGE_ACCOUNT: ${{ secrets.STORAGE_ACCOUNT }}
3636
CONTAINER_NAME: ${{ secrets.CONTAINER_NAME }}
37-
run: terraform init -upgrade -backend-config="storage_account_name=$STORAGE_ACCOUNT" -backend-config="container_name=$CONTAINER_NAME" -backend-config="resource_group_name=$RESOURCE_GROUP"
37+
run: terraform init -backend-config="storage_account_name=$STORAGE_ACCOUNT" -backend-config="container_name=$CONTAINER_NAME" -backend-config="resource_group_name=$RESOURCE_GROUP"
3838

3939
- name: Terraform Plan
4040
id: plan

main/main.tf

+14-14
Original file line numberDiff line numberDiff line change
@@ -22,43 +22,43 @@ resource "azurerm_virtual_network" "example" {
2222
#dns_servers = ["10.0.0.4", "10.0.0.5"]
2323

2424
subnet {
25-
name = "fw-subnet"
26-
address_prefix = "10.0.1.0/24"
25+
name = "fw-subnet"
26+
address_prefixes = ["10.0.1.0/24"]
2727
}
2828

2929
subnet {
30-
name = "gw-subnet"
31-
address_prefix = "10.0.2.0/24"
30+
name = "gw-subnet"
31+
address_prefixes = ["10.0.2.0/24"]
3232
#security_group = azurerm_network_security_group.example.id
3333
}
3434

3535
subnet {
36-
name = "vm-subnet"
37-
address_prefix = "10.0.3.0/24"
36+
name = "vm-subnet"
37+
address_prefixes = ["10.0.3.0/24"]
3838
#security_group = azurerm_network_security_group.example.id
3939
}
4040

4141
subnet {
42-
name = "pe-subnet"
43-
address_prefix = "10.0.4.0/24"
42+
name = "pe-subnet"
43+
address_prefixes = ["10.0.4.0/24"]
4444
#security_group = azurerm_network_security_group.example.id
4545
}
4646

4747
subnet {
48-
name = "app-subnet"
49-
address_prefix = "10.0.5.0/24"
48+
name = "app-subnet"
49+
address_prefixes = ["10.0.5.0/24"]
5050
#security_group = azurerm_network_security_group.example.id
5151
}
5252

5353
subnet {
54-
name = "db-subnet"
55-
address_prefix = "10.0.6.0/24"
54+
name = "db-subnet"
55+
address_prefixes = ["10.0.6.0/24"]
5656
#security_group = azurerm_network_security_group.example.id
5757
}
5858

5959
subnet {
60-
name = "waf-subnet"
61-
address_prefix = "10.0.7.0/24"
60+
name = "waf-subnet"
61+
address_prefixes = ["10.0.7.0/24"]
6262
#security_group = azurerm_network_security_group.example.id
6363
}
6464

0 commit comments

Comments
 (0)