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

Backport of Fix crash when nested data blocks are mixed with the import command into v1.5 #33583

Merged

Conversation

teamterraform
Copy link
Contributor

Backport

This PR is auto-generated from #33578 to be assessed for backporting due to the inclusion of the label 1.5-backport.

The below text is copied from the body of the original PR.


This PR fixes a crash that occurs when the terraform import command is used against configuration that has a nested data block defined within a check block.

Essentially, the nested data block still tries to report its checkable status during an import operation. This results in the checks system panicking as it is not expecting that kind of check to be reported.

The fix in this case is just to make the full check block also execute during an import operation. Note, that this behaviour matches the behaviour of other checkable objects. Resource pre and post conditions still execute during the validate operation, they just report warnings instead of errors. As check blocks already only report warnings, making all checkable objects consistent in this case is as simple as turning on check blocks during import.

Fixes #33572

Target Release

1.5.4

Draft CHANGELOG entry

BUG FIXES

  • check blocks: Fixes crash when nested data sources are within configuration targeted by the terraform import command.
  • check blocks: Check blocks now operate in line with other checkable objects by also executing during import operations.

@teamterraform teamterraform force-pushed the backport/liamcervante/33572/noticeably-major-clam branch 2 times, most recently from f1a5f19 to 922189c Compare July 26, 2023 07:41
@liamcervante liamcervante merged commit d3727cb into v1.5 Jul 26, 2023
6 checks passed
@github-actions
Copy link

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

Copy link

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 Dec 12, 2023
@liamcervante liamcervante deleted the backport/liamcervante/33572/noticeably-major-clam branch February 23, 2024 13:14
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants