Slide 24
Slide 24 text
Argo CD plugin(helmfile)のAWSクロスアカウント対応
24
unset AWS_SESSION_TOKEN AWS_ACCESS_KEY_ID AWS_SECRET_ACCESS_KEY;
read AWS_ACCESS_KEY_ID AWS_SECRET_ACCESS_KEY AWS_SESSION_TOKEN<<< $(aws sts assume-role
--role-arn $ARGOCD_ENV_REPO_SERVER_IAM_ROLE_ARN --role-session-name argocd-reposerver --output
json | jq -r '.Credentials | [.AccessKeyId ,.SecretAccessKey ,.SessionToken] | join(" ")' );
export AWS_ACCESS_KEY_ID AWS_SECRET_ACCESS_KEY AWS_SESSION_TOKEN;
env > /tmp/env;
helmfile -q --environment $ARGOCD_ENV_HELMFILE_ENV template --include-crds --skip-tests
● pluginのスクリプト部分に下記を記載(ワンライナーで)