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

Support terraform plan's -target option #2056

Open
suzuki-shunsuke opened this issue Nov 27, 2024 · 0 comments
Open

Support terraform plan's -target option #2056

suzuki-shunsuke opened this issue Nov 27, 2024 · 0 comments
Labels
enhancement New feature or request

Comments

@suzuki-shunsuke
Copy link
Owner

Feature Overview

Allow you to change only given resources using terraform plan's -target option.

Why is the feature needed?

Sometimes you would want to change only specific resources while ignoring changes of other resources.
Especially this is useful when a Terraform Root Module manages a lot of resources and they are managed by multiple people.

Example Code

Introduce a new configuration files: .tfaction/pr/<pr number>.yaml

targets:
  - <resource address>
  - ...

Note

You should use -target option carefully.

https://developer.hashicorp.com/terraform/cli/commands/plan#target-address

Note: Use -target=ADDRESS in exceptional circumstances only, such as recovering from mistakes or working around Terraform limitations.
Refer to Resource Targeting for more details.

@suzuki-shunsuke suzuki-shunsuke added the enhancement New feature or request label Nov 27, 2024
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

No branches or pull requests

1 participant