diff --git a/internal/service/datazone/environment_blueprint_configuration.go b/internal/service/datazone/environment_blueprint_configuration.go index b0accf0917a0..d6dbfb6925ff 100644 --- a/internal/service/datazone/environment_blueprint_configuration.go +++ b/internal/service/datazone/environment_blueprint_configuration.go @@ -67,6 +67,10 @@ func (r *environmentBlueprintConfigurationResource) Schema(ctx context.Context, CustomType: fwtypes.MapOfMapOfStringType, Optional: true, }, + "global_parameters": schema.MapAttribute{ + CustomType: fwtypes.MapOfStringType, + Optional: true, + }, }, } } @@ -240,4 +244,5 @@ type environmentBlueprintConfigurationResourceModel struct { ManageAccessRoleARN fwtypes.ARN `tfsdk:"manage_access_role_arn"` ProvisioningRoleARN fwtypes.ARN `tfsdk:"provisioning_role_arn"` RegionalParameters fwtypes.MapOfMapOfString `tfsdk:"regional_parameters"` + GlobalParameters fwtypes.MapOfString `tfsdk:"global_parameters"` } diff --git a/internal/service/datazone/environment_blueprint_configuration_test.go b/internal/service/datazone/environment_blueprint_configuration_test.go index 7263d669bf78..79a882c6c653 100644 --- a/internal/service/datazone/environment_blueprint_configuration_test.go +++ b/internal/service/datazone/environment_blueprint_configuration_test.go @@ -431,3 +431,58 @@ resource "aws_datazone_environment_blueprint_configuration" "test" { `, region, key, value), ) } + +func testAccEnvironmentBlueprintConfigurationConfig_global_parameters(domainName, key, value string) string { + return acctest.ConfigCompose( + testAccEnvironmentBlueprintDataSourceConfig_basic(domainName), + fmt.Sprintf(` +resource "aws_datazone_environment_blueprint_configuration" "test" { + domain_id = aws_datazone_domain.test.id + environment_blueprint_id = data.aws_datazone_environment_blueprint.test.id + enabled_regions = [] + + global_parameters = { + %[1]q = %[2]q + } +} +`, key, value), + ) +} +func TestAccDataZoneEnvironmentBlueprintConfiguration_global_parameters(t *testing.T) { + ctx := acctest.Context(t) + var environmentblueprintconfiguration datazone.GetEnvironmentBlueprintConfigurationOutput + domainName := sdkacctest.RandomWithPrefix(acctest.ResourcePrefix) + resourceName := "aws_datazone_environment_blueprint_configuration.test" + + resource.ParallelTest(t, resource.TestCase{ + PreCheck: func() { + acctest.PreCheck(ctx, t) + testAccPreCheck(ctx, t) + }, + ErrorCheck: acctest.ErrorCheck(t, names.DataZoneServiceID), + ProtoV5ProviderFactories: acctest.ProtoV5ProviderFactories, + CheckDestroy: testAccCheckEnvironmentBlueprintConfigurationDestroy(ctx), + Steps: []resource.TestStep{ + { + Config: testAccEnvironmentBlueprintConfigurationConfig_global_parameters( + domainName, + "quickSightVPCConnectionRoleArn", + "arn:aws:iam::123456789012:role/example", + ), + Check: resource.ComposeTestCheckFunc( + testAccCheckEnvironmentBlueprintConfigurationExists(ctx, resourceName, &environmentblueprintconfiguration), + resource.TestCheckResourceAttrSet(resourceName, "environment_blueprint_id"), + resource.TestCheckResourceAttr(resourceName, "global_parameters.%", "1"), + resource.TestCheckResourceAttr(resourceName, "global_parameters.quickSightVPCConnectionRoleArn", "arn:aws:iam::123456789012:role/example"), + ), + }, + { + ResourceName: resourceName, + ImportState: true, + ImportStateVerify: true, + ImportStateIdFunc: testAccEnvironmentBlueprintConfigurationImportStateIdFunc(resourceName), + ImportStateVerifyIdentifierAttribute: "environment_blueprint_id", + }, + }, + }) +}