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

add the -refresh option to plan and apply #120

Merged
merged 2 commits into from
Apr 27, 2021
Merged

add the -refresh option to plan and apply #120

merged 2 commits into from
Apr 27, 2021

Conversation

jdamata
Copy link
Contributor

@jdamata jdamata commented Aug 11, 2020

-refresh=true - Update the state for each resource prior to planning and applying. This has no effect if a plan file is given directly to apply.

@jdamata
Copy link
Contributor Author

jdamata commented Aug 24, 2020

#116

@jmccann
Copy link
Owner

jmccann commented Sep 11, 2020

@jdamata First I'm not sure this PR is related to #116 since you are passing an arg to commands vs running the terraform refresh command itself (https://www.terraform.io/docs/commands/refresh.html).

Also, looking at the PR it seems this only allows disabling refresh ... there is no option for enabling it. I'm guessing that's because it's enabled by default?

Just curious the use-case to disable it when running apply/plan. No one has needed/wanted this until now.

@jdamata
Copy link
Contributor Author

jdamata commented Sep 11, 2020

@jdamata First I'm not sure this PR is related to #116 since you are passing an arg to commands vs running the terraform refresh command itself (https://www.terraform.io/docs/commands/refresh.html).

Ah yah. I misread the issue.

Also, looking at the PR it seems this only allows disabling refresh ... there is no option for enabling it. I'm guessing that's because it's enabled by default?

Correct. Its enabled by default.

Just curious the use-case to disable it when running apply/plan. No one has needed/wanted this until now.

I'm utilizing the cloudflare terraform provider and have tons of resources. Cloudflare has rate limits on its API's. Our branching strategy runs terraform plan on feature/* branches and terraform apply on master. I find that with refresh enabled on feature branches, we hit the rate limit frequently.

@jmccann jmccann merged commit 9c70f40 into jmccann:master Apr 27, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants