Skip to content

Commit 0ca9b00

Browse files
committed
Fix: Don't break the in your account workflow
1 parent 3d3af56 commit 0ca9b00

4 files changed

Lines changed: 8 additions & 15 deletions

File tree

cluster/eksctl/access-entries.yaml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
accessEntries:
2+
- principalARN: ${RESOURCE_CODEBUILD_ROLE_ARN}
3+
accessPolicies:
4+
- policyARN: "arn:aws:eks::aws:cluster-access-policy/AmazonEKSClusterAdminPolicy"
5+
accessScope:
6+
type: cluster

cluster/eksctl/cluster-auto.yaml

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -23,10 +23,3 @@ autoModeConfig:
2323
accessConfig:
2424
authenticationMode: API
2525
bootstrapClusterCreatorAdminPermissions: true
26-
accessEntries:
27-
- principalARN: ${RESOURCE_CODEBUILD_ROLE_ARN}
28-
accessPolicies:
29-
- policyARN: "arn:aws:eks::aws:cluster-access-policy/AmazonEKSClusterAdminPolicy"
30-
accessScope:
31-
type: cluster
32-

cluster/eksctl/cluster.yaml

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -44,9 +44,3 @@ remoteNetworkConfig:
4444
accessConfig:
4545
authenticationMode: API
4646
bootstrapClusterCreatorAdminPermissions: true
47-
accessEntries:
48-
- principalARN: ${RESOURCE_CODEBUILD_ROLE_ARN}
49-
accessPolicies:
50-
- policyARN: "arn:aws:eks::aws:cluster-access-policy/AmazonEKSClusterAdminPolicy"
51-
accessScope:
52-
type: cluster

hack/create-infrastructure.sh

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ aws eks describe-cluster --name "${EKS_CLUSTER_NAME}" &> /dev/null || cluster_ex
2121

2222
if [ $cluster_exists -ne 0 ] && [[ "$cluster" == "standard" || "$cluster" == "all" ]]; then
2323
echo "Creating cluster ${EKS_CLUSTER_NAME}"
24-
bash $SCRIPT_DIR/exec.sh "${environment}" 'cat /cluster/eksctl/cluster.yaml | envsubst | eksctl create cluster -f -'&
24+
bash $SCRIPT_DIR/exec.sh "${environment}" 'cat /cluster/eksctl/cluster.yaml /cluster/eksctl/access-entries.yaml | envsubst | eksctl create cluster -f -'&
2525
else
2626
echo "Cluster ${EKS_CLUSTER_NAME} already exists"
2727
fi
@@ -31,7 +31,7 @@ aws eks describe-cluster --name "${EKS_CLUSTER_AUTO_NAME}" &> /dev/null || auto_
3131

3232
if [ $auto_cluster_exists -ne 0 ] && [[ "$cluster" == "standard" || "$cluster" == "all" ]]; then
3333
echo "Creating auto mode cluster ${EKS_CLUSTER_AUTO_NAME}"
34-
bash $SCRIPT_DIR/exec.sh "${environment}" 'cat /cluster/eksctl/cluster-auto.yaml | envsubst | eksctl create cluster -f -'&
34+
bash $SCRIPT_DIR/exec.sh "${environment}" 'cat /cluster/eksctl/cluster-auto.yaml /cluster/eksctl/access-entries.yaml | envsubst | eksctl create cluster -f -'&
3535
else
3636
echo "Auto mode cluster ${EKS_CLUSTER_AUTO_NAME} already exists"
3737
fi

0 commit comments

Comments
 (0)