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

azurerm_application_gateway doesn't allow empty backend IP list #8209

Closed
simonbrady opened this issue Aug 23, 2020 · 3 comments · Fixed by #8210
Closed

azurerm_application_gateway doesn't allow empty backend IP list #8209

simonbrady opened this issue Aug 23, 2020 · 3 comments · Fixed by #8210

Comments

@simonbrady
Copy link
Contributor

Community Note

  • Please vote on this issue by adding a 👍 reaction to the original issue to help the community and maintainers prioritize this request
  • Please do not leave "+1" or "me too" comments, they generate extra noise for issue followers and do not help prioritize the request
  • If you are interested in working on this issue or have submitted a pull request, please leave a comment

Terraform (and AzureRM Provider) Version

Terraform v0.13.0
+ provider registry.terraform.io/hashicorp/azurerm v2.24.0

Affected Resource(s)

  • azurerm_application_gateway

Terraform Configuration Files

https://gist.github.com/simonbrady/ac018ec5302c7969a4b5baa08a711a66#file-main-tf

Debug Output

https://gist.github.com/simonbrady/ac018ec5302c7969a4b5baa08a711a66#file-trace-log

Panic Output

n/a

Expected Behavior

Terraform creates an application gateway with an empty backend pool

Actual Behavior

Plan fails with

Error: backend_address_pool.0.ip_addresses: attribute supports 1 item as a minimum, config has 0 declared

Steps to Reproduce

  1. terraform apply

Important Factoids

This breaks a real-world use case, where a customer wants to use the same code to deploy app gateways in Prod and DR but not create any VMs in DR since that's handled by ASR failover. Since ip_addresses is an optional attribute, the workaround is to write

ip_addresses = (var.vm_count > 0 ? azurerm_network_interface.vm[*].private_ip_address : null)

which is an ugly hack.

References

@simonbrady
Copy link
Contributor Author

Fix in #8210

@tombuildsstuff tombuildsstuff added this to the v2.25.0 milestone Aug 24, 2020
tombuildsstuff added a commit that referenced this issue Aug 24, 2020
…ackend

Allow empty ip_addresses list for azurerm_application_gateway (#8209)
@ghost
Copy link

ghost commented Aug 27, 2020

This has been released in version 2.25.0 of the provider. Please see the Terraform documentation on provider versioning or reach out if you need any assistance upgrading. As an example:

provider "azurerm" {
    version = "~> 2.25.0"
}
# ... other configuration ...

@ghost
Copy link

ghost commented Sep 23, 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 👉 [email protected]. Thanks!

@ghost ghost locked and limited conversation to collaborators Sep 23, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants