-
Notifications
You must be signed in to change notification settings - Fork 10.3k
Can't upgrade from 0.11.14 to 0.13.0 with version 3 statefile containing remote state data resource #25863
Copy link
Copy link
Closed
Labels
bugworking as designedconfirmed as reported and closed because the behavior is intendedconfirmed as reported and closed because the behavior is intended
Description
Terraform Version
Using the branch from #25861
Terraform v0.13.1-dev
Terraform Configuration Files
data "terraform_remote_state" "test" {
backend = "remote"
config = {
organization = "my-tfc-org"
workspaces = {
name = "some-tfc-workspace"
}
}
}Debug Output
Expected Behavior
An empty plan.
Actual Behavior
$ terraform plan
Refreshing Terraform state in-memory prior to plan...
The refreshed state will be used to calculate this plan, but will not be
persisted to local or remote state storage.
Error: cannot decode dynamic from flatmap
$Steps to Reproduce
- Create a config with a Terraform Cloud remote state data source block pointing to a workspace
- Run
terraform initandterraform applywith Terraform 0.11.14 to create a state file - Run
terraform planwith Terraform 0.13.1-dev (after addrs: Fix LegacyString for builtin providers #25861 is merged, or using that branch, or it'll panic)
Additional Context
This works with Terraform 0.12.28. The failure is in attempting to decode the dynamic config block from the flatmap in the state file. From looking at the v0.12 branch, I can't see how this used to work, nor any reason why it should only start failing with 0.13.
References
Found when investigating the fix for #25803.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
bugworking as designedconfirmed as reported and closed because the behavior is intendedconfirmed as reported and closed because the behavior is intended