Skip to content
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
7 changes: 6 additions & 1 deletion .rwx/package.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,8 +27,13 @@ tasks:
env:
DIRECTORY: ${{ init.directory }}

- key: go
call: golang/install 1.1.5
with:
go-version: "1.23.3"

- key: build
use: code
use: [go, code]
run: |
cd $DIRECTORY
if [[ -f build/run.sh ]]; then
Expand Down
24 changes: 12 additions & 12 deletions aws/assume-role/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ tasks:
call: aws/install-cli 1.0.8

- key: assume-role
call: aws/assume-role 2.0.7
call: aws/assume-role 2.0.8
with:
region: us-east-2
role-to-assume: arn:aws:iam::your-account-id:role/your-role
Expand All @@ -30,7 +30,7 @@ tasks:
call: aws/install-cli 1.0.8

- key: assume-role
call: aws/assume-role 2.0.7
call: aws/assume-role 2.0.8
with:
region: us-east-2
role-to-assume: arn:aws:iam::your-account-id:role/your-role
Expand All @@ -50,7 +50,7 @@ tasks:
call: aws/install-cli 1.0.8

- key: assume-role
call: aws/assume-role 2.0.7
call: aws/assume-role 2.0.8
with:
region: us-east-2
role-to-assume: arn:aws:iam::your-account-id:role/your-role
Expand All @@ -73,7 +73,7 @@ tasks:
call: aws/install-cli 1.0.8

- key: assume-role
call: aws/assume-role 2.0.7
call: aws/assume-role 2.0.8
with:
region: us-east-2
role-to-assume: arn:aws:iam::your-account-id:role/your-role
Expand All @@ -96,7 +96,7 @@ tasks:
call: aws/install-cli 1.0.8

- key: assume-role
call: aws/assume-role 2.0.7
call: aws/assume-role 2.0.8
with:
region: us-east-2
role-to-assume: arn:aws:iam::your-account-id:role/your-role
Expand All @@ -119,14 +119,14 @@ tasks:
call: aws/install-cli 1.0.8

- key: assume-role
call: aws/assume-role 2.0.7
call: aws/assume-role 2.0.8
with:
oidc-token: ${{ vaults.your-vault.oidc.your-token }}
region: us-east-2
role-to-assume: arn:aws:iam::your-account-id:role/your-role

- key: chained-role
call: aws/assume-role 2.0.7
call: aws/assume-role 2.0.8
with:
region: us-east-2
role-to-assume: arn:aws:iam::your-account-id:role/your-other-role
Expand All @@ -149,14 +149,14 @@ tasks:
call: aws/install-cli 1.0.8

- key: assume-role
call: aws/assume-role 2.0.7
call: aws/assume-role 2.0.8
with:
region: us-east-2
role-to-assume: arn:aws:iam::your-account-id:role/your-role
profile-name: your-profile

- key: chained-role
call: aws/assume-role 2.0.7
call: aws/assume-role 2.0.8
with:
source-profile-name: your-profile
region: us-east-2
Expand Down Expand Up @@ -210,7 +210,7 @@ tasks:
call: aws/install-cli 1.0.8

- key: assume-role
call: aws/assume-role 2.0.7
call: aws/assume-role 2.0.8
with:
region: us-east-2
role-to-assume: arn:aws:iam::your-account-id:role/your-role
Expand Down Expand Up @@ -261,14 +261,14 @@ tasks:
call: aws/install-cli 1.0.8

- key: assume-role
call: aws/assume-role 2.0.7
call: aws/assume-role 2.0.8
with:
oidc-token: ${{ vaults.your-vault.oidc.your-token }}
region: us-east-2
role-to-assume: arn:aws:iam::your-account-id:role/your-role

- key: chain-role
call: aws/assume-role 2.0.7
call: aws/assume-role 2.0.8
with:
region: us-east-2
role-to-assume: arn:aws:iam::your-account-id:role/your-other-role
Expand Down
93 changes: 0 additions & 93 deletions aws/assume-role/rwx-ci-cd.template.yml

This file was deleted.

2 changes: 1 addition & 1 deletion aws/assume-role/rwx-package.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
name: aws/assume-role
version: 2.0.7
version: 2.0.8
description: Assume an AWS role
source_code_url: https://github.com/rwx-cloud/packages/tree/main/aws/assume-role
issue_tracker_url: https://github.com/rwx-cloud/packages/issues
Expand Down
98 changes: 98 additions & 0 deletions aws/assume-role/rwx-test.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,98 @@
base:
image: ${{ init.base-image }}
config: ${{ init.base-config }}

tasks:
- key: install-cli
call: aws/install-cli 1.0.8

- key: test--defaults
call: ${{ init.package-digest }}
with:
region: us-east-2
role-to-assume: ${{ vaults.rwx_packages_aws_assume_role_testing.secrets.role-to-assume }}

