Problem deploying TerraForm scripts

Hello,
Trying to deploy a TerraForm to AWS, this exception thrown:

Warning: registry.terraform.io: This version of Terraform has an outdated GPG key 
and is unable to verify new provider releases. Please upgrade Terraform to at least     
0.12.31 to receive new provider updates. For details see: 
https://discuss.hashicorp.com/t/hcsec-2021-12-codecov-security-event-and-hashicorp-gpg-key-exposure/23512

Can you guys advise me on how to fix this?

Thanks

Hi @cpieren,
I’m glad you reached out! Unfortunately, you’ve bumped into a known issue that followed a security breach at hasicorp occurring over the last couple of weeks.

Our suggested resolution, for the moment, is to use a custom terraform executable by utilizing special variables described in our documentation Planning changes made by Terraform templates - Octopus Deploy.

I hope this helps and don’t hesitate to let me know if you have any further questions or concerns.
Kind Regards,
Tina

after setting this variable:
Octopus.Action.Terraform.CustomTerraformExecutable | C:\Terraform\terraform.exe
I get an error:

Info  | "C:\Terraform\terraform.exe" --version
Info  | Terraform v0.15.2
Info  | on windows_amd64
Info  | "C:\Terraform\terraform.exe" init -no-color -get-plugins=true
Error | Usage: terraform [global options] init [options]
Error | Initialize a new or existing Terraform working directory by creating
Error | initial files, loading any remote state, downloading modules, etc.
Error | This is the first command that should be run for any new or existing
Error | Terraform configuration per machine. This sets up all the local data
Error | necessary to run Terraform that is typically not committed to version
Error | control.

Hi @matxj84 !

This error is stemming from an option that got deprecated in TF 0.15, sadly. We do have new versions of Octopus that account for this change, with the latest builds of 2020.5 and 2020.6 having the fix. Sadly, this does mean that you’ll likely need to update your Octopus instance to have this work natively with 0.15.

I hope this helps

This topic was automatically closed 31 days after the last reply. New replies are no longer allowed.