-
Notifications
You must be signed in to change notification settings - Fork 889
fix: install terraform in base Docker image #6263
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
Conversation
I think there's a weird interaction with the Terraform downloader such that it will still try to download Terraform when it's installed but the wrong version. Are we able to be sure those versions stay in sync? |
We could specify with our |
coder/provisioner/terraform/install.go Lines 21 to 24 in 19ae411
|
Seems like the simplest option is to manually specify the version in |
scripts/Dockerfile.base
Outdated
RUN mkdir -p /opt/terraform/plugins/registry.terraform.io | ||
# Add config for local terraform | ||
ADD files/terraform-config.tfrc /opt/terraform/config.tfrc | ||
ARG CODER_PROVIDER_VERSION=0.6.12 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
These versions (for Coder and the other providers) can also get quickly out of sync from what we hardcode in our example templates too, which will cause Terraform to still fail
Maybe we stick to just embedding Terraform and make the TRFC configurable via a code server flag or something in an additional PR? Then, an external PVC can be mounted or a network mirror can be specified #6189
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yeah, that sounds like a better option. Baking in all of the Terraform providers we use in examples/templates
would inflate our base image by 199MB.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If you are going to merge this, can you change our offline docs?
Yep |
This PR adds terraform to all Coder base images. It's a required dependency so it makes sense to bundle it with the image.
Still TODO: providers and pluginsNot bundling providers at this time.
Fixes #6258