Skip to content

Fix missing validation for count and for-each meta-arguments#35432

Merged
liamcervante merged 1 commit intomainfrom
liamcervante/35427
Jul 10, 2024
Merged

Fix missing validation for count and for-each meta-arguments#35432
liamcervante merged 1 commit intomainfrom
liamcervante/35427

Conversation

@liamcervante
Copy link
Copy Markdown
Contributor

This PR fixes a crash that occurs when self-referencing direct instances from the count and for_each meta arguments. The same behaviour was also happening within the import blocks. These have been updated to share the same code path, and more extensive test cases have been added to cover the missing edge cases.

This had been partially fixed previously in #35407, but some edge-cases had been missed allowing certain conditions (direct instance references) to still trigger the panic.

Fixes #35427

Target Release

1.9.2

Draft CHANGELOG entry

BUG FIXES

  • Fix panic when self-referencing direct instances from count and for_each meta arguments.

@liamcervante liamcervante added the 1.9-backport If you add this label to a PR before merging, backport-assistant will open a new PR once merged label Jul 8, 2024
@liamcervante liamcervante requested a review from a team July 8, 2024 10:18
@liamcervante liamcervante merged commit 86b6750 into main Jul 10, 2024
@github-actions
Copy link
Copy Markdown
Contributor

Reminder for the merging maintainer: if this is a user-visible change, please update the changelog on the appropriate release branch.

@github-actions
Copy link
Copy Markdown
Contributor

I'm going to lock this pull request because it has been closed for 30 days ⏳. This helps our maintainers find and focus on the active contributions.
If you have found a problem that seems related to this change, please open a new issue and complete the issue template so we can capture all the details necessary to investigate further.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Aug 10, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

1.9-backport If you add this label to a PR before merging, backport-assistant will open a new PR once merged

Projects

None yet

Development

Successfully merging this pull request may close these issues.

panic: no expansion has been registered for module.s3_bucket_example_second.data.aws_s3_bucket.existing_logging_bucket

2 participants