-
Notifications
You must be signed in to change notification settings - Fork 9.7k
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
Instance state only destroys #24083
Merged
Merged
Instance state only destroys #24083
Changes from all commits
Commits
Show all changes
17 commits
Select commit
Hold shift + click to select a range
45f2a61
do not connect references from destroy nodes
jbardin 8b5522a
do not attempt to find more destroy dependencies
jbardin 451190a
remove DestroyEdge
jbardin 84d1f5c
convert destroy provisioner warnings to errors
jbardin b5517b5
simplify CBD transformation
jbardin 681d197
fix DestroyEdgeTransformer tests
jbardin 4a41af0
new deps are more precise
jbardin a0ba481
add state where it's now needed for tests
jbardin 9edb719
run AttachStateTransformer in destroy plan
jbardin a4bc91a
remove invalid destroy provisioner tests
jbardin dc8cdd2
add missing deps to targeted destroy test
jbardin ca5b0e6
no longer need DestroyValueReferenceTransformer
jbardin 8c5853e
remove old references code from abstract resource
jbardin d4d99be
remove some destroy special cases
jbardin 099806c
fixup LocalProviderConfig literal
jbardin b4f06c2
fixup provider types in new tests
jbardin 37e60cd
fix comment text
jbardin File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -147,8 +147,8 @@ func onlySelfRefs(body hcl.Body) hcl.Diagnostics { | |
|
||
if !valid { | ||
diags = append(diags, &hcl.Diagnostic{ | ||
Severity: hcl.DiagWarning, | ||
Summary: "External references from destroy provisioners are deprecated", | ||
Severity: hcl.DiagError, | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 🚀 |
||
Summary: "Invalid reference from destroy provisioner", | ||
Detail: "Destroy-time provisioners and their connection configurations may only " + | ||
"reference attributes of the related resource, via 'self', 'count.index', " + | ||
"or 'each.key'.\n\nReferences to other resources during the destroy phase " + | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should this change in this test? Seems suspicious.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The original test didn't match because the instance has
count = 3
.