Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Possible regression on resource azurerm_lb with plugin 1.8 #1470

Closed
jcmaasb opened this issue Jun 30, 2018 · 5 comments · Fixed by #1588 or #1481
Closed

Possible regression on resource azurerm_lb with plugin 1.8 #1470

jcmaasb opened this issue Jun 30, 2018 · 5 comments · Fixed by #1588 or #1481

Comments

@jcmaasb
Copy link

jcmaasb commented Jun 30, 2018

I use this simple code in a module.
With plugin 1.7 it works fine, but with plugin 1.8 it generates this error if you set private_ip_address_allocation to dynamic and leave private_ip_address empty ("").

Error: module.ambari_MN.azurerm_lb.lb_private: "frontend_ip_configuration.0.private_ip_address" is not a valid IP4 address: ""

locals {
  lb_private_ip_address_allocation = "dynamic"
  lb_private_ip_address            = ""
  ...
}

resource "azurerm_lb" "lb_private" {
  count               = "${local.instances}"
  resource_group_name = "${local.rg_name}"
  name                = "lb_${local.name}"
  location            = "${local.location}"
  sku                 = "${local.lb_sku}"

  frontend_ip_configuration {
    name                          = "${local.private_frontend_ip_conf_name}"
    private_ip_address_allocation = "${local.lb_private_ip_address_allocation}"
    private_ip_address            = "${local.lb_private_ip_address}"
    subnet_id                     = "${data.azurerm_subnet.lb_snet.id}"
  }
}

My question is whether this situation is final with the plugin1.8 (and I need to duplicate the code once more) or if it is a regression.

Thanks

@tombuildsstuff
Copy link
Contributor

hey @jcmaasb

Thanks for opening this issue :)

That appears to be a regression in v1.8 of the AzureRM Provider, since it should be possible to set this value to an empty string. We’ll include a fix for this in the next release of the AzureRM provider - apologies for the inconvenience here!

Thanks!

@jcmaasb
Copy link
Author

jcmaasb commented Jul 1, 2018

Thank you very much for your quick reply!

@alambike
Copy link

I think we have similar problem with subnet_id not specified in fronted_ip_configuration using Azurerm loadbalancer module:

$ terraform plan                                                                                                                          1 ↵

Error: module.loadbalancer.azurerm_lb.azlb: Can not parse "frontend_ip_configuration.0.subnet_id" as a resource id: Cannot parse Azure ID: parse 0: invalid URI for request

$ terraform version                                                                                                                       1 ↵
Terraform v0.11.7
+ provider.azurerm v1.9.0

@tombuildsstuff
Copy link
Contributor

@alambike thanks for the heads up - I've opened #1588 which includes a fix for this.

@ghost
Copy link

ghost commented Mar 30, 2020

I'm going to lock this issue because it has been closed for 30 days ⏳. This helps our maintainers find and focus on the active issues.

If you feel this issue should be reopened, we encourage creating a new issue linking back to this one for added context. If you feel I made an error 🤖 🙉 , please reach out to my human friends 👉 hashibot-feedback@hashicorp.com. Thanks!

@ghost ghost locked and limited conversation to collaborators Mar 30, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.