diff --git a/.changelog/31061.txt b/.changelog/31061.txt new file mode 100644 index 000000000000..80372ebb6a20 --- /dev/null +++ b/.changelog/31061.txt @@ -0,0 +1,7 @@ +```release-note:bug +resource/aws_servicecatalog_product: Changes to `provisioning_artifact_parameters` arguments now properly trigger a replacement +``` + +```release-note:breaking-change +resource/aws_servicecatalog_product: Changes to any `provisioning_artifact_parameters` arguments now properly trigger a replacement. This fixes incorrect behavior, but may technically be breaking for configurations expecting non-functional in-place updates. +``` diff --git a/internal/service/servicecatalog/product.go b/internal/service/servicecatalog/product.go index c786ff97b775..f7ca32bc2560 100644 --- a/internal/service/servicecatalog/product.go +++ b/internal/service/servicecatalog/product.go @@ -88,19 +88,23 @@ func ResourceProduct() *schema.Resource { "description": { Type: schema.TypeString, Optional: true, + ForceNew: true, }, "disable_template_validation": { Type: schema.TypeBool, Optional: true, + ForceNew: true, Default: false, }, "name": { Type: schema.TypeString, Optional: true, + ForceNew: true, }, "template_physical_id": { Type: schema.TypeString, Optional: true, + ForceNew: true, ExactlyOneOf: []string{ "provisioning_artifact_parameters.0.template_url", "provisioning_artifact_parameters.0.template_physical_id", @@ -109,6 +113,7 @@ func ResourceProduct() *schema.Resource { "template_url": { Type: schema.TypeString, Optional: true, + ForceNew: true, ExactlyOneOf: []string{ "provisioning_artifact_parameters.0.template_url", "provisioning_artifact_parameters.0.template_physical_id", @@ -117,6 +122,7 @@ func ResourceProduct() *schema.Resource { "type": { Type: schema.TypeString, Optional: true, + ForceNew: true, ValidateFunc: validation.StringInSlice(servicecatalog.ProvisioningArtifactType_Values(), false), }, }, diff --git a/internal/service/servicecatalog/product_test.go b/internal/service/servicecatalog/product_test.go index 8809ef4cb822..63fd4324099f 100644 --- a/internal/service/servicecatalog/product_test.go +++ b/internal/service/servicecatalog/product_test.go @@ -275,11 +275,6 @@ resource "aws_s3_bucket" "test" { force_destroy = true } -resource "aws_s3_bucket_acl" "test" { - bucket = aws_s3_bucket.test.id - acl = "private" -} - resource "aws_s3_object" "test" { bucket = aws_s3_bucket.test.id key = "%[1]s.json"