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

Ability to override executor (or image) #14

Closed dcarley closed 3 years ago

dcarley commented 3 years ago

Is your feature request related to a problem? Please describe. The provided executor always uses the latest hashicorp/terraform:light image, which can force unexpected upgrades and non-deterministic results between runs. For example CI/CD may work one week on Terraform 0.13 but the job would no longer run the following week due to syntax changes in Terraform 0.14. To override this currently you need to define your own jobs to wrap the Orb's commands which produces a lot of boilerplate code.

Describe the solution you'd like The ability to pass your own executor to the jobs.

Describe alternatives you've considered The terraform/default executor does have an image parameter that could be made accessible from the jobs, like the Node Orb does. I don't believe you can use a "null" default for a parameter though, so it results in duplicating the default versions across many places in the Orb, which would be harder to maintain. I'd be inclined to remove the executor parameter altogether to make it clearer that it's not usable by the Orb.

Additional context I'll be happy to submit a PR if you can advice which solution you'd prefer.

edeesis commented 3 years ago

The upgrade and push of 0.15.0 to hashicorp/terraform:light has caused another issue with init. I agree that adding the ability to specify your own image as a parameter would be great.

KyleTryon commented 3 years ago

This has been resolved in #46