Skip to content

Terraform plugin runs 'plan/apply' before 'destroy' #22

Description

@arm4b

With the following bitops.config.yaml:

terraform:
    cli:
        stack-action: apply
    options: {}

and ENV variable TERRAFORM_DESTROY=true the plugin runs plan -> apply -> destroy sequence which is undesired.

The expected behavior with TERRAFORM_DESTROY=true is that it'll take precedence over all the terraform stack-actions and just destroy should be executed.

Otherwise, it may lead to apply -> destroy resource recreation which could be not just a waste of time/resources, but harmful in production.


Even with an empty Terraform plugin config (defaults to plan), only destroy should be executed.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

bugSomething isn't working

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions