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

Equivalent of -refresh=false at the resource/module level #32403

Open
dedaimia opened this issue Dec 16, 2022 · 2 comments
Open

Equivalent of -refresh=false at the resource/module level #32403

dedaimia opened this issue Dec 16, 2022 · 2 comments
Labels
enhancement new new issue not yet triaged

Comments

@dedaimia
Copy link

Terraform Version

Terraform v1.2.9
on darwin_amd64

Use Cases

Love the -refresh=false option on terraform plan, as it allows us to skip refresh and significantly speed up plans when we know out of band changes are unlikely (e.g. we just ran another plan and apply a few minutes ago).

However, we also have cases for specific resources where we almost never care about out-of-band changes. It would be nice to skip refresh on these permanently, without having to decide on a run-by-run basis, and without having to also skip refresh on all the other resources in the repo.

Any chance of getting the equivalent of "refresh=false" as a resource meta-argument? Module meta-argument would be great too.

Attempted Solutions

-refresh=false for the entire plan. But then we periodically need to run with -refresh=true or -refresh-only to pick up out of band changes on other resources in the same code

ignore-changes meta-arguent on the resource, but this still spends time checking for, and reports on, out-of-band changes for resources where we do not need to know

Proposal

refresh meta-argument settable to true/false

References

No response

@dedaimia dedaimia added enhancement new new issue not yet triaged labels Dec 16, 2022
@crw
Copy link
Contributor

crw commented Jan 3, 2023

Thanks for this enhancement request!

@jmikedupont2
Copy link

So for aws alb the refresh is very slow, it would be nice to have a cache time so we can cache the results for a bit based on the cost of querying them in an adaptive manner.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement new new issue not yet triaged
Projects
None yet
Development

No branches or pull requests

3 participants