terraform-provider-azurerm icon indicating copy to clipboard operation
terraform-provider-azurerm copied to clipboard

azurerm >= 3.15.0: Error: parsing "/subscriptions/…/resourceGroups/…/providers/Microsoft.ServiceBus/namespaces/…/AuthorizationRules/…": parsing segment "staticAuthorizationRules": expected the segment "AuthorizationRules" to be "authorizationRules"

Open alexs77 opened this issue 1 year ago • 11 comments

Is there an existing issue for this?

  • [X] I have searched the existing issues

Community Note

  • Please vote on this issue by adding a :thumbsup: 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 Version

1.2.5

AzureRM Provider Version

3.15.0

Affected Resource(s)/Data Source(s)

azurerm_servicebus_namespace_authorization_rule

Terraform Configuration Files

resource "azurerm_servicebus_namespace_authorization_rule" "…" {
  name         = local.name
  namespace_id = azurerm_servicebus_namespace.….id

  listen = true
  send   = true
}

Debug Output/Panic Output

Error: parsing "/subscriptions/…/resourceGroups/…/providers/Microsoft.ServiceBus/namespaces/…/AuthorizationRules/…": parsing segment "staticAuthorizationRules": expected the segment "AuthorizationRules" to be "authorizationRules"

  with module.service_bus[0].azurerm_servicebus_namespace_authorization_rule.…,
  on modules/service_bus/service_bus.tf line 13, in resource "azurerm_servicebus_namespace_authorization_rule" "…":
  13: resource "azurerm_servicebus_namespace_authorization_rule" "…" {

Expected Behaviour

No error. Same code works fine with AzureRM provider 3.14.0.

Actual Behaviour

Doesn't work.

Steps to Reproduce

Important Factoids

No response

References

No response

alexs77 avatar Jul 22 '22 09:07 alexs77

Just to make it clear: This is a regression/change from v3.14.0. It worked with 3.14.0.

alexs77 avatar Jul 22 '22 09:07 alexs77

The same issue with v3.15.0 v3.14.0 works well.

vhloba avatar Jul 22 '22 12:07 vhloba

The same issue with v3.15.0 v3.14.0 works well.

That's what I meant :)

  • 3.15.0 -> broken
  • <3.15.0 -> okay

alexs77 avatar Jul 22 '22 12:07 alexs77

We are also encountering the same issue when using v3.15.0 of the provider

enorlando avatar Jul 24 '22 23:07 enorlando

Still present with v3.15.1 of the provider.

alexs77 avatar Jul 26 '22 09:07 alexs77

There was a similar issue with another resource a while back (https://github.com/hashicorp/terraform-provider-azurerm/issues/15549) and it was caused when the SDK was changed. I know the SDK on the Servicebus resources was changed recently so could be related.

biggles007 avatar Jul 27 '22 09:07 biggles007

Error: parsing "/subscriptions/..../resourceGroups/..../providers/Microsoft.ServiceBus/namespaces/.../AuthorizationRules/readwrite": parsing segment "staticAuthorizationRules": expected the segment "AuthorizationRules" to be "authorizationRules" │ │ with azurerm_servicebus_namespace_authorization_rule.msgprocs-readwrite, │ on servicebus.tf line 26, in resource "azurerm_servicebus_namespace_authorization_rule" "msgprocs-readwrite": │ 26: resource "azurerm_servicebus_namespace_authorization_rule" "msgprocs-readwrite" { │ ╵

C:\repo\cloud_infrastructure\projects\platform\c17\UK_South\3.7.msgprocs>terraform version Terraform v1.2.1 on windows_amd64

  • provider registry.terraform.io/cloudflare/cloudflare v3.20.0
  • provider registry.terraform.io/hashicorp/azuread v2.26.1
  • provider registry.terraform.io/hashicorp/azurerm v3.16.0

Still occurring on 3.16.0

Marcus-James-Adams avatar Jul 29 '22 09:07 Marcus-James-Adams

Also still occurring on 3.17.0

nomaster avatar Aug 08 '22 06:08 nomaster

Hi all,

Is there a workaround available for this? I attempted to change the version specified in main.tf from >= 2.26.0 to =3.14.0 like so:

terraform {
  required_providers {
    azurerm = {
      source = "hashicorp/azurerm"
      version = "=3.14.0"
    }
  }
}

However my terraform init task in my Azure pipeline still says it's searching for >= 2.26.0 and installs the latest version:

Initializing provider plugins...
Finding hashicorp/azurerm versions matching ">= 2.26.0"...
Installing hashicorp/azurerm v3.17.0...
Installed hashicorp/azurerm v3.17.0 (self-signed, key ID [0m[1m34365D9472D7468F[0m[0m)

Vercidium avatar Aug 14 '22 23:08 Vercidium

However my terraform init task in my Azure pipeline still says it's searching for >= 2.26.0 and installs the latest version:

Try terraform init -upgrade. Despite the name being "upgrade", terraform init will then also happily do a downgrade, when you specify -upgrade.

alexs77 avatar Aug 15 '22 10:08 alexs77

This seems to be fixed with provider version 3.19.0 finally. The changelog doesn't mention a bigfix for this but I assume the update of the Azure SDK fixed it.

Hooray!

wiebeck avatar Aug 19 '22 07:08 wiebeck

Fixed in v3.19.0

tombuildsstuff avatar Oct 11 '22 19:10 tombuildsstuff

This functionality has been released in v3.27.0 of the Terraform Provider. Please see the Terraform documentation on provider versioning or reach out if you need any assistance upgrading.

For further feature requests or bug reports with this functionality, please create a new GitHub issue following the template. Thank you!

github-actions[bot] avatar Oct 14 '22 01:10 github-actions[bot]

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 have found a problem that seems similar to this, please open a new issue and complete the issue template so we can capture all the details necessary to investigate further.

github-actions[bot] avatar Nov 13 '22 02:11 github-actions[bot]