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

Rivera tf orb cmd updates to fix [semver:major] #32

Closed punkdata closed 3 years ago

punkdata commented 3 years ago

Updated the orb to handle state locally or by remote. The original orb schemes around local terraform workspaces were conflicting with the execution of TF code if a remote state backend such as Terraform cloud or AWS s3 are defined. I added a new parameter to act as a toggle flag that specifies if a user wants to use local or remote state backends.

@KyleTryon + @aedifex pls review and test my changes. I tested the orbs using live repos and the changes solved the issue I was experiencing.

punkdata commented 3 years ago

@KyleTryon @aedifex working on a different solution to this. One that is not as extreme as the one I'm proposing.

punkdata commented 3 years ago

@KyleTryon + @aedifex I reverted all of the local_state parameter changes I made in prev commits because it changed the orb too much. Instead I created a new usage example to show how to leverage the existing backend-config-file parameters which is the proper way to create remote backend state management per this TF doc https://www.terraform.io/docs/language/settings/backends/remote.html#using-cli-input

This is ready for review and I have tested all the changes on my test repo.