Skip to content

Commit 7e08601

Browse files
committed
r/aws_rds_cluster_role_association: Only send 'feature_name' if it's configured.
1 parent d6fcf29 commit 7e08601

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

internal/service/rds/cluster_role_association.go

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -72,10 +72,13 @@ func resourceClusterRoleAssociationCreate(ctx context.Context, d *schema.Resourc
7272
id := clusterRoleAssociationCreateResourceID(dbClusterID, roleARN)
7373
input := rds.AddRoleToDBClusterInput{
7474
DBClusterIdentifier: aws.String(dbClusterID),
75-
FeatureName: aws.String(d.Get("feature_name").(string)),
7675
RoleArn: aws.String(roleARN),
7776
}
7877

78+
if v, ok := d.GetOk("feature_name"); ok {
79+
input.FeatureName = aws.String(v.(string))
80+
}
81+
7982
_, err := tfresource.RetryWhenIsA[any, *types.InvalidDBClusterStateFault](ctx, d.Timeout(schema.TimeoutCreate), func(ctx context.Context) (any, error) {
8083
return conn.AddRoleToDBCluster(ctx, &input)
8184
})

0 commit comments

Comments
 (0)