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_container_registry_token should allow "-" in the name #11545

Closed
joshjohanning opened this issue Apr 30, 2021 · 2 comments · Fixed by #11607
Closed

azurerm_container_registry_token should allow "-" in the name #11545

joshjohanning opened this issue Apr 30, 2021 · 2 comments · Fixed by #11607

Comments

@joshjohanning
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 v0.15.1
on darwin_amd64
+ provider registry.terraform.io/hashicorp/azurerm v2.57.0

Affected Resource(s)

  • azurerm_container_registry_token

Terraform Configuration Files

# Copy-paste your Terraform configurations here - for large Terraform configs,
# please use a service like Dropbox and share a link to the ZIP file. For
# security, you can also encrypt the files using our GPG public key: https://keybase.io/hashicorp
resource "azurerm_container_registry_token" "acr-pull" {
  name                  = "pull-image"
  resource_group_name = data.azurerm_resource_group.devops.name
  container_registry_name = azurerm_container_registry.acr.name
  scope_map_id          = data.azurerm_container_registry_scope_map.pull-only.id
}

# ACR includes some default system scope maps
data "azurerm_container_registry_scope_map" "pull-only" {
  name                  = "_repositories_pull"
  resource_group_name = data.azurerm_resource_group.devops.name
  container_registry_name = azurerm_container_registry.acr.name
}

Debug Output

Panic Output

Expected Behaviour

It should be able to create a token with a "-" (dash) in the name. These are the requirements when creating a token through the Azure portal:

  • The value must not be empty.
  • The value must be between 5 and 50 characters long.
  • Name must start with a letter and contain only alphanumeric characters optionally separated by a '-'

Actual Behaviour

Receives an error saying only alphanumeric characters are allowed:

Error: alpha numeric characters only are allowed in "name": "pull-image"

Steps to Reproduce

  1. terraform apply

Important Factoids

References

@ghost
Copy link

ghost commented May 14, 2021

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

@github-actions
Copy link

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 github-actions bot locked as resolved and limited conversation to collaborators Jun 14, 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.

4 participants