- key: test--defaults--assert
use: [install-cli, test--defaults]
run: aws sts get-caller-identity &> /dev/null # avoid leaking account/role info
env:
AWS_OIDC_TOKEN: ${{ vaults.rwx_packages_aws_assume_role_testing.oidc.aws_token }}

- key: test--defaults--skip-auth--assert
use: [install-cli, test--defaults]
run: |
if ! (aws sts get-caller-identity &> /dev/null); then
echo "Not authenticated with AWS."
exit 0
fi
echo "Authenticated with AWS."
exit 1
env:
AWS_SKIP_AUTH: true

- key: test--parallel-group
call: ${{ init.package-digest }}
with:
region: us-east-2
role-to-assume: ${{ vaults.rwx_packages_aws_assume_role_testing.secrets.role-to-assume }}
- key: test--parallel-group--assert
use: [install-cli, test--parallel-group]
parallel: 2
run: |
aws sts get-caller-identity &> /dev/null # avoid leaking account/role info
env:
AWS_OIDC_TOKEN: ${{ vaults.rwx_packages_aws_assume_role_testing.oidc.aws_token }}

- key: test--custom-profile
call: ${{ init.package-digest }}
with:
region: us-east-2
role-to-assume: ${{ vaults.rwx_packages_aws_assume_role_testing.secrets.role-to-assume }}
profile-name: custom
oidc-token-env-var: AWS_OIDC_TOKEN_2
- key: test--multiple-profiles--assert
use: [install-cli, test--defaults, test--custom-profile]
run:
- aws sts get-caller-identity &> /dev/null # avoid leaking account/role info
- aws sts get-caller-identity --profile custom &> /dev/null # avoid leaking account/role info
env:
AWS_OIDC_TOKEN: ${{ vaults.rwx_packages_aws_assume_role_testing.oidc.aws_token }}
AWS_OIDC_TOKEN_2: ${{ vaults.rwx_packages_aws_assume_role_testing.oidc.aws_token }}

- key: test--defaults--role-chain
call: ${{ init.package-digest }}
with:
region: us-east-2
role-to-assume: ${{ vaults.rwx_packages_aws_assume_role_testing.secrets.role-to-chain-assume }}
role-chaining: true
- key: test--defaults--role-chain--assert
use: [install-cli, test--defaults, test--defaults--role-chain]
run: aws sts get-caller-identity &> /dev/null # avoid leaking account/role info
env:
AWS_OIDC_TOKEN: ${{ vaults.rwx_packages_aws_assume_role_testing.oidc.aws_token }}

- key: test--specified-profile-name
call: ${{ init.package-digest }}
with:
region: us-east-2
role-to-assume: ${{ vaults.rwx_packages_aws_assume_role_testing.secrets.role-to-assume }}
profile-name: my-profile
- key: test--specified-profile-name--assert
use: [install-cli, test--specified-profile-name]
run: aws sts get-caller-identity --profile my-profile &> /dev/null # avoid leaking account/role info
env:
AWS_OIDC_TOKEN: ${{ vaults.rwx_packages_aws_assume_role_testing.oidc.aws_token }}

- key: test--specified-profile-name--role-chain
call: ${{ init.package-digest }}
with:
region: us-east-2
role-to-assume: ${{ vaults.rwx_packages_aws_assume_role_testing.secrets.role-to-chain-assume }}
source-profile-name: my-profile
profile-name: my-other-profile
role-chaining: true
- key: test--specified-profile-name--role-chain--assert
use: [install-cli, test--specified-profile-name, test--specified-profile-name--role-chain]
run: aws sts get-caller-identity --profile my-other-profile &> /dev/null # avoid leaking account/role info
env:
AWS_OIDC_TOKEN: ${{ vaults.rwx_packages_aws_assume_role_testing.oidc.aws_token }}
4 changes: 2 additions & 2 deletions aws/install-cli/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,15 +5,15 @@ To install the latest version of the AWS CLI:
```yaml
tasks:
- key: aws-cli
call: aws/install-cli 1.0.9
call: aws/install-cli 1.0.10
```

To install a specific version of the AWS CLI (only v2 of the AWS CLI is supported):

```yaml
tasks:
- key: aws-cli
call: aws/install-cli 1.0.9
call: aws/install-cli 1.0.10
with:
cli-version: "2.15.13"
```
Expand Down
28 changes: 0 additions & 28 deletions aws/install-cli/rwx-ci-cd.config.yml

This file was deleted.

15 changes: 0 additions & 15 deletions aws/install-cli/rwx-ci-cd.template.yml

This file was deleted.

2 changes: 1 addition & 1 deletion aws/install-cli/rwx-package.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
name: aws/install-cli
version: 1.0.9
version: 1.0.10
description: Install the AWS CLI
source_code_url: https://github.com/rwx-cloud/packages/tree/main/aws/install-cli
issue_tracker_url: https://github.com/rwx-cloud/packages/issues
Expand Down
Loading