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.
If an issue is assigned to the modular-magician user, it is either in the process of being autogenerated, or is planned to be autogenerated soon. If an issue is assigned to a user, that user is claiming responsibility for the issue. If an issue is assigned to hashibot, a community member has claimed the issue already.
Access to the key needs to be provided to the Artifact Registry service account. As the service account doesn't exist before a repository has been created terraform applyfails.There seems to be a bit of a chicken and egg problem here.
Steps to Reproduce
Create a new GCP project
terraform apply
Important Factoids
My first thought to solve this issue was manually creating a service account and provide it with access to the key, then have the repository be created with that service account. But it's not possible to do that.
Community Note
modular-magician
user, it is either in the process of being autogenerated, or is planned to be autogenerated soon. If an issue is assigned to a user, that user is claiming responsibility for the issue. If an issue is assigned tohashibot
, a community member has claimed the issue already.Terraform Version
Affected Resource(s)
Terraform Configuration Files
Debug Output
https://gist.github.com/palo-manel/a2ec8eb55935a0904ba351a8993c9afc
Panic Output
N/A
Expected Behavior
I copied from the CMEK example in the artifact_registry_repository resource documentation. Starting with an empty project and running this code I expected a CMEK enabled Artifact Registry to be created.
Actual Behavior
Access to the key needs to be provided to the Artifact Registry service account. As the service account doesn't exist before a repository has been created
terraform apply
fails.There seems to be a bit of a chicken and egg problem here.Steps to Reproduce
terraform apply
Important Factoids
My first thought to solve this issue was manually creating a service account and provide it with access to the key, then have the repository be created with that service account. But it's not possible to do that.
References