-
Notifications
You must be signed in to change notification settings - Fork 379
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
Add OCI registry block to provider #862
Add OCI registry block to provider #862
Conversation
@jrhouston can you please review code. I think it is good idea to put oci registries inside helm provider block. |
@jrhouston may I kindly ask for your review? This is a blocker for normal operation of helm charts in OCI registry. I've found a workaround to perform docker login to registry with dynamic credentials, but it is ugly:
|
yes, please review and let’s get this merged. The posted workaround is basically same as doing helm login with the helm binary before running terraform. This is super finicky, because if your binary version does not match what’s in the provider, you get weird login failures. For reliably logging in with a token in a CI pipeline, getting this block into the provider is critical. |
Yep – I agree adding this in makes sense, thanks for opening this @monester. I'll review this as soon as I can to get this into the next release. |
@jrhouston This PR is crucial for pulling OCI artefacts from AWS ECR directly from Terraform cloud. Is there an ETA when such a block might be included into the Helm Terraform provider (and subsequent release)? |
At the risk of piling on: the current state of the helm provider is that it cannot be used with OCI repositories, which the upstream helm project is strongly promoting and signaling is the preferred repo format going forward. Some combination of this and #928 would solve the issue generally, but both PRs have now been open and untouched for months. What gives? |
@BBBmau any chance to have a release with this fix in november ? or maybe in december if your are busy |
Hello! Thank you for opening this PR, I went ahead and added a test for the registry block. @jrhouston could you take a look? |
e1765ec
to
36a6b02
Compare
36a6b02
to
e6adde6
Compare
aca6a51
to
a3319bd
Compare
Thank you, thank you, thank you! |
@jrhouston Indeed, thanks a lot! That will help a lot analysing Terraform plans! |
I am struggling to use this. i am trying to use the following pattern:
But as we are using (sub)modules we need to set the providers in the root module. The root module has multiple, aliased, AWS providers. How do I instruct --- Update --- In case it helps someone else, apparently it's like this :-) ;
|
I'm going to lock this pull request because it has been closed for 30 days ⏳. This helps our maintainers find and focus on the active issues. |
Description
Add OCI registry to block to provider definition to have same behavior as Helm binary where you are doing
helm registry login
only once. As registry is specified in everyhelm_release
username and password are marked as required variables. In documentation it is also marked as option for private registries only.This would allow to keep passwords to registries away from helm_release resource and ability to use short live token without affecting chart resource.
For compatibility reasons I've kept ability to specify password for OCI in helm_release resource.
Example code for short live token:
Acceptance tests
Release Note
Release note for CHANGELOG:
References
Related issues: #861
Community Note