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

ip_address output dont work for azurerm_public_ip on 1.1.0 (works on 1.0.1) #771

Closed
KresoDenis opened this issue Jan 29, 2018 · 12 comments
Closed
Labels
Milestone

Comments

@KresoDenis
Copy link

KresoDenis commented Jan 29, 2018

Terraform Version

Terraform v0.11.2

Affected Resource(s)

  • azurerm_public_ip

Terraform Configuration Files

resource "azurerm_public_ip" "frontend" {
  name                         = "frontend"
  location                     = "${var.arm_location}"
  resource_group_name          = "${var.resource_group}"
  public_ip_address_allocation = "static"
}
output "voyager.default_ingress.ip" {
    value = "${azurerm_public_ip.frontend.ip_address}"
}

Debug Output

Panic Output

output.voyager.default_ingress.ip: Resource 'azurerm_public_ip.frontend' does not have attribute 'ip_address' for variable 'azurerm_public_ip.frontend.ip_address'

Expected Behavior

Output the ip_address

Actual Behavior

Cant find ip_address for that resource

Steps to Reproduce

  1. terraform apply

Important Factoids

It works on 1.0.1 azurerm provider, but dont on 1.1.0.
Same Terraform version
looks like terraform show for azurerm_public_ip includes everything but ip_address.

References

@bwerthmann
Copy link

We are seeing the same issue.

@genevieve
Copy link

This seems to be the change that might have broken the assignment for ip_address: b5c71c1#r27187845

It is dependent on the props.DNSSettings instead of just on props.IPAddress.

@nik-shornikov
Copy link

👍 -- the data accessor workaround described here stopgaps this issue for me #310

@genevieve
Copy link

genevieve commented Jan 29, 2018

The data accessor works because that has not changed. It gets the ip from the iaas and can provide properties on it.

The resource for the public ip has changed and it does not set the property for the output to read from.

@TheLinuxNinja
Copy link

I also tested this. It broke all of our resources that reference the ip_address in order to create DNS entries and network security group rules in all of our existing configurations. I've locked the provider version to 1.0.1 until this is fixed.

Version 1.1.0 completely omits the ip_address in the state file, even after doing a refresh. Whoever is doing testing should add this to the regression testing for future versions of this resource.

@tombuildsstuff tombuildsstuff added this to the 1.1.1 milestone Feb 3, 2018
@tombuildsstuff
Copy link
Contributor

👋 hey folks!

Firstly, sorry that this bug made it into this release (and for the delayed response here!)

@genevieve thanks for opening #772 with the fix for this issue, I've taken a look and it looks good to me (so I've merged it).

Whoever is doing testing should add this to the regression testing for future versions of this resource.

@TheLinuxNinja definitely - I've opened #789 which adds this acceptance test (I don't have permissions to push to @genevieve's fork - or I'd have added it to to #772 before merging).

Since #772 has been merged, we'll do a release early next week with this bug fix - for the moment it should be possible to workaround this by either using the Public IP Data Source or by pinning to the previous version of the AzureRM Provider via:

provider "azurerm" {
  version = "1.0.1"
}

As #772 has been merged (and will be released early next week) and there's workarounds for this issue, I'm going to close this issue for the moment - but please feel free to reopen it. Apologies again that this bug slipped through - the acceptance tests added in #789 will ensure this doesn't happen again.

Thanks!

@genevieve
Copy link

Thanks @tombuildsstuff!

@martinbjorgan
Copy link
Contributor

Thanks @genevieve and @tombuildsstuff for this!
Been scratching my head a lot the last couple of days, so really nice we'll get a new release soon! :)

@tombuildsstuff
Copy link
Contributor

@KresoDenis @bwerthmann @genevieve @nik-shornikov @TheLinuxNinja just to let you know that the fix for this has been released in v1.1.1 :)

@genevieve
Copy link

Yay, thank you.

@KresoDenis
Copy link
Author

KresoDenis commented Feb 7, 2018

Thanks. It was really nice to see this fixed so fast. It makes big difference to us.

We made fix on our side. But its always better to have it work on plugin side.

a-palchikov added a commit to gravitational/robotest that referenced this issue Feb 9, 2018
Also, see hashicorp/terraform-provider-azurerm#771.
Update sku/version maps to refer to cloud-init enabled images
@ghost
Copy link

ghost commented Mar 31, 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 31, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

No branches or pull requests

7 participants