Skip to content

Conversation

@jamesaorson
Copy link

Motivation

Closes #32

Changes

The tfplan structure contains not only a resource_changes field, but also a resource_drift field.
resource_drift has the same internal type as resource_changes, so they now share a named type.

@jamesaorson jamesaorson requested a review from borchero as a code owner July 15, 2025 23:33
@github-actions github-actions bot added the enhancement New feature or request label Jul 15, 2025
@github-actions
Copy link

🤖 Stalebot

This pull request hasn't seen updates in the last 60 days.

If it is not relevant anymore, please consider closing the pull request. Otherwise, it will be closed automatically in 30 days.

@github-actions github-actions bot added the stale label Sep 14, 2025
@github-actions github-actions bot removed the stale label Sep 20, 2025
Copy link
Owner

@borchero borchero left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sorry for the late review!

Overall question: are imported resources using resource_drift? 🤔 could you share an example/add a test?

Comment on lines +103 to +107
function queryChanges(changes: StructuredPlanChange[], changeKind: string): string[] {
return changes
.filter((r) => r.change.actions.toString() === [changeKind].toString())
.map((r) => r.address)
}
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Let's generalize this and use changeKind: string[] s.t. we can also use this for recreated changes

Comment on lines +137 to +143
const createdResources = queryChanges(
structuredPlan.resource_changes || [],
'create'
).concat(queryChanges(
structuredPlan.resource_drift || [],
'create',
))
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can we create a new function which takes care of the concatenation s.t. we don't have to do this multiple times?

@mj3c
Copy link

mj3c commented Dec 29, 2025

Hello @borchero ! Any plans on wrapping up this change so that the action also supports showing resource imports from import blocks?

@borchero
Copy link
Owner

@mj3c I might only get to this in a couple weeks. Feel free to continue this PR yourself though and I'll be able to review :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Incorrect "No Changes" Comment in TF Plan with Imports but No Other Actions

3 participants