Skip to content

Support Target option #240

@ZIJ

Description

@ZIJ
Contributor

Delta plans. option -target is in effect to see only desired changes.

Seems like could be addressed by introducing support of the target option for the plan command. So you'd comment digger plan -t and that'll run a targeted plan. Or maybe something similar to what tftarget does, sort of a "persistent target" for the entire pr; then it'll be smth like digger target comment that will set the target. The latter approach would introduce an extra stateful piece though in addition to locks. @timothyclarke I'm not sure that I'm getting your idea right though

Originally suggested by @timothyclarke in #237 - now tracking separately here

Activity

danijelmarsic2

danijelmarsic2 commented on Jul 5, 2023

@danijelmarsic2

this would be a great feature. We were using atlantis and now switched to digger and we really miss --target option which we had with atlatnis.
For example, this would only plan and later apply a single module in our stack, rather than all 100 modules we are using in our stack:
atlantis plan -- -target=module.our-custom-module.random_password.first_random_pass

frank-bee

frank-bee commented on Jul 5, 2023

@frank-bee

even apply should be possible I think.
In large stacks where several teams are working ( not good but sometimes reality ) there might be "lock situation" which can't be fixed immediately ( other team not reachable...) and you want to do a `terraform apply --target ..." to apply at least your required changes

danijelmarsic2

danijelmarsic2 commented on Jul 5, 2023

@danijelmarsic2

even apply should be possible I think. In large stacks where several teams are working ( not good but sometimes reality ) there might be "lock situation" which can't be fixed immediately ( other team not reachable...) and you want to do a `terraform apply --target ..." to apply at least your required changes

Exactly. I am just stuck at this use case with digger because some team member made a typo in his module which is breaking the plan and apply of the complete stack. With --target I could apply only my module and have time to locate the colleague to fix his type because I have no access to the repo where he made an error. I hope that digger will implement --target soon.

LucaIcaro

LucaIcaro commented on May 24, 2024

@LucaIcaro

still no news for this issue?

joschi36

joschi36 commented on Jul 16, 2025

@joschi36

The newly added OpenTofu Target & Exclude files option could be very usful aswell
https://opentofu.org/docs/intro/whats-new/#target-and-exclude-files

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

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

      Development

      No branches or pull requests

        Participants

        @frank-bee@ZIJ@joschi36@LucaIcaro@danijelmarsic2

        Issue actions

          Support Target option · Issue #240 · diggerhq/digger