Hi there!
I am trying to integrate Terraform with Octopus and have a couple of issues. Mentioning the most important one below:
- I have a basic Terraform template which I am able to deploy using “Apply Terraform Step”. The template is inline for now.
- I just added this remote backend:
terraform {
backend “s3” {
bucket = “bucketname”
key = “bucket_name/some_key”
region = “ap-southeast-2”
}
}
- Deployed again and got the below message in Octopus:
“terraform.exe” init -no-color -get-plugins=true
Info
Initializing the backend…
July 17th 2019 15:41:55
Info
Successfully configured the backend “s3”! Terraform will automatically
July 17th 2019 15:41:55
Info
use this backend unless the backend configuration changes.
July 17th 2019 15:41:55
Error
Error refreshing state: Terraform 0.11.8 does not support state version 4, please update.
July 17th 2019 15:41:55
Error
Calamari.Integration.Processes.CommandLineException: The following command: “terraform.exe” init no-color -get-plugins=true
July 17th 2019 15:41:55
Error
With the working directory of: D:\Octopus\Work\20190717061149-13638-156
July 17th 2019 15:41:55
Error
Failed with exit code: 1
July 17th 2019 15:41:55
Error
Error refreshing state: Terraform 0.11.8 does not support state version 4, please update.
- I now logged on to Octopus Server, placed Terraform v0.12.4 on it and added to $PATH with a hope that OD will probably use the latest version of Terraform however, again the same error message mentioned above.
- My questions are:
- How do we find what version of Terraform will be used by Octopus?
- And how to force it to use the latest version to get past this error message?