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

ACR Encryption block doesn't allow for versionless keys #11774

Closed
tjcorr opened this issue May 18, 2021 · 2 comments · Fixed by #11856
Closed

ACR Encryption block doesn't allow for versionless keys #11774

tjcorr opened this issue May 18, 2021 · 2 comments · Fixed by #11856

Comments

@tjcorr
Copy link
Contributor

tjcorr commented May 18, 2021

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

Description

The recently implemented encryption option for Azure Container Registry is currently forcing the user to provide a versioned key from Key Vault for the encryption. If you want to setup automatic key rotation you have to pass in a versionless id. This can be fixed by changing the schema to a NestedItemIdWithOptionalVersion.

New or Affected Resource(s)

  • azurerm_container_registry

Potential Terraform Configuration

resource "azurerm_key_vault_key" "acr-key" {
  name         = "acr-key"
....
  ]
}

resource "azurerm_container_registry" "acr" {
...
  encryption {
    enabled            = true
    key_vault_key_id   = azurerm_key_vault_key.acr-key.versionless_id  
  }
}

References

  • #0000
@ghost
Copy link

ghost commented Jun 4, 2021

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

@github-actions
Copy link

github-actions bot commented Jul 5, 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 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 Jul 5, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.