Skip to main content
This guide covers the Terraform deployment workflow for Soundcheck infrastructure.

GitHub Actions workflow

The terraform-apply.yml workflow automates infrastructure deployment.

Workflow steps

  1. Terraform Init - Initialize with environment-specific backend
  2. tfsec Scan - Security scanning (fails on HIGH severity)
  3. Format Check - Validate code formatting
  4. Generate tfvars - Pull secrets from Key Vault
  5. Terraform Plan - Show proposed changes
  6. Terraform Apply - Apply changes (only on merge)

Triggers


Manual deployment

For exceptional cases, use the workflow_dispatch trigger:
1

Navigate to Actions

Go to Actions → Terraform Apply
2

Run workflow

Click Run workflow
3

Configure

  • Select branch
  • Select environment
  • Choose whether to apply after plan
4

Monitor

Watch the workflow execution

Sandbox environment

Use sandbox for testing infrastructure changes before committing.

Step 1: connect to Azure

Step 2: create sandbox.tfvars

Edit sandbox.tfvars:
  • env → "sbx" (or similar unique prefix)
  • subscription_id → your subscription ID

Step 3: provision base resources

Step 4: add secrets

Populate Key Vault with secrets via Azure Portal or CLI.

Step 5: provision remaining resources

Sandbox resources cost money. Destroy when done:

Environment commands

Dev environment

QA environment

Production environment


Quick reference


State management


Troubleshooting

You likely don’t have Key Vault Secrets Officer access. Request access and repopulate the tfvars file.
Break the blob lease:
Verify login and subscription:
Upgrade modules:

Review requirements

The branch-enforcement action prevents unauthorized merges.