From eb08593eae2df58b898b6d1346a26d6ef7ff28ac Mon Sep 17 00:00:00 2001 From: Dalton Hubble Date: Sun, 27 Jan 2019 17:52:35 -0800 Subject: [PATCH] Fix azure provider warning, rename a public_ip field * azurerm_public_ip (used internally) added a field `allocation_method` to replace the field `public_ip_address_allocation` (deprecated) * Require terraform-provider-azurerm v1.21+ * https://github.com/terraform-providers/terraform-provider-azurerm/pull/2576 --- CHANGES.md | 5 +++++ azure/container-linux/kubernetes/controllers.tf | 8 ++++---- azure/container-linux/kubernetes/lb.tf | 16 ++++++++-------- azure/container-linux/kubernetes/require.tf | 2 +- 4 files changed, 18 insertions(+), 13 deletions(-) diff --git a/CHANGES.md b/CHANGES.md index efc9bdb5..eac5c847 100644 --- a/CHANGES.md +++ b/CHANGES.md @@ -14,6 +14,11 @@ Notable changes between versions. * Add `ingress_zone_id` output with the NLB DNS name's Route53 zone for use in alias records ([#380](https://github.com/poseidon/typhoon/pull/380)) +#### Azure + +* Fix azure provider warning, `public_ip` `allocation_method` replaces `public_ip_address_allocation` + * Require `terraform-provider-azurerm` v1.21+ (action required) + #### Addons * Update nginx-ingress from v0.21.0 to v0.22.0 diff --git a/azure/container-linux/kubernetes/controllers.tf b/azure/container-linux/kubernetes/controllers.tf index b929b778..ffa05a1e 100644 --- a/azure/container-linux/kubernetes/controllers.tf +++ b/azure/container-linux/kubernetes/controllers.tf @@ -121,10 +121,10 @@ resource "azurerm_public_ip" "controllers" { count = "${var.controller_count}" resource_group_name = "${azurerm_resource_group.cluster.name}" - name = "${var.cluster_name}-controller-${count.index}" - location = "${azurerm_resource_group.cluster.location}" - sku = "Standard" - public_ip_address_allocation = "static" + name = "${var.cluster_name}-controller-${count.index}" + location = "${azurerm_resource_group.cluster.location}" + sku = "Standard" + allocation_method = "Static" } # Controller Ignition configs diff --git a/azure/container-linux/kubernetes/lb.tf b/azure/container-linux/kubernetes/lb.tf index c15b5906..d010937f 100644 --- a/azure/container-linux/kubernetes/lb.tf +++ b/azure/container-linux/kubernetes/lb.tf @@ -17,20 +17,20 @@ resource "azurerm_dns_a_record" "apiserver" { resource "azurerm_public_ip" "apiserver-ipv4" { resource_group_name = "${azurerm_resource_group.cluster.name}" - name = "${var.cluster_name}-apiserver-ipv4" - location = "${var.region}" - sku = "Standard" - public_ip_address_allocation = "static" + name = "${var.cluster_name}-apiserver-ipv4" + location = "${var.region}" + sku = "Standard" + allocation_method = "Static" } # Static IPv4 address for the ingress frontend resource "azurerm_public_ip" "ingress-ipv4" { resource_group_name = "${azurerm_resource_group.cluster.name}" - name = "${var.cluster_name}-ingress-ipv4" - location = "${var.region}" - sku = "Standard" - public_ip_address_allocation = "static" + name = "${var.cluster_name}-ingress-ipv4" + location = "${var.region}" + sku = "Standard" + allocation_method = "Static" } # Network Load Balancer for apiservers and ingress diff --git a/azure/container-linux/kubernetes/require.tf b/azure/container-linux/kubernetes/require.tf index 5d350636..f85cf7b4 100644 --- a/azure/container-linux/kubernetes/require.tf +++ b/azure/container-linux/kubernetes/require.tf @@ -5,7 +5,7 @@ terraform { } provider "azurerm" { - version = "~> 1.19" + version = "~> 1.21" } provider "local" {