Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

CAPA - changes for AWS china regions #88

Merged
merged 3 commits into from
Mar 12, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions capa-controller-role/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,8 @@ If you don't know what the `INSTALLATION_NAME` value is supposed to be, ask Gian
```
export INSTALLATION_NAME=test
export ROLE_NAME="giantswarm-${INSTALLATION_NAME}-capa-controller"
# for china replace this with proper AWS China account, for AWS Global leave this as it is for all cases
export AWS_ACCOUNT=084190472784

envsubst < ./trusted-entities.json > ${INSTALLATION_NAME}-trusted-entities.json
aws iam create-role --role-name "${ROLE_NAME}" --description "Giant Swarm managed role for k8s cluster creation" --assume-role-policy-document file://${INSTALLATION_NAME}-trusted-entities.json
Expand Down
2 changes: 1 addition & 1 deletion capa-controller-role/eks-controller-policy.json
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@
"iam:CreateServiceLinkedRole"
],
"Resource": [
"arn:aws:iam::*:role/aws-service-role/eks-fargate-pods.amazonaws.com/AWSServiceRoleForAmazonEKSForFargate"
"arn:*:iam::*:role/aws-service-role/eks-fargate-pods.amazonaws.com/AWSServiceRoleForAmazonEKSForFargate"
],
"Condition": {
"StringLike": {
Expand Down
2 changes: 1 addition & 1 deletion capa-controller-role/irsa-operator-policy.json
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@
"s3:PutLifecycleConfiguration",
"s3:PutObjectAcl"
],
"Resource": "arn:aws:s3:::*-g8s-*"
"Resource": "arn:*:s3:::*-g8s-*"
},
{
"Effect": "Allow",
Expand Down
2 changes: 1 addition & 1 deletion capa-controller-role/trusted-entities.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
{
"Effect": "Allow",
"Principal": {
"AWS": "arn:aws:iam::084190472784:user/${INSTALLATION_NAME}-capa-controller"
"AWS": "arn:*:iam::${AWS_ACCOUNT}:user/${INSTALLATION_NAME}-capa-controller"
},
"Action": "sts:AssumeRole",
"Condition": {}
Expand Down