Skip to content

Conversation

austinvalle
Copy link
Member

Related Issue

N/A

Description

This PR hooks up the GetProviderSchema and GetMetadata RPCs and implements the unlinked action schema (along with a couple attributes).

Notes

  • I only implemented a couple attributes, essentially enough to test the full schema (two primitives, one collection, one nested attribute, one nested block). The rest can come in a follow-up PR
  • In the proto5server and proto6server tests, I deleted a ton of duplicate tests. Those tests don't add a ton of value on their own and the schema ones in particular are annoying to update 😆 (perhaps more cleanup/consolidation can come in the future)

Rollback Plan

  • If a change needs to be reverted, we will roll out an update to the code within 7 days.

Changes to Security Controls

No

@austinvalle austinvalle requested a review from a team as a code owner July 11, 2025 13:10
@austinvalle austinvalle added the actions Tracking PRs and issues related to the TF actions work label Jul 11, 2025
Comment on lines +18 to +20
// UnlinkedSchema defines the structure and value types of an unlinked action. An unlinked action
// cannot cause changes to resource state.
type UnlinkedSchema struct {
Copy link
Member Author

@austinvalle austinvalle Jul 11, 2025

Choose a reason for hiding this comment

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

This is where the 3 schema types will differ (and the reason for using an interface instead of a single struct type), so they can introduce specific schema info for each type. Unlinked doesn't actually have any additional info needed, but linked/lifecycle will need information about their linked resources and lifecycle will need an execution order.

https://github.com/hashicorp/terraform-plugin-go/blob/a8477a15f806320c9fe7cf4386d68e758c1c90c8/tfprotov5/internal/tfplugin5/tfplugin5.proto#L317-L321

Copy link
Contributor

@SBGoods SBGoods left a comment

Choose a reason for hiding this comment

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

LGTM! I'm very much in favor on cutting down on the amount of unit tests in the framework

@austinvalle austinvalle merged commit 377d9e3 into main Jul 15, 2025
66 of 68 checks passed
@austinvalle austinvalle deleted the av/action-schema branch July 15, 2025 13:31
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Aug 14, 2025
@austinvalle austinvalle added this to the v1.16.0 milestone Sep 16, 2025
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

actions Tracking PRs and issues related to the TF actions work

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants