Loading...
Loading...
### Terraform Version ```shell Terraform v1.11.2 on linux_amd64 ``` ### Terraform Configuration Files ```terraform resource "null_resource" "r1" { } resource "null_resource" "r2" { lifecycle { replace_triggered_by = [null_resource.r1.foo.bar.baz[0].bif] # does not error, but should # replace_triggered_by = [null_resource.r3] # correctly reports error } } ``` ### Debug Output none ### Expected Behavior I expect the configuration above to yield an error. `null_resource.r1.foo.bar.baz[0].bif` is not a real attribute reference. ### Actual Behavior ``` $ terraform apply null_resource.r1: Refreshing state... [id=1800298252482723122] null_resource.r2: Refreshing state... [id=3647057674329973682] No changes. Your infrastructure matches the configuration. Terraform has compared your real infrastructure against your configuration and found no differences, so no changes are needed. Apply complete! Resources: 0 added, 0 changed, 0 destroyed. ``` ### Steps to Reproduce 1. `terraform init` 2. `terraform apply` ### Additional Context Since `replace_triggered_by` is expecting a list of resources or attributes, I'd expect that it would check that those references at least were valid references. It's extremely easy to make a mistake here (e.g., forgetting [0], or a typo, etc) and for a resource not to get replaced because of that typo. ### References _No response_ ### Generative AI / LLM assisted development? _No response_
Click on a version to see all relevant bugs
Terraform Integration
Learn more about where this data comes from
Bug Scrub Advisor
Streamline upgrades with automated vendor bug scrubs
BugZero Enterprise
Wish you caught this bug sooner? Get proactive today.