Skip to content

Commit

Permalink
r/aws_ses_configuration_set: fix crash when `reputation_metrics_enabl…
Browse files Browse the repository at this point in the history
…ed` is set

Migration of this service to AWS SDK for Go V2 unintentionally introduced an assertion to a pointer to bool, rather than a bool.

```console
% make testacc PKG=ses TESTS=TestAccSESConfigurationSet_
make: Verifying source code with gofmt...
==> Checking that code complies with gofmt requirements...
TF_ACC=1 go1.22.6 test ./internal/service/ses/... -v -count 1 -parallel 20 -run='TestAccSESConfigurationSet_'  -timeout 360m

--- PASS: TestAccSESConfigurationSet_disappears (13.24s)
--- PASS: TestAccSESConfigurationSet_deliveryOptions (15.27s)
--- PASS: TestAccSESConfigurationSet_basic (15.29s)
--- PASS: TestAccSESConfigurationSet_emptyDeliveryOptions (20.05s)
--- PASS: TestAccSESConfigurationSet_sendingEnabled (29.13s)
--- PASS: TestAccSESConfigurationSet_Update_emptyDeliveryOptions (35.44s)
--- PASS: TestAccSESConfigurationSet_reputationMetricsEnabled (37.59s)
--- PASS: TestAccSESConfigurationSet_Update_deliveryOptions (37.92s)
PASS
ok      github.com/hashicorp/terraform-provider-aws/internal/service/ses        43.956s
```
  • Loading branch information
jar-b committed Aug 19, 2024
1 parent 3f8f68d commit dd8b09a
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
3 changes: 3 additions & 0 deletions .changelog/38921.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
```release-note:bug
resource/aws_ses_configuration_set: Fix crash when `reputation_metrics_enabled` is set to `true`
```
2 changes: 1 addition & 1 deletion internal/service/ses/configuration_set.go
Original file line number Diff line number Diff line change
Expand Up @@ -127,7 +127,7 @@ func resourceConfigurationSetCreate(ctx context.Context, d *schema.ResourceData,
if v := d.Get("reputation_metrics_enabled"); v.(bool) {
input := &ses.UpdateConfigurationSetReputationMetricsEnabledInput{
ConfigurationSetName: aws.String(configurationSetName),
Enabled: aws.ToBool(v.(*bool)),
Enabled: v.(bool),
}

_, err := conn.UpdateConfigurationSetReputationMetricsEnabled(ctx, input)
Expand Down

0 comments on commit dd8b09a

Please sign in to comment.