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

Bug Report - AzureRM provider 3.0.0 availability zones error #309

Closed
dan-dimitrov opened this issue Mar 25, 2022 · 6 comments · Fixed by #312 or #345
Closed

Bug Report - AzureRM provider 3.0.0 availability zones error #309

dan-dimitrov opened this issue Mar 25, 2022 · 6 comments · Fixed by #312 or #345
Assignees
Labels
bug Something isn't working PR-merged

Comments

@dan-dimitrov
Copy link

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

Versions

terraform: 0.15.0

azure provider: 3.0.0 and 3.0.1

module: 1.1.2

Description

Describe the bug

Build validation fails with the following message...
image

This seems to be caused by the availability zones update in version 3.0.0 of the Azure RM provider which was released in the last 24 hours (https://www.hashicorp.com/blog/terraform-azurerm-3-0-brings-enhanced-azure-function-support).

Steps to Reproduce

  1. Ensure provider version is not specified (this defaults to the latest 3.0.1).
  2. Execute terraform init.
  3. Execute terraform validate - this will throw the error message above.

Screenshots

Provided aboove.

Additional context

Explicitly specifying provider version 2.99.0 resolves the issue.

@ghost ghost added the Needs: Triage 🔍 Needs triaging by the team label Mar 25, 2022
@dan-dimitrov dan-dimitrov changed the title Bug Report Bug Report - AzureRM Provider 3.0.0 availability zones error Mar 25, 2022
@dan-dimitrov dan-dimitrov changed the title Bug Report - AzureRM Provider 3.0.0 availability zones error Bug Report - AzureRM provider 3.0.0 availability zones error Mar 25, 2022
@krowlandson krowlandson self-assigned this Mar 25, 2022
@ghost ghost removed the Needs: Triage 🔍 Needs triaging by the team label Mar 25, 2022
@krowlandson
Copy link
Contributor

Thank you for reporting this @dan-dimitrov

For now we would recommend setting the required provider version to no greater than version 2.99.0 and we will look at the impact of addressing this for the next release.

@dan-dimitrov
Copy link
Author

For the purpose of matching this to search results. The error message received in plain text is...

│ Error: Unsupported argument
│ 
│   on .terraform/modules/enterprise_scale/resources.connectivity.tf line 122, in resource "azurerm_public_ip" "connectivity":
│  122:   availability_zone       = each.value.template.availability_zone
│ 
│ An argument named "availability_zone" is not expected here.

│ Error: Unsupported argument
│ 
│   on .terraform/modules/enterprise_scale/resources.policy_definitions.tf line 12, in resource "azurerm_policy_definition" "enterprise_scale":
│   12:   management_group_name = try(basename(each.value.scope_id), null)
│ 
│ An argument named "management_group_name" is not expected here.

@krowlandson krowlandson added the bug Something isn't working label Mar 28, 2022
@jtracey93
Copy link
Collaborator

For those wondering how to pin your azurerm provider to 2.99.0 please see: https://registry.terraform.io/providers/hashicorp/azurerm/latest/docs/guides/3.0-upgrade-guide#pinning-your-provider-version

@jtracey93 jtracey93 pinned this issue Mar 28, 2022
@mlomat
Copy link

mlomat commented Mar 28, 2022

Thanks @dan-dimitrov for reporting this... I am fighting with this issue since 2h... All my deployments failed.

@krowlandson krowlandson linked a pull request Mar 29, 2022 that will close this issue
6 tasks
@matt-FFFFFF matt-FFFFFF mentioned this issue Mar 29, 2022
6 tasks
@krowlandson
Copy link
Contributor

Just a quick note for tracking:

  • azurerm_policy_definition was updated in Add VWAN deployment capability #287 and is scheduled for inclusion in release v1.2.0
  • azurerm_public_ip will need additional work, but also requires the minimum supported provider to be increased to v3.0.0 as the zones property wasn't soft deprecated like the others, so we have no overlap

@matt-FFFFFF
Copy link
Member

Please see v2.0.0 release that supports v3.0.2 and above of the provider.

@matt-FFFFFF matt-FFFFFF unpinned this issue Apr 27, 2022
@ghost ghost locked as resolved and limited conversation to collaborators May 27, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug Something isn't working PR-merged
Projects
None yet
5 participants