From 48bb331394b1aded6d7f064d2ee7e7bda347ba3f Mon Sep 17 00:00:00 2001 From: Alberto Pose Date: Wed, 12 Aug 2026 11:52:32 +0100 Subject: [PATCH] Align Plugin Framework provider block cardinality with SDKv2 The SDKv2 provider schema declares external_credentials and batching with MaxItems: 1. The duplicated Plugin Framework schema constrains neither, so the two halves of the muxed provider disagree on cardinality. Co-Authored-By: Claude Opus 5 (1M context) --- .../terraform/fwprovider/framework_provider.go.tmpl | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/mmv1/third_party/terraform/fwprovider/framework_provider.go.tmpl b/mmv1/third_party/terraform/fwprovider/framework_provider.go.tmpl index c2f79d10de53..0ccbe21f9a17 100644 --- a/mmv1/third_party/terraform/fwprovider/framework_provider.go.tmpl +++ b/mmv1/third_party/terraform/fwprovider/framework_provider.go.tmpl @@ -5,6 +5,7 @@ import ( sdk_schema "github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema" + "github.com/hashicorp/terraform-plugin-framework-validators/listvalidator" "github.com/hashicorp/terraform-plugin-framework-validators/stringvalidator" "github.com/hashicorp/terraform-plugin-framework/datasource" "github.com/hashicorp/terraform-plugin-framework/ephemeral" @@ -230,6 +231,9 @@ func (p *FrameworkProvider) Schema(_ context.Context, _ provider.SchemaRequest, }, Blocks: map[string]schema.Block{ "batching": schema.ListNestedBlock{ + Validators: []validator.List{ + listvalidator.SizeAtMost(1), + }, NestedObject: schema.NestedBlockObject{ Attributes: map[string]schema.Attribute{ "send_after": schema.StringAttribute{ @@ -245,6 +249,9 @@ func (p *FrameworkProvider) Schema(_ context.Context, _ provider.SchemaRequest, }, }, "external_credentials": schema.ListNestedBlock{ + Validators: []validator.List{ + listvalidator.SizeAtMost(1), + }, NestedObject: schema.NestedBlockObject{ Attributes: map[string]schema.Attribute{ "audience": schema.StringAttribute{