David
CCoder.com
•Created by David on 4/4/2025 in #help
EKS/ECR envbuilder layer cache
I realize I haven't said or made clear in my snippets: the builder_image is in a private repository (b/c I added some files there that we want available during devcontainer builds).
Two workarounds come to mind:
- Use the public image for builder_image in this resource--we don't actually need our modified image just to check the cache.
- Modify the coder deployment to put credentials in an appropriate place to be read by GetRemoteImage--actually, this isn't a good solution because ECR credentials expire every 12 hours; though I suppose I could complicate it further by adding a process to refresh them.
13 replies
CCoder.com
•Created by David on 4/4/2025 in #help
EKS/ECR envbuilder layer cache
Yeah, I think that might be it: docker_config_base64 is passed into envbuilder's config, but it's not used when fetching envbuilder from the builder_image. The helper function GetRemoteImage(), uses
authn.DefaultKeychain
, which reads from ~/.docker/config.json
et al.
https://github.com/coder/terraform-provider-envbuilder/blob/main/internal/imgutil/imgutil.go#L27
https://github.com/google/go-containerregistry/blob/main/pkg/authn/keychain.go#L8713 replies
CCoder.com
•Created by David on 4/4/2025 in #help
EKS/ECR envbuilder layer cache
IAM (in the deployment terraform, not a workspace template)
13 replies
CCoder.com
•Created by David on 4/4/2025 in #help
EKS/ECR envbuilder layer cache
Sort of the same. It is building the credentials the same way. But that example is giving the credentials to envbuilder. I'm trying to give the credentials to
resource "envbuilder_cached_image"
.
One guess I had: Maybe the terraform resource isn't using the credentials to "fetch the envbuilder binary from the builder image", but only for accessing the cache repo?13 replies
CCoder.com
•Created by David on 4/4/2025 in #help
EKS/ECR envbuilder layer cache
This is the relevant portion of the template
13 replies