Skip to content
Merged
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
10 changes: 10 additions & 0 deletions actions/deploy-terraform/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,10 @@ inputs:
aws-region:
description: 'The AWS region to deploy to'
required: true
grafana-api-key:
description: 'The Grafana API Key'
required: false
default: ''

runs:
using: "composite"
Expand All @@ -28,12 +32,18 @@ runs:
- name: Terraform Init
id: init
shell: bash
env:
GRAFANA_AUTH: ${{ inputs.grafana-api-key }}
run: terraform -chdir=terraform init -var-file="vars/${{ inputs.environment }}.tfvars" -no-color
- name: Terraform Select Workspace
id: workspace
shell: bash
env:
GRAFANA_AUTH: ${{ inputs.grafana-api-key }}
run: terraform -chdir=terraform workspace select ${{ inputs.environment }}
- name: Terraform Apply
id: apply
shell: bash
env:
GRAFANA_AUTH: ${{ inputs.grafana-api-key }}
run: terraform -chdir=terraform apply -var-file="vars/${{ inputs.environment }}.tfvars" -auto-approve -no-color