$ brew tap JamesChung/tap
$ brew install JamesChung/tap/cprl
$ go install github.com/JamesChung/cprl@latest
This will build and install the binary into your
~/.local/bin
. Make sure you have~/.local/bin
in yourPATH
.
$ make local
cprl credentials assume
will prompt you for a role ARN and session name and will configure an AWS profile based on the name you provide it (or you could provide the same information via flags). You can combinecprl credentials assume
withcprl credentials output
and make that AWS profile your current active session.
$ cprl --aws-profile=main credentials assume --role-arn=arn:aws:iam::010203040506:role/dev --session-name=cprl --output-profile=dev
$ source <(cprl credentials output --aws-profile=dev)
$ aws sts get-caller-identity
{
"UserId": "TAG0YY70NST6IUO5KA5XB:cprl",
"Account": "010203040506",
"Arn": "arn:aws:sts::010203040506:assumed-role/dev/cprl"
}
cprl console open --aws-profile=dev
will open your default web browser to the AWS console based on the specified AWS profile.
The documentation for each command and sub-command can be found in ./docs.
cprl
will first search for acprl.yaml
file in the current working directory. If not found it will search in the user's home.config/
directory as.config/cprl/cprl.yaml
. If neither is foundcprl
will prompt you if you'd like it to create acprl.yaml
file for you with a template. You will still need to provide it your preferred values after creation.
# cprl will always default to this profile if `--profile` is not set
default:
# profile wide configs
config:
# the default aws profile used unless overrode via `--aws-profile` flag
aws-profile: <profile name>
# individual service level configurations
services:
console:
gov-cloud: true | false
codecommit:
repositories:
- <repo name>
- <repo name>
- <repo name>
<custom profile>:
config:
aws-profile: <profile name>
services:
codecommit:
repositories:
- <repo name>
- <repo name>
- <repo name>
default:
config:
aws-profile: default
services:
codecommit:
repositories:
- example-repo
- other-example-repo
secondary:
config:
aws-profile: dev
services:
codecommit:
repositories:
- dev-example-repo