-
-
Notifications
You must be signed in to change notification settings - Fork 33
Expand file tree
/
Copy pathatmos-pro-terraform-apply.yaml
More file actions
65 lines (57 loc) · 1.87 KB
/
atmos-pro-terraform-apply.yaml
File metadata and controls
65 lines (57 loc) · 1.87 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 Terraform Apply
run-name: apply ${{ inputs.component }}/${{ inputs.stack }}/${{ inputs.atmos_pro_run_id}}
on:
workflow_dispatch:
inputs:
atmos_pro_run_id:
description: "Atmos Pro Run ID"
type: string
sha:
description: "Commit SHA"
type: string
component:
description: "Component"
required: true
type: string
stack:
description: "Stack"
required: true
type: string
github_environment:
description: "GitHub Environment"
required: true
type: string
# Avoid running the same stack in parallel mode (from different workflows)
# This applied to across workflows to both plan and apply
concurrency:
group: "${{ inputs.stack }}-${{ inputs.component }}"
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-apply:
name: ${{ inputs.component }}-${{ inputs.stack }}
# The GitHub environment is defined in Atmos Pro settings.
# Typically this is <tenant>-<stage>
environment: ${{ inputs.github_environment }}
runs-on:
- "runs-on=${{ github.run_id }}"
- "runner=terraform"
- "tag=${{ inputs.component }}-${{ inputs.stack }}"
- "private=true"
steps:
- uses: runs-on/action@v1
- uses: unfor19/install-aws-cli-action@v1
- name: Apply Atmos Component
uses: cloudposse/github-action-atmos-terraform-apply@v6
env:
ATMOS_PROFILE: "github-apply"
with:
# Atmos Pro args
component: ${{ inputs.component }}
stack: ${{ inputs.stack }}
sha: ${{ inputs.sha }}
# Atmos required configuration
atmos-version: ${{ vars.ATMOS_VERSION }}
atmos-config-path: ${{ vars.ATMOS_CONFIG_PATH }}