Skip to content

Commit

Permalink
Merge pull request #19454 from hashicorp/useAlreadyProvidedSAarn
Browse files Browse the repository at this point in the history
r/eks_addon: Use service account
  • Loading branch information
YakDriver authored May 20, 2021
2 parents 38f37d7 + cdfd2ed commit 9e69307
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion aws/resource_aws_eks_addon.go
Original file line number Diff line number Diff line change
Expand Up @@ -241,7 +241,9 @@ func resourceAwsEksAddonUpdate(ctx context.Context, d *schema.ResourceData, meta
input.AddonVersion = aws.String(d.Get("addon_version").(string))
}

if d.HasChange("service_account_role_arn") {
// If service account role ARN is already provided, use it. Otherwise, the add-on uses
// permissions assigned to the node IAM role.
if d.HasChange("service_account_role_arn") || d.Get("service_account_role_arn").(string) != "" {
input.ServiceAccountRoleArn = aws.String(d.Get("service_account_role_arn").(string))
}

Expand Down

0 comments on commit 9e69307

Please sign in to comment.