Skip to content

Commit 2ac7048

Browse files
committed
feat: add DigitalOcean authentication to tf-diff-checks
The tf-diff-checks reusable workflow lists digitalocean as a supported provider but had no auth branch for it, so terraform plan against DO resources fails without credentials. Add a DIGITALOCEAN_TOKEN secret input and a conditional step that exports it to GITHUB_ENV when provider=digitalocean, mirroring the existing aws / azurerm / gcp branches.
1 parent f1ee54f commit 2ac7048

1 file changed

Lines changed: 7 additions & 0 deletions

File tree

.github/workflows/tf-diff-checks.yml

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -74,6 +74,9 @@ on:
7474
SERVICE_ACCOUNT:
7575
required: false
7676
description: 'The service account to be used'
77+
DIGITALOCEAN_TOKEN:
78+
required: false
79+
description: 'DigitalOcean API token used by the DigitalOcean Terraform provider.'
7780

7881
jobs:
7982
terraform-plan-diff:
@@ -121,6 +124,10 @@ jobs:
121124
access_token_lifetime: ${{ inputs.access_token_lifetime }}
122125
project_id: ${{ inputs.project_id }}
123126

127+
- name: 🌊 Configure DigitalOcean Credentials
128+
if: ${{ inputs.provider == 'digitalocean' }}
129+
run: echo "DIGITALOCEAN_TOKEN=${{ secrets.DIGITALOCEAN_TOKEN }}" >> "$GITHUB_ENV"
130+
124131
- name: 🚀 Terraform Init (PR branch)
125132
working-directory: ${{ inputs.terraform_directory }}
126133
run: terraform init

0 commit comments

Comments
 (0)