Loading...
Loading...
### Terraform and AWS Provider Version ```console Terraform v1.15.8 on linux_amd64 + provider registry.terraform.io/hashicorp/aws v6.57.1 ``` ### Affected Resource(s) or Data Source(s) main: ```hcl resource "aws_route53_zone" "x" { name = "x.eu" } ``` imports.tf: ```hcl import { to = aws_route53_zone.y-z identity = { zone_id = local.env.q } } ``` ### Expected Behavior Provide environment plan. ### Actual Behavior Exception raise instead of plan provided. ### Relevant Error/Panic Output ```console tf plan !!!!!!!!!!!!!!!!!!!!!!!!!!! TERRAFORM CRASH !!!!!!!!!!!!!!!!!!!!!!!!!!!! Terraform crashed! This is always indicative of a bug within Terraform. Please report the crash with Terraform[1] so that we can fix this. When reporting bugs, please include your terraform version, the stack trace shown below, and any additional information which may help replicate the issue. [1]: https://github.com/hashicorp/terraform/issues !!!!!!!!!!!!!!!!!!!!!!!!!!! TERRAFORM CRASH !!!!!!!!!!!!!!!!!!!!!!!!!!!! panic: value is marked, so must be unmarked first goroutine 276 [running]: runtime/debug.Stack() runtime/debug/stack.go:26 +0x5e github.com/hashicorp/terraform/internal/logging.PanicHandler() github.com/hashicorp/terraform/internal/logging/panic.go:84 +0x16a panic({0x3c18f20?, 0x4dc8b80?}) runtime/panic.go:783 +0x132 github.com/hashicorp/terraform/internal/terraform.(*Graph).walk.func1.1() github.com/hashicorp/terraform/internal/terraform/graph.go:59 +0x4e5 panic({0x3c18f20?, 0x4dc8b80?}) runtime/panic.go:783 +0x132 github.com/zclconf/go-cty/cty.Value.assertUnmarked(...) github.com/zclconf/go-cty@v1.18.0/cty/marks.go:191 github.com/zclconf/go-cty/cty.Value.AsString({{{0x4e338f8?, 0x4dbca70?}}, {0x40a3be0?, 0xc001f94a68?}}) github.com/zclconf/go-cty@v1.18.0/cty/value_ops.go:1456 +0x47 github.com/hashicorp/terraform/internal/tfdiags.ValueToString({{{0x4e338f8?, 0x4dbca70?}}, {0x40a3be0?, 0xc001f94a68?}}) github.com/hashicorp/terraform/internal/tfdiags/object.go:73 +0x38d github.com/hashicorp/terraform/internal/tfdiags.ObjectToString({{{0x4e33bd0?, 0xc0092a9780?}}, {0x3f328a0?, 0xc00a6b9980?}}) github.com/hashicorp/terraform/internal/tfdiags/object.go:56 +0x61b github.com/hashicorp/terraform/internal/command/views.(*UiHook).PrePlanImport(0xc000b33b00, {{{}, {0x7419b00, 0x0, 0x0}, {{}, {{...}, 0x4d, {...}, {...}}, ...}}, ...}, ...) github.com/hashicorp/terraform/internal/command/views/hook_ui.go:337 +0xa8 github.com/hashicorp/terraform/internal/terraform.(*NodePlannableResourceInstance).importState.func1({0x4e685e8?, 0xc000b33b00?}) github.com/hashicorp/terraform/internal/terraform/node_resource_plan_instance.go:616 +0x83 github.com/hashicorp/terraform/internal/terraform.(*BuiltinEvalContext).Hook(0xc000a95278?, 0xc001b8dad0) github.com/hashicorp/terraform/internal/terraform/eval_context_builtin.go:120 +0x82 github.com/hashicorp/terraform/internal/terraform.(*NodePlannableResourceInstance).importState(0xc0021709b0, {_, _}, {{}, {0x7419b00, 0x0, 0x0}, {{}, {{}, 0x4d, ...}, ...}}, ...) github.com/hashicorp/terraform/internal/terraform/node_resource_plan_instance.go:615 +0x30d github.com/hashicorp/terraform/internal/terraform.(*NodePlannableResourceInstance).managedResourceExecute(0xc0021709b0, {0x4e70400, 0xc001ed98c0}) github.com/hashicorp/terraform/internal/terraform/node_resource_plan_instance.go:213 +0x95e github.com/hashicorp/terraform/internal/terraform.(*NodePlannableResourceInstance).Execute(0xc00199f730?, {0x4e70400?, 0xc001ed98c0?}, 0x58?) github.com/hashicorp/terraform/internal/terraform/node_resource_plan_instance.go:74 +0xb5 github.com/hashicorp/terraform/internal/terraform.(*ContextGraphWalker).Execute(0xc00062e840, {0x4e70400, 0xc001ed98c0}, {0x7f12275e4ca8, 0xc0021709b0}) github.com/hashicorp/terraform/internal/terraform/graph_walk_context.go:170 +0xaf github.com/hashicorp/terraform/internal/terraform.(*Graph).walk.func1({0x462cfa0, 0xc0021709b0}) github.com/hashicorp/terraform/internal/terraform/graph.go:143 +0x755 github.com/hashicorp/terraform/internal/dag.(*Walker).walkVertex(0xc0009e6a20, {0x462cfa0, 0xc0021709b0}, 0xc0054ad980) github.com/hashicorp/terraform/internal/dag/walk.go:393 +0x2d1 created by github.com/hashicorp/terraform/internal/dag.(*Walker).Update in goroutine 221 github.com/hashicorp/terraform/internal/dag/walk.go:316 +0xf13 ``` ### Sample Terraform Configuration Click to expand configuration ```hcl # versions.tf: terraform { backend "s3" { bucket = "bucket" key = "terraform.tfstate" region = "eu-north-1" profile = "aws cli profile" } required_providers { aws = { source = "hashicorp/aws" version = "~> 6.57.0" } } } provider "aws" { region = "eu-north-1" alias = "some alias" profile = "aws cli profile" } # variables.tf: locals { region = "eu-north-1" primary_availability_zone = "eu-north-1a" env = { for tuple in regexall("(.*)=(.*)", file(".env")) : tuple[0] => sensitive(tuple[1]) } } ``` ### Steps to Reproduce 1. terraform plan ### Debug Logging Click to expand log output ```console ``` ### GenAI / LLM Assisted Development n/a ### Important Facts and References _No response_ ### Would you like to implement a fix? No
Click on a version to see all relevant bugs
Terraform Integration
Learn more about where this data comes from
BugZero Plan
Streamline upgrades with automated vendor bug scrubs
BugZero Prevent
Wish you caught this bug sooner? Get proactive today.