Skip to content

add export; cleanup

add export; cleanup #3

Workflow file for this run

name: Deploy API Infra
on:
push:
branches:
- main
paths:
- "infra/api/**"
jobs:
build-repository:
name: Build Repository
runs-on: ubuntu-latest

Check failure on line 13 in .github/workflows/cd-api-infra.yml

View workflow run for this annotation

GitHub Actions / .github/workflows/cd-api-infra.yml

Invalid workflow file

You have an error in your yaml syntax on line 13
permissions:
contents: read
id-token: write
steps:
- uses: actions/checkout@v3
- uses: hashicorp/setup-terraform@v2
with:
terraform_version: 1.7.1
terraform_wrapper: false
- name: Configure AWS credentials
uses: ./.github/actions/configure-aws-credentials
with:
app_name: analytics
environment: shared
- name: Build Repository
run: |
./bin/terraform-init-and-apply.sh infra/api/build-repository shared
deploy-infra:
name: Deploy Infrastructure
runs-on: ubuntu-latest
strategy:
matrix:
directory: ["database", "service"]
envs: [ "staging", "prod"]
permissions:
contents: read
id-token: write
steps:
- uses: actions/checkout@v3
- uses: hashicorp/setup-terraform@v2
with:
terraform_version: 1.7.1
terraform_wrapper: false
- name: Configure AWS credentials
uses: ./.github/actions/configure-aws-credentials
with:
app_name: api
environment: shared
- name: Terraform Init and Apply
run: |
export TF_CLI_ARGS="-input=false -auto-approve"
./bin/terraform-init-and-apply.sh infra/api/${{ matrix.directory }} ${{ matrix.envs }}