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

azurerm_storage_container: Metadata containing Upper Case characters breaks #10723

Closed
TheFlyingArcher opened this issue Feb 24, 2021 · 3 comments · Fixed by #10731
Closed

azurerm_storage_container: Metadata containing Upper Case characters breaks #10723

TheFlyingArcher opened this issue Feb 24, 2021 · 3 comments · Fixed by #10731

Comments

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

  • Terraform 0.14.4
  • AzureRM 2.48

Affected Resource(s)

  • azurerm_storage_container

Terraform Configuration Files

resource "azurerm_storage_container" "container" {
  name                  = module.container_name.name
  storage_account_name  = var.storage_account_name
  container_access_type = var.container_access_type
  metadata              = var.metadata
}

Where metadata looks something like this

metadata = {
  meta        = "data"
  noUpperCase = "none"
}

Debug Output

Debug output may contain sensitive stuff to which I don't think I can share publicly.

Expected Behaviour

It should either accept that upper case characters is a valid name. Or, if this is a known Azure limitation, it should be documented as such that only lower case characters plus underscores are allowed in the container metadata.

Actual Behaviour

Error: MetaData must start with letters or an underscores. Got "noUpperCase".

  on ../../_modules/container/main.tf line 9, in resource "azurerm_storage_container" "container":
   9: resource "azurerm_storage_container" "container" {

Steps to Reproduce

  1. terraform apply
@favoretti
Copy link
Collaborator

          ~ resource "azurerm_storage_container" "test" {
                id                      = "https://acctestacc2vr04.blob.core.windows.net/vhds"
              ~ metadata                = {
                  + "upperCase" = "something"
                  - "uppercase" = "something" -> null
                    # (2 unchanged elements hidden)
                }
                name                    = "vhds"
                # (5 unchanged attributes hidden)
            }

Seems to be Azure API limitation, will adjust error message and docs.

@ghost
Copy link

ghost commented Feb 26, 2021

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

@ghost
Copy link

ghost commented Mar 28, 2021

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 as resolved and limited conversation to collaborators Mar 28, 2021
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.

3 participants