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

CDN Profile in Global region not compatible with AzureRM v2.20.0 #7881

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

CDN Profile in Global region not compatible with AzureRM v2.20.0 #7881

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

Comments

@oleksiypavlenko
Copy link
Contributor

oleksiypavlenko commented Jul 24, 2020

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.12.29

  • provider.azurerm v2.20.0

Affected Resource(s)

  • azurerm_cdn_profile
  • azurerm_cdn_endpoint

Terraform Configuration Files

This is existing configuration used in Terraform v0.12.28 & AzureRM v2.19.0 without problem:

resource "azurerm_cdn_profile" "some-cdn" {
  name                = "some-cdn"
  location            = "Global"
  resource_group_name = azurerm_resource_group.resource-group.name
  sku                 = "Standard_Microsoft"

  tags = {
    environment = azurerm_resource_group.resource-group.tags.environment
  }
}

Expected Behavior

Should detect no changes after upgrading to AzureRM v2.20.0

Actual Behavior

Error: "global" was not found in the list of supported Azure Locations: "westus,westus2,eastus,centralus,centraluseuap,southcentralus,northcentralus,westcentralus,eastus2,eastus2euap,brazilsouth,brazilus,northeurope,westeurope,eastasia,southeastasia,japanwest,japaneast,k
oreacentral,koreasouth,indiasouth,indiawest,indiacentral,australiaeast,australiasoutheast,canadacentral,canadaeast,uksouth,ukwest,francecentral,francesouth,australiacentral,australiacentral2,uaecentral,uaenorth,southafricanorth,southafricawest,switzerlandnorth,switzerlan
dwest,germanynorth,germanywestcentral,norwayeast,norwaywest,brazilsoutheast"

Also tried changing configuration to region of resource group:

resource "azurerm_cdn_profile" "some-cdn" {
  name                = "some-cdn"
  location            = "eastus2"
  resource_group_name = azurerm_resource_group.resource-group.name
  sku                 = "Standard_Microsoft"

  tags = {
    environment = azurerm_resource_group.resource-group.tags.environment
  }
}

In this case got message:

 # azurerm_cdn_profile.some-cdn must be replaced
/+ resource "azurerm_cdn_profile" "some-cdn" {
     ~ id                  = "/subscriptions/......
     ~ location            = "global" -> "eastus2" # forces replacement
       name                = "some-cdn"
       resource_group_name = "Some-ResourceGroup-EastUS2"
       sku                 = "Standard_Microsoft"
       tags                = {
           "environment" = "engr"
       }

     - timeouts {}
   }

Tried removing the resource from Terraform state by using terraform state rm and re-importing using region specific config without luck, still results in "must be replaced" message.

Steps to Reproduce

  1. Upgrade AzureRM provider to v2.20.0
  2. terraform plan

Important Factoids

The resource is reported to be in Global region

image

@neil-yechenwei

This comment has been minimized.

@oleksiypavlenko
Copy link
Contributor Author

Thank you for the workaround @neil-yechenwei
It's unfortunate the validation needs to be disabled, because there are other resources in the same workspace which would benefit from it.
Please close the ticket if there are no plans of introducing "global" region.

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

4 participants