Skip to content

Commit

Permalink
Use new azurerm_network_interface_backend_address_pool_association
Browse files Browse the repository at this point in the history
* Require terraform-provider-azurerm v1.17+
* Inline load_balancer_backend_address_pools_ids is deprecated
and scheduled for removal in the v2.0 provider
* hashicorp/terraform-provider-azurerm#2079
  • Loading branch information
dghubble committed Oct 28, 2018
1 parent dbe7604 commit 3bba1ba
Show file tree
Hide file tree
Showing 4 changed files with 11 additions and 6 deletions.
4 changes: 3 additions & 1 deletion CHANGES.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,9 @@ Notable changes between versions.

#### Azure

* Add `primary` field to `ip_configuration`. Required by `terraform-provider-azurerm` v1.17+ ([#331](https://github.com/poseidon/typhoon/pull/331))
* Use new `azurerm_network_interface_backend_address_pool_association` ([#332](https://github.com/poseidon/typhoon/pull/332))
* Require `terraform-provider-azurerm` v1.17+ (action required)
* Add `primary` field to `ip_configuration` needed by v1.17+ ([#331](https://github.com/poseidon/typhoon/pull/331))

#### Addons

Expand Down
10 changes: 7 additions & 3 deletions azure/container-linux/kubernetes/controllers.tf
Original file line number Diff line number Diff line change
Expand Up @@ -105,12 +105,16 @@ resource "azurerm_network_interface" "controllers" {

# public IPv4
public_ip_address_id = "${element(azurerm_public_ip.controllers.*.id, count.index)}"

# backend address pool to which the NIC should be added
load_balancer_backend_address_pools_ids = ["${azurerm_lb_backend_address_pool.controller.id}"]
}
}

# Add controller NICs to the controller backend address pool
resource "azurerm_network_interface_backend_address_pool_association" "controllers" {
network_interface_id = "${azurerm_network_interface.controllers.id}"
ip_configuration_name = "ip0"
backend_address_pool_id = "${azurerm_lb_backend_address_pool.controller.id}"
}

# Controller public IPv4 addresses
resource "azurerm_public_ip" "controllers" {
count = "${var.controller_count}"
Expand Down
2 changes: 1 addition & 1 deletion azure/container-linux/kubernetes/require.tf
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ terraform {
}

provider "azurerm" {
version = "~> 1.16"
version = "~> 1.17"
}

provider "local" {
Expand Down
1 change: 0 additions & 1 deletion azure/container-linux/kubernetes/workers/ingress.tf

This file was deleted.

0 comments on commit 3bba1ba

Please sign in to comment.