Skip to content

Commit

Permalink
chore: liters
Browse files Browse the repository at this point in the history
  • Loading branch information
johnsonaj committed Jun 24, 2024
1 parent 413025b commit a856ac7
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions internal/service/controltower/control.go
Original file line number Diff line number Diff line change
Expand Up @@ -150,14 +150,14 @@ func resourceControlRead(ctx context.Context, d *schema.ResourceData, meta inter
output, err = findEnabledControlByARN(ctx, conn, v.(string))
} else {
// backwards compatibility if ARN is not set from existing state
parts, err := flex.ExpandResourceId(d.Id(), controlResourceIDPartCount, false)
if err != nil {
parts, internalErr := flex.ExpandResourceId(d.Id(), controlResourceIDPartCount, false)
if internalErr != nil {
return sdkdiag.AppendFromErr(diags, err)
}

targetIdentifier, controlIdentifier := parts[0], parts[1]
out, err := findEnabledControlByTwoPartKey(ctx, conn, targetIdentifier, controlIdentifier)
if err != nil {
out, internalErr := findEnabledControlByTwoPartKey(ctx, conn, targetIdentifier, controlIdentifier)
if internalErr != nil {
return sdkdiag.AppendErrorf(diags, "reading ControlTower Control (%s): %s", d.Id(), err)
}

Expand Down

0 comments on commit a856ac7

Please sign in to comment.