CircleCI-Public / terraform-orb

Deploy your infrastructure via a CircleCI pipeline using the Terraform orb. Integrate Infrastructure-as-Code (IaC) to help provision and manage any cloud, infrastructure, or service of your choice.
https://circleci.com/orbs/registry/orb/circleci/terraform
MIT License
10 stars 44 forks source link

Option to automatically use the latest terraform_version #18

Closed andormarkus closed 3 years ago

andormarkus commented 3 years ago

Is your feature request related to a problem? Please describe. In the current implementation when a new TF version came out you have to update your CircleCI pipeline to accommodate these changes.

Describe the solution you'd like New boolean variable in the install.yml. Name like "terraform_latest" default value: false. If the value set to true then the << parameters.terraform_version >> is overwritten

if [[ << parameters.terraform_latest >> == "dev" ]] then https://checkpoint-api.hashicorp.com/v1/check/terraform wget https://releases.hashicorp.com/terraform/<< parameters.terraform_version >>/terraform_<< parameters.terraform_version >>_linux_amd64.zip else wget https://releases.hashicorp.com/terraform//{{ version }}/terraform_{{ version }}_linux_amd64.zip unzip terraform_{{ version }}_linux_amd64.zip fi

Additional context I'll be happy to submit a PR if you like these changes

punkdata commented 3 years ago

@andormarkus Thanks for the issue submission. Since TF is sensitive to cli version compatibility with existing deployments. We've decided to not implement the latest version install by default. We have added the capability to define the version to install to allow for specific installs and prevent backward compatibility errors.

Closing this issue.