[wip]provider: provider_meta support with structural attributes
#44868
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.
Description
This PR will not be merged. It is only intended to record the attempted implementation of
provider_metawith structural attributes, and document why this approach does not work within the current constraints of the AWS provider.Background
The AWSCC provider already has a working implementation of
provider_metasupport in which the schema contains a singleuser_agentattribute that is a list of objects. This schema matches the existing provider-level configuration attribute of the same name. Notably, the AWSCC provider uses only Terraform Plugin Framework and operates with Terraform Protocol V6.In an ideal scenario, the standard provider would match the rough shape of the schema, but replace list attributes with blocks.
However, the schema cannot be written in this way as Terraform Protocol V5 doesn't support structural attributes, meaning an attribute with this shape can't be defined in the protocol at all.
Additionally, even if the provider were upgraded to Terraform Protocol V6, Terraform Plugin Framework lacks support for blocks in the
metaschema.Schemastruct, making it impossible to match the schema shape between the Plugin SDK V2 and Plugin Framework providers as required byterraform-plugin-mux.1Footnotes
This particular limitation means that the standard provider will effectively never be able to implement a structural attribute in
provider_meta. Eliminating muxing from the provider would require thousands of Plugin SDK V2 based resources to be migrated to Plugin Framework. There is no currently available tooling which makes this feasible at the scale of the AWS provider. ↩