Skip to content
This repository has been archived by the owner on May 20, 2023. It is now read-only.

Commit

Permalink
Use new Azure subnet to set address_prefixes list
Browse files Browse the repository at this point in the history
* Update Azure subnet `address_prefix` to `azure_prefixes` list
* Fix warning that `address_prefix` is deprecated
* Require `terraform-provider-azurerm` v2.8.0+ (action required)

Rel: hashicorp/terraform-provider-azurerm#6493
  • Loading branch information
dghubble committed May 19, 2020
1 parent c4d89e7 commit 48bb95c
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 7 deletions.
4 changes: 2 additions & 2 deletions controllers.tf
Expand Up @@ -66,9 +66,9 @@ resource "azurerm_linux_virtual_machine" "controllers" {
for_each = local.flavor == "flatcar" ? [1] : []

content {
name = local.channel
name = local.channel
publisher = "kinvolk"
product = "flatcar-container-linux-free"
product = "flatcar-container-linux-free"
}
}

Expand Down
4 changes: 2 additions & 2 deletions network.tf
Expand Up @@ -21,7 +21,7 @@ resource "azurerm_subnet" "controller" {

name = "controller"
virtual_network_name = azurerm_virtual_network.network.name
address_prefix = cidrsubnet(var.host_cidr, 1, 0)
address_prefixes = [cidrsubnet(var.host_cidr, 1, 0)]
}

resource "azurerm_subnet_network_security_group_association" "controller" {
Expand All @@ -34,7 +34,7 @@ resource "azurerm_subnet" "worker" {

name = "worker"
virtual_network_name = azurerm_virtual_network.network.name
address_prefix = cidrsubnet(var.host_cidr, 1, 1)
address_prefixes = [cidrsubnet(var.host_cidr, 1, 1)]
}

resource "azurerm_subnet_network_security_group_association" "worker" {
Expand Down
2 changes: 1 addition & 1 deletion versions.tf
Expand Up @@ -3,7 +3,7 @@
terraform {
required_version = "~> 0.12.6"
required_providers {
azurerm = "~> 2.0"
azurerm = "~> 2.8"
ct = "~> 0.3"
template = "~> 2.1"
null = "~> 2.1"
Expand Down
4 changes: 2 additions & 2 deletions workers/workers.tf
Expand Up @@ -37,9 +37,9 @@ resource "azurerm_linux_virtual_machine_scale_set" "workers" {
for_each = local.flavor == "flatcar" ? [1] : []

content {
name = local.channel
name = local.channel
publisher = "kinvolk"
product = "flatcar-container-linux-free"
product = "flatcar-container-linux-free"
}
}

Expand Down

0 comments on commit 48bb95c

Please sign in to comment.