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

Version 2.20.0 reports an error during plan for BotChannel #7891

Closed
ElliotMatthew opened this issue Jul 24, 2020 · 4 comments · Fixed by #8042
Closed

Version 2.20.0 reports an error during plan for BotChannel #7891

ElliotMatthew opened this issue Jul 24, 2020 · 4 comments · Fixed by #8042

Comments

@ElliotMatthew
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

Terraform (and AzureRM Provider) Version

Affected Resource(s)

  • azurerm_bot_channels_registration

Terraform Configuration Files

# Bot channels registration
resource "azurerm_bot_channels_registration" "cr" {
  # Bot channels registration names must be globally unique across Azure, so use
  # a hashed seed value to generate a name with a high chance of being unique.
  # names must also be at most 42 characters, so trim the result.
  name                = substr("bot-reg-${md5(var.seed_value)}", 0, 42)
  location            = "global"
  resource_group_name = azurerm_resource_group.rg.name
  sku                 = "F0"
  microsoft_app_id    = local.app_reg_id
  endpoint            = "https://${azurerm_app_service.app.default_site_hostname}/api/messages"
}

Debug Output

https://gist.github.com/ElliotMatthew/8f09456ec52d67cefaf4ff3e33fbccf7

Panic Output

Expected Behavior

The resource should be created with the location "global".

Actual Behavior

The resource failed to be configured and the Plan stage fails within gitlab pipeline

Steps to Reproduce

  1. Create a resource containing a BotChannel registration as above (with a global location)
  2. terraform plan -out "planfile.txt"

Important Factoids

References

  • #0000
@oleksiypavlenko
Copy link
Contributor

Looks like related to this issue #7881
Cannot create CDN in "global" region after v2.20.0 upgrade

@neil-yechenwei
Copy link
Contributor

neil-yechenwei commented Jul 27, 2020

Thanks for opening this issue. Terraform introduces an environment variable ARM_PROVIDER_ENHANCED_VALIDATION for improving the location validation and default value is true since 2.20. For your case, if you want to use global location, please set this environment variable as false and try again, then it should be passed. See more details from changelog.

@ghost
Copy link

ghost commented Aug 13, 2020

This has been released in version 2.23.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.23.0"
}
# ... other configuration ...

@ghost
Copy link

ghost commented Sep 6, 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 6, 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.

5 participants