Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add support for 'terraform show' #225

Merged
merged 1 commit into from
Dec 6, 2021

Conversation

brk3
Copy link
Contributor

@brk3 brk3 commented Dec 3, 2021

Example usage:

Show current state:

/tf/rover/rover.sh \
  -lz /tf/caf/landingzones/caf-terraform-landingzones/caf_solution/ \
  -level level3 \
  -tfstate aks.tfstate \
  -env foo \
  -a show [-json]

Show a plan file:

/tf/rover/rover.sh \
  -lz /tf/caf/landingzones/caf-terraform-landingzones/caf_solution/ \
  -level level3 \
  -tfstate aks.tfstate \
  -env foo \
  -a show [-json] /tmp/out.plan

Implements #181

Example usage:

* Show current state:

/tf/rover/rover.sh \
  -lz /tf/caf/landingzones/caf-terraform-landingzones/caf_solution/ \
  -level level3 \
  -tfstate aks.tfstate \
  -env foo \
  -a show [-json]

* Show a plan file:

/tf/rover/rover.sh \
  -lz /tf/caf/landingzones/caf-terraform-landingzones/caf_solution/ \
  -level level3 \
  -tfstate aks.tfstate \
  -env foo \
  -a show [-json] /tmp/out.plan
@brk3
Copy link
Contributor Author

brk3 commented Dec 3, 2021

Hi Rover team, I've had to modify scripts/tfstate_azurerm.sh:other() to not pass -state by default. Not all 'other' commands take this arg, show being one. However I'm concerned this may break certain commands falling through to the other function that may require the state file?

If someone has some of these use cases would appreciate if they could confirm this patch is OK for their use case.

@arnaudlh arnaudlh changed the base branch from master to tfc December 6, 2021 13:55
@arnaudlh arnaudlh added the enhancement New feature or request label Dec 6, 2021
@LaurentLesle
Copy link
Contributor

Thanks @brk3 . Going to include it in the next rover release and do the integration test into the tfc branch

@arnaudlh arnaudlh merged commit 56e485e into aztfmod:tfc Dec 6, 2021
@arnaudlh
Copy link
Member

arnaudlh commented Dec 6, 2021

thanks @brk3 for your contribution to Cloud Adoption Framework!

@arnaudlh arnaudlh linked an issue Dec 6, 2021 that may be closed by this pull request
@LaurentLesle LaurentLesle self-requested a review December 6, 2021 15:22
@arnaudlh
Copy link
Member

arnaudlh commented Dec 6, 2021

Tested and will need more rework so rolled back @brk3 ! Lets iterate for next month release.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Export JSON format for Terraform plan
3 participants