How do I set the Terraform version for CICD?
I am using the process documented in https://docs.gitlab.com/ee/user/infrastructure/#get-started-using-gitlab-ci
The current release of the gitlab-terraform docker is on Terraform v0.13.x
I have a vendor module that is only supported on v0.12.x at this time. How do I specify the version of Terraform?
I tried to use image tags v0.12, 0.12, 0.2.5, v0.2.5. All which are non existant.
Error response from daemon: manifest for registry.gitlab.com/gitlab-org/terraform-images/stable:0.12 not found: manifest unknown: manifest unknown
Neither the document or the repo (https://gitlab.com/gitlab-org/terraform-images) talks about setting the Terraform version.
EDIT:
Was able to pull in specific Terraform version using image path: registry.gitlab.com/gitlab-org/terraform-images/releases/v0.12
For future reference, you can see all the docker images in the registry: https://gitlab.com/gitlab-org/terraform-images/container_registry
1 Like
I have the same question. How do we use a specific version? The URL provided does not list what the path or syntax should be. For example, let’s say I’d like to use “terraform-images/branches/v0-44-2-1.3”. What exactly would I set for the image path and how would I figure out that the path should be?
As the OP said you can set it like this:
registry.gitlab.com/gitlab-org/terraform-images/releases/v1.3
The below image doesn’t work.
registry.gitlab.com/gitlab-org/terraform-images/branches/v0-44-2-1.3
You get manifest not found error. Since latest tag doesn’t exist for the above.
You have to do this instead.
registry.gitlab.com/gitlab-org/terraform-images/branches/v0-44-2-1.3:7da1317f838ea5d7617c9ce73de4018582c9eadb
image: “$CI_TEMPLATE_REGISTRY_HOST/gitlab-org/terraform-images/releases/1.5:v1.7.1”
Terraform v1.5.7 on linux_amd64 Your version of Terraform is out of date! The latest version is 1.6.6. You can update by downloading from https://www.terraform.io/downloads.html
Can someone update terraform to the latest(currently 1.6.6) release?