Skip to content
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

Unable to install specified Terraform version #316

Open
Ram-Priyatham opened this issue Aug 9, 2023 · 1 comment
Open

Unable to install specified Terraform version #316

Ram-Priyatham opened this issue Aug 9, 2023 · 1 comment
Labels
waiting-on-response Waiting for a response from the user

Comments

@Ram-Priyatham
Copy link

I am trying to install a specific version of Terraform (1.3.6) using the Atlantis helm chart. The Atlantis helm chart does not seem to be installing the specified version of Terraform. I have tried changing the defaultTFVersion property in the values.yaml file to 1.3.6, but the issue persists.
defaultTFVersion : 1.3.6
The defaultTFVersion property is supposed to specify the default version of Terraform to install when the Atlantis helm chart is deployed. However, it seems that the Atlantis helm chart is not considering the defaultTFVersion property

I am not sure why the Atlantis helm chart is not installing the specified version of Terraform.

I would appreciate any help you can provide in troubleshooting this issue.

@GMartinez-Sisti
Copy link
Member

Hi @Ram-Priyatham,

I tested this locally with main and it appears to be working.

kind create cluster --name kind-test
helm upgrade -i atlantis-tf-version . -n atlantis-tf-version --set defaultTFVersion=1.3.6 --values ci/ci-values.yaml

After the server started the download status is shown on the logs:

{"level":"info","ts":"2023-09-17T13:48:23.381Z","caller":"scheduled/executor_service.go:51","msg":"Scheduled Executor Service started","json":{}}
{"level":"info","ts":"2023-09-17T13:48:38.484Z","caller":"terraform/terraform_client.go:564","msg":"Downloaded terraform 1.3.6 to /atlantis-data/bin/terraform1.3.6","json":{}}

Testing that the file is valid:

→ kubectl -n atlantis-tf-version exec atlantis-tf-version-0 -- /atlantis-data/bin/terraform1.3.6 -v
Terraform v1.3.6
on linux_arm64

Your version of Terraform is out of date! The latest version
is 1.5.7. You can update by downloading from https://www.terraform.io/downloads.html

Something to note is that terraform is downloaded async so it doesn't interfere with the server startup, as stated in the code:

https://github.com/runatlantis/atlantis/blob/0dbaa4281e15d825b0b4b8842d5ae4ddeff77a08/server/core/terraform/terraform_client.go#L157-L159

Can you check your logs for the downloader confirmation line or any entry regarding the process? It should contain caller":"terraform/terraform_client.go:. Please let us know.

@GMartinez-Sisti GMartinez-Sisti added the waiting-on-response Waiting for a response from the user label May 4, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
waiting-on-response Waiting for a response from the user
Projects
None yet
Development

No branches or pull requests

2 participants