Skip to content

Feature: terrform apply -skip="resource.you.want.to.skip.in.main.tf" #32480

Description

@acarlstein

Terraform Version

Terraform v1.3.5
on darwin_amd64

Your version of Terraform is out of date! The latest version
is 1.3.7. You can update by downloading from https://www.terraform.io/downloads.html

Use Cases

There is a module that have being flagged for no deletion; however, it is listed inside the main.tf.

This means that when running terraform destroy those module wont be destroyed.

When trying to use terraform apply, we get messages such as:

Error: invalid response from API server (409): The resource '...' already exists

Attempted Solutions

One way is to use the target flag, with apply, and try to apply each module and resource that isn't the one giving the 409.

Proposal

The proposal is to introduce a new flag -skip. So, we can tell apply which modules and resources, in main.tf, we wish to skip.

References

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    duplicateissue closed because another issue already tracks this problemenhancement

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions