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{