-
Notifications
You must be signed in to change notification settings - Fork 112
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
apply: allow use of -destroy flag for compatible terraform versions #292
Conversation
Resolves #293 |
404a028
to
79356c9
Compare
79356c9
to
65fea9e
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fab, thank you. Just one change so the min version var matches our naming convention.
@@ -9,6 +9,10 @@ import ( | |||
"github.com/hashicorp/terraform-exec/tfexec" | |||
) | |||
|
|||
var ( | |||
validateMinApplyDestroyVersion = version.Must(version.NewVersion("0.15.2")) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
validateMinApplyDestroyVersion = version.Must(version.NewVersion("0.15.2")) | |
applyDestroyMinVersion = version.Must(version.NewVersion("0.15.2")) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
would be great to merge this, i can fork the author's branch if that's helpful
Implement the ApplyOption interface for the DestroyFlagOption struct which enables the user to run `terraform apply -destroy` as they would using the terraform binary directly by calling `func (tf *Terraform) Apply`.
65fea9e
to
8e043bf
Compare
Implement the ApplyOption interface for the DestroyFlagOption
struct which enables the user to run
terraform apply -destroy
as they would using the terraform binary directly by calling
func (tf *Terraform) Apply
.