fix: create terraform workspaces automatically in shared actions #44

Merged
Sebastian.Boehringer merged 1 commit from fix/terraform-workspace-or-create into main 2026-06-15 06:46:12 +00:00

Hi @Sebastian.Boehringer
This fix applies the workspace handling change in the correct place: the shared Terraform actions.

Problem:

  • repository workflows can pass a Terraform workspace (for example stage or prod)
  • the shared actions previously assumed that the workspace already existed
  • this caused downstream CI/CD failures such as:
    "Workspace 'stage' doesn't exist."

Changes:

  • terraform-apply now uses:
    terraform workspace select -or-create "$TF_WORKSPACE_NAME"
  • terraform-validate now also explicitly selects/creates the requested workspace before running format/validate

Updated files:

  • terraform-apply/action.yml
  • terraform-validate/action.yml

This keeps the fix centralized in the shared-actions repository, so downstream repositories do not need custom workspace bootstrap logic in their workflows.

Hi @Sebastian.Boehringer This fix applies the workspace handling change in the correct place: the shared Terraform actions. Problem: - repository workflows can pass a Terraform workspace (for example `stage` or `prod`) - the shared actions previously assumed that the workspace already existed - this caused downstream CI/CD failures such as: "Workspace 'stage' doesn't exist." Changes: - `terraform-apply` now uses: `terraform workspace select -or-create "$TF_WORKSPACE_NAME"` - `terraform-validate` now also explicitly selects/creates the requested workspace before running format/validate Updated files: - terraform-apply/action.yml - terraform-validate/action.yml This keeps the fix centralized in the shared-actions repository, so downstream repositories do not need custom workspace bootstrap logic in their workflows.
Krishna-Kumar.Kamlendra added 1 commit 2026-06-15 06:42:10 +00:00
fix: create terraform workspaces automatically in shared actions
All checks were successful
Aikido Security PR Check / Aikido Security Scan (pull_request) Successful in 1m5s
validate-shared-actions / validate-shared-actions (pull_request) Successful in 41s
312d297a55
requested reviews from Developers, Sebastian.Boehringer 2026-06-15 06:42:10 +00:00
Sebastian.Boehringer approved these changes 2026-06-15 06:46:06 +00:00
Sebastian.Boehringer merged commit 463f657b4a into main 2026-06-15 06:46:12 +00:00
Sebastian.Boehringer deleted branch fix/terraform-workspace-or-create 2026-06-15 06:46:13 +00:00
Sign in to join this conversation.
No reviewers
No labels
No milestone
No project
No assignees
2 participants
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference: schmalz/shared-actions#44
No description provided.