-
Notifications
You must be signed in to change notification settings - Fork 289
54 lines (51 loc) · 1.81 KB
/
test-ci-bootstrap-oss.yml
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
name: test-ci-bootstrap-oss
permissions:
contents: read
on:
pull_request:
branches:
- main
paths:
- enos/ci/**
- .github/workflows/test-ci-bootstrap-oss.yml
push:
branches:
- main
paths:
- enos/ci/**
- .github/workflows/test-ci-bootstrap-oss.yml
jobs:
bootstrap-ci-oss:
if: ${{ github.event.repository.name == 'boundary' }}
env:
TF_WORKSPACE: "boundary-ci-enos-bootstrap"
TF_VAR_repository: boundary
TF_VAR_aws_ssh_public_key: ${{ secrets.SSH_KEY_PUBLIC_CI }}
TF_TOKEN_app_terraform_io: ${{ secrets.TF_API_TOKEN }}
runs-on: ${{ fromJSON(vars.RUNNER) }}
steps:
- uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7
- name: Set up Terraform
uses: hashicorp/setup-terraform@a1502cd9e758c50496cc9ac5308c4843bcd56d36 # TSCCR: loading action configs: failed to query HEAD reference: failed to get advertised references: authorization failed
- name: Configure AWS credentials
uses: aws-actions/configure-aws-credentials@e3dd6a429d7300a6a4c196c26e071d42e0343502 # v4.0.2
with:
aws-access-key-id: ${{ secrets.AWS_ACCESS_KEY_ID_CI }}
aws-secret-access-key: ${{ secrets.AWS_SECRET_ACCESS_KEY_CI }}
aws-region: us-east-1
role-to-assume: ${{ secrets.AWS_ROLE_ARN_CI }}
role-skip-session-tagging: true
role-duration-seconds: 3600
- name: Init Terraform
id: tf_init
run: |
terraform -chdir=enos/ci/bootstrap init
- name: Plan Terraform
id: tf_plan
run: |
terraform -chdir=enos/ci/bootstrap plan
- name: Apply Terraform
if: ${{ github.ref == 'refs/heads/main' }}
id: tf_apply
run: |
terraform -chdir=enos/ci/bootstrap apply -auto-approve