You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
fix: install terraform in base Docker image (#6263)
Updates the base Docker image to install Terraform version 1.3.4 (max supported version) by default.
Also updates documentation to reflect this change.
- CLI config (.tfrc) for Terraform referring to [external mirror](https://www.terraform.io/cli/config/config-file#explicit-installation-method-configuration)
25
24
-[Terraform Providers](https://registry.terraform.io) for templates
26
25
- These could also be specified via a volume mount (Docker) or [network mirror](https://www.terraform.io/internals/provider-network-mirror-protocol). See below for details.
27
26
27
+
> Note: Coder includes the latest [supported version](https://github.com/coder/coder/blob/main/provisioner/terraform/install.go#L23-L24) of Terraform in the official Docker images.
28
+
> If you need to bundle a different version of terraform, you can do so by customizing the image.
29
+
28
30
Here's an example:
29
31
30
32
```Dockerfile
@@ -38,13 +40,16 @@ RUN apk add curl unzip
38
40
# Create directory for the Terraform CLI (and assets)
39
41
RUN mkdir -p /opt/terraform
40
42
41
-
# In order to run Coder airgapped or within private networks,
42
-
# Terraform has to be bundled into the image in PATH or /opt.
43
-
#
43
+
# Terraform is already included in the official Coder image.
44
+
# See https://github.com/coder/coder/blob/main/scripts/Dockerfile.base#L15
45
+
# If you need to install a different version of Terraform, you can do so here.
46
+
# The below step is optional if you wish to keep the existing version.
44
47
# See https://github.com/coder/coder/blob/main/provisioner/terraform/install.go#L23-L24
45
48
# for supported Terraform versions.
46
49
ARG TERRAFORM_VERSION=1.3.0
47
-
RUN curl -LOs https://releases.hashicorp.com/terraform/${TERRAFORM_VERSION}/terraform_${TERRAFORM_VERSION}_linux_amd64.zip \
0 commit comments