Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

r/aws_servicecatalog_product: provisioning_artifact_parameters changes force replacement #31061

Merged
merged 3 commits into from
Apr 28, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 7 additions & 0 deletions .changelog/31061.txt
Original file line number Diff line number Diff line change
@@ -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.
```
6 changes: 6 additions & 0 deletions internal/service/servicecatalog/product.go
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand All @@ -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",
Expand All @@ -117,6 +122,7 @@ func ResourceProduct() *schema.Resource {
"type": {
Type: schema.TypeString,
Optional: true,
ForceNew: true,
ValidateFunc: validation.StringInSlice(servicecatalog.ProvisioningArtifactType_Values(), false),
},
},
Expand Down
5 changes: 0 additions & 5 deletions internal/service/servicecatalog/product_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down