boltops-tools / terraspace

Terraspace: The Terraform Framework
https://terraspace.cloud
Apache License 2.0
674 stars 46 forks source link

Fix terraform apply/destroy missing some passthrough options #258

Closed jbbarth closed 2 years ago

jbbarth commented 2 years ago

This is a 🐞 bug fix.

Summary

Terraform 1.1.0+ unified some options and the help section for "terraform apply" and "terraform destroy" changed then. See PR: https://github.com/hashicorp/terraform/pull/28489

As a consequence, "terraform apply -help" doesn't contain all the options supported by "terraform apply". For instance, it misses the "-target=resource" option, hence terraspace won't pass it down to terraform while it should. Same goes for "terraform destroy".

Context

Previously reported in #235.

How to Test

You can test with terraspace up -target=a.given.resource

Version Changes

Patch.

jbbarth commented 2 years ago

@tongueroo wow thanks for merging it so quickly!! Can you issue a new patch release of the gem? Or do you want to wait for some reason? Thanks

tongueroo commented 2 years ago

No reason. Just barely didn't get to it last night. Released in 2.1.6. Thanks for the contribution!

jbbarth commented 2 years ago

Awesome, thank you!