Skip to content

Commit

Permalink
Prepare upgrade to Terraform azurerm v2.x.x
Browse files Browse the repository at this point in the history
Add association resources for routetable-to-subnet and nsg-to-subnet in parallel to internal associations on the subnet resource.
  • Loading branch information
dkistner committed Sep 9, 2020
1 parent c075b96 commit 80ac647
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions charts/internal/azure-infra/templates/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,11 @@ resource "azurerm_route_table" "workers" {
{{- end}}
}

resource "azurerm_subnet_route_table_association" "workers-rt-subnet-association" {
subnet_id = azurerm_subnet.workers.id
route_table_id = azurerm_route_table.workers.id
}

resource "azurerm_network_security_group" "workers" {
name = "{{ required "clusterName is required" .Values.clusterName }}-workers"
location = "{{ required "azure.region is required" .Values.azure.region }}"
Expand All @@ -73,6 +78,11 @@ resource "azurerm_network_security_group" "workers" {
{{- end}}
}

resource "azurerm_subnet_network_security_group_association" "workers-nsg-subnet-association" {
subnet_id = azurerm_subnet.workers.id
network_security_group_id = azurerm_network_security_group.workers.id
}

{{ if .Values.create.natGateway -}}
#===============================================
#= NAT Gateway
Expand Down

0 comments on commit 80ac647

Please sign in to comment.