You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
If I use terraform plan -out=terraform.tfplan and then terraform apply terraform.tfplan, it seems to apply it to a local state instead of a remote state:
% terraform plan -out terraform.tfplan
Refreshing Terraform state prior to plan...
[ ... snip Refreshing state ... ]
The Terraform execution plan has been generated and is shown below.
Resources are shown in alphabetical order for quick scanning. Green resources
will be created (or destroyed and then created if an existing resource
exists), yellow resources are being changed in-place, and red resources
will be destroyed.
Your plan was also saved to the path below. Call the "apply" subcommand
with this plan file and Terraform will exactly execute this execution
plan.
Path: terraform.tfplan
+/- etc.
% terraform apply terraform.tfplan
<applies normally>
% terraform plan -out=terraform.tfplan
Error loading state: Remote state enabled, but state file 'terraform.tfstate' also present.
The remote state (on Atlas) didn't get updated at all, so the states are now out of sync. It seems mv terraform.tfstate .terraform/terraform.tfstate && terraform push fixed that, though.
The text was updated successfully, but these errors were encountered:
I'm going to lock this issue because it has been closed for 30 days ⏳. This helps our maintainers find and focus on the active issues.
If you have found a problem that seems similar to this, please open a new issue and complete the issue template so we can capture all the details necessary to investigate further.
ghost
locked and limited conversation to collaborators
May 4, 2020
Sign up for freeto subscribe to this conversation on GitHub.
Already have an account?
Sign in.
If I use
terraform plan -out=terraform.tfplan
and thenterraform apply terraform.tfplan
, it seems to apply it to a local state instead of a remote state:The remote state (on Atlas) didn't get updated at all, so the states are now out of sync. It seems
mv terraform.tfstate .terraform/terraform.tfstate && terraform push
fixed that, though.The text was updated successfully, but these errors were encountered: