Skip to content

Commit

Permalink
Send the PlatformCredential if the PlatformPrincipal has changed
Browse files Browse the repository at this point in the history
  • Loading branch information
rhodrid committed May 19, 2020
1 parent fad999e commit 3dd4c79
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions aws/resource_aws_sns_platform_application.go
Original file line number Diff line number Diff line change
Expand Up @@ -157,6 +157,12 @@ func resourceAwsSnsPlatformApplicationUpdate(d *schema.ResourceData, meta interf
}
}

if d.HasChange("platform_principal") {
// If the principal has changed we must also send the credential, even if it didn't change,
// as they must be specified together in the request.
attributes["PlatformCredential"] = aws.String(d.Get("platform_credential").(string))
}

// Make API call to update attributes
req := &sns.SetPlatformApplicationAttributesInput{
PlatformApplicationArn: aws.String(d.Id()),
Expand Down

0 comments on commit 3dd4c79

Please sign in to comment.