-
-
Notifications
You must be signed in to change notification settings - Fork 33
Expand file tree
/
Copy pathatmos-pro-list-instances.yaml
More file actions
65 lines (54 loc) · 1.82 KB
/
atmos-pro-list-instances.yaml
File metadata and controls
65 lines (54 loc) · 1.82 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
name: 👽 Atmos Pro List instances
run-name: list instances
on:
schedule:
- cron: '0 0 * * *'
workflow_dispatch:
# Avoid running the same stack in parallel mode (from different workflows)
# This applied to across workflows to both plan and apply
concurrency:
group: ${{ github.workflow }}
cancel-in-progress: false
permissions:
id-token: write # This is required for requesting the JWT
contents: read # This is required for actions/checkout
jobs:
atmos-list-instances:
name: list instances
runs-on:
- "runs-on=${{ github.run_id }}"
- "runner=small"
- "tag=list-instances"
- "private=false"
steps:
- uses: runs-on/action@v1
- uses: unfor19/install-aws-cli-action@v1
- name: Checkout
uses: actions/checkout@v6
with:
fetch-depth: 0
- name: Set atmos cli config path vars
shell: bash
run: |-
echo "ATMOS_CLI_CONFIG_PATH=$(realpath ${{ vars.ATMOS_CONFIG_PATH }})" >> $GITHUB_ENV
- name: Install Atmos
uses: cloudposse/github-action-setup-atmos@v2
with:
atmos-version: ${{ vars.ATMOS_VERSION }}
token: ${{ github.token }}
install-wrapper: false
# We need to assume AWS credentials to read the Terraform state
- name: Assume Planner Role
uses: aws-actions/configure-aws-credentials@v6
with:
aws-region: "us-east-1"
role-to-assume: "arn:aws:iam::333333333333:role/acme-core-gbl-auto-planner"
role-session-name: "atmos-pro-list-instances"
mask-aws-account-id: "no"
- name: List instances and upload to Atmos Pro
env:
ATMOS_PRO_WORKSPACE_ID: ${{ vars.ATMOS_PRO_WORKSPACE_ID }}
ATMOS_PROFILE: "github-plan"
run: |
atmos list instances \
--upload