Skip to content

Commit bfb1249

Browse files
committed
Add crossplane IAM Roles for control plane nodes
1 parent 88ee5ea commit bfb1249

File tree

3 files changed

+3
-3
lines changed

3 files changed

+3
-3
lines changed

helm/cluster-aws/templates/_aws_cluster.tpl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -255,7 +255,7 @@ spec:
255255
{{- end }}
256256
sshKeyName: ssh-key
257257
s3Bucket:
258-
controlPlaneIAMInstanceProfile: control-plane-{{ include "resource.default.name" $ }}
258+
controlPlaneIAMInstanceProfile: {{ include "resource.default.name" $ }}-control-plane
259259
name: {{ include "aws-region" . }}-capa-{{ include "resource.default.name" $ }}
260260
nodesIAMInstanceProfiles:
261261
- {{ include "resource.default.name" $ }}-worker

helm/cluster-aws/templates/crossplane-iam-role-control-plane.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ spec:
1515
{
1616
"Effect": "Allow",
1717
"Principal": {
18-
"Service": "ec2.amazonaws.com{{- if hasPrefix "cn-" .Values.awsRegion }}.cn{{- end }}"
18+
"Service": "ec2.amazonaws.com{{- if hasPrefix "cn-" (include "aws-region" .) }}.cn{{- end }}"
1919
},
2020
"Action": "sts:AssumeRole"
2121
}

helm/cluster-aws/templates/crossplane-iam-role-worker.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ spec:
1515
{
1616
"Effect": "Allow",
1717
"Principal": {
18-
"Service": "ec2.amazonaws.com{{- if hasPrefix "cn-" .Values.awsRegion }}.cn{{- end }}"
18+
"Service": "ec2.amazonaws.com{{- if hasPrefix "cn-" (include "aws-region" .) }}.cn{{- end }}"
1919
},
2020
"Action": "sts:AssumeRole"
2121
}

0 commit comments

Comments
 (0)