Last active
June 9, 2019 12:48
-
-
Save t04glovern/f6f7b7d02501b7e1147975b4aee76ae0 to your computer and use it in GitHub Desktop.
IAM User - cloudformation - route53 - GetAccess
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
# Wait for stack to finish creating | |
aws cloudformation wait stack-create-complete --stack-name iam-route53-user | |
# Get AccessKey to variable | |
ACCESS_KEY=$(aws cloudformation describe-stacks --stack-name iam-route53-user \ | |
--query 'Stacks[0].Outputs[?OutputKey==`AccessKey`].OutputValue' \ | |
--output text) | |
# Get SecretKey to variable | |
SECRET_KEY=$(aws cloudformation describe-stacks --stack-name iam-route53-user \ | |
--query 'Stacks[0].Outputs[?OutputKey==`SecretKey`].OutputValue' \ | |
--output text) | |
# Save external-dns.yaml file with credentials | |
tee <<EOF >./external-dns.yaml | |
provider: aws | |
aws: | |
secretKey: '$SECRET_KEY' | |
accessKey: '$ACCESS_KEY' | |
rbac: | |
create: true | |
EOF |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment