Skip to content

Commit 8e6947d

Browse files
authored
Merge pull request #43382 from hashicorp/b-aws_datazone_environment_blueprint_configuration.regional_parameters-regression
r/aws_datazone_environment_blueprint_configuration: Fix `Inappropriate value for attribute "regional_parameters"` errors
2 parents 2fe66ea + 882caec commit 8e6947d

File tree

9 files changed

+229
-333
lines changed

9 files changed

+229
-333
lines changed

.changelog/43382.txt

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
```release-note:bug
2+
resource/aws_datazone_environment_blueprint_configuration: Fix `Inappropriate value for attribute "regional_parameters"` errors during planning. This fixes a regression introduced in [v6.0.0](https://github.com/hashicorp/terraform-provider-aws/blob/main/CHANGELOG.md#600-june-18-2025)
3+
```

internal/framework/types/mapof.go

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,10 @@ var (
2020
)
2121

2222
var (
23-
// MapOfStringType is a custom type used for defining a Map of strings.
23+
// MapOfMapOfStringType is a custom type used for defining a map[string]map[string]string.
24+
MapOfMapOfStringType = mapTypeOf[MapOfString]{basetypes.MapType{ElemType: MapOfStringType}}
25+
26+
// MapOfStringType is a custom type used for defining a map[string]string.
2427
MapOfStringType = mapTypeOf[basetypes.StringValue]{basetypes.MapType{ElemType: basetypes.StringType{}}}
2528
)
2629

@@ -101,7 +104,8 @@ type MapValueOf[T attr.Value] struct {
101104
}
102105

103106
type (
104-
MapOfString = MapValueOf[basetypes.StringValue]
107+
MapOfMapOfString = MapValueOf[MapOfString]
108+
MapOfString = MapValueOf[basetypes.StringValue]
105109
)
106110

107111
func (v MapValueOf[T]) Equal(o attr.Value) bool {

internal/service/bcmdataexports/export.go

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -117,8 +117,7 @@ func exportDataQuerySchema(ctx context.Context) schema.ListNestedBlock {
117117
Required: true,
118118
},
119119
"table_configurations": schema.MapAttribute{
120-
// map[string]map[string]string
121-
CustomType: fwtypes.NewMapTypeOf[fwtypes.MapValueOf[types.String]](ctx),
120+
CustomType: fwtypes.MapOfMapOfStringType,
122121
Optional: true,
123122
PlanModifiers: []planmodifier.Map{
124123
mapplanmodifier.UseStateForUnknown(),
@@ -496,8 +495,8 @@ type exportData struct {
496495
}
497496

498497
type dataQueryData struct {
499-
QueryStatement types.String `tfsdk:"query_statement"`
500-
TableConfigurations fwtypes.MapValueOf[fwtypes.MapValueOf[types.String]] `tfsdk:"table_configurations"`
498+
QueryStatement types.String `tfsdk:"query_statement"`
499+
TableConfigurations fwtypes.MapOfMapOfString `tfsdk:"table_configurations"`
501500
}
502501

503502
type s3OutputConfigurations struct {

internal/service/datazone/domain.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -153,7 +153,7 @@ func (r *domainResource) Create(ctx context.Context, request resource.CreateRequ
153153
)
154154
outputRaw, err := tfresource.RetryWhenAWSErrCodeContains(ctx, timeout, func() (any, error) {
155155
return conn.CreateDomain(ctx, &input)
156-
}, ErrorCodeAccessDenied)
156+
}, errCodeAccessDenied)
157157

158158
if err != nil {
159159
response.Diagnostics.AddError(fmt.Sprintf("creating DataZone Domain (%s)", name), err.Error())

0 commit comments

Comments
 (0)