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

Azure Maps sku_name is lowercase, but Azure reports as uppercase #4700

Closed
xtellurian opened this issue Oct 24, 2019 · 5 comments
Closed

Azure Maps sku_name is lowercase, but Azure reports as uppercase #4700

xtellurian opened this issue Oct 24, 2019 · 5 comments

Comments

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

Unknown (I'm using Pulumi)

Affected Resource(s)

  • azurerm_resource_arm_maps_account

Terraform Configuration Files

none

Debug Output

Azure Resource Explorer reports sku name with a capital 'S'

{
"sku": {
        "name": "S0",
        "tier": "Standard"
      }
}

Expected Behavior

Case of sku name from Azure RM should match case when validating sku_name

Actual Behavior

Terraform validation function requires lower-case 's0' and 's1' but ARM reports sku name as upper-case 'S0' and 'S1'

Steps to Reproduce

  1. Create an Azure Maps account
  2. Go to https://resources.azure.com/ and look at the Azure Maps resource definition
  3. Try to change the sku_name property to match the uppercase 'S0' or 'S1' as reported by ARM
  4. Terraform validation function does not allow uppercase 'S0' or 'S1'

https://github.com/terraform-providers/terraform-provider-azurerm/blob/master/azurerm/resource_arm_maps_account.go#L51

@xtellurian
Copy link
Author

pulumi/pulumi-azure#396

@xtellurian
Copy link
Author

We could change the validation function like so, to avoid breaking existing code.

"sku_name": {
    Type:     schema.TypeString,
    Required: true,
    ForceNew: true,
    ValidateFunc: validation.StringInSlice([]string{
        "s0",
        "S0",
        "s1",
        "S1"
    }, false),
},

@mikhailshilkov
Copy link
Contributor

This is a duplicate of #4706 which has more Terraform details

@tombuildsstuff
Copy link
Contributor

closing in favour of #4706

@ghost
Copy link

ghost commented Nov 23, 2019

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 👉 hashibot-feedback@hashicorp.com. Thanks!

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

No branches or pull requests

3 participants