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

terraform 1.10.1 takes terraform.tfvars when applying planned file #36177

Closed
DorisEckel8412 opened this issue Dec 9, 2024 · 3 comments · Fixed by #36180
Closed

terraform 1.10.1 takes terraform.tfvars when applying planned file #36177

DorisEckel8412 opened this issue Dec 9, 2024 · 3 comments · Fixed by #36180
Assignees

Comments

@DorisEckel8412
Copy link

Terraform Version

1.10.1

Terraform Configuration Files

variable this_is_variable {
   type = string
}

// in terraform-<env>.tfvars 
this_is_variable = "foo"

// in terraform.tfvars 
this_is_variable = "bar"

Debug Output

https://gist.github.com/DorisEckel8412/3bc826f64ad9702739ef7d252aa28947

Expected Behavior

Use only the values already in the planned file and not tries to override them.

Actual Behavior

It tries to override with entries from terraform.tfvars

Steps to Reproduce

  1. terraform plan -var-file=terraform-.tfvars -out plan.output
  2. terraform apply plan.output

Additional Context

From the documentation and until 1.9.x it was taking the planned file and ignoring the default terraform.tfvars file. Other stuff about variables was mentioned as fixed in 1.10.1 but this still appears.

References

No response

@DorisEckel8412 DorisEckel8412 added bug new new issue not yet triaged labels Dec 9, 2024
@jkritzen
Copy link

jkritzen commented Dec 9, 2024

The same on our side. This is breaking our whole module test workflows:

image

If you add the the custom tfvars file terraform.germanywestcentral.tfvars to the apply, then it is working.

@ashithajo
Copy link

I am still seeing this error with v1.10.3

@crw
Copy link
Contributor

crw commented Dec 19, 2024

@ashithajo please open a new bug issue following the template, as usually there is a new or different cause for the same error message after a fix such as this. Thanks!

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

Successfully merging a pull request may close this issue.

5 participants