Skip to content

Commit

Permalink
Merge pull request #4 from wemogy/3-terraform-is-not-included-in-ubun…
Browse files Browse the repository at this point in the history
…tu-24-image

fix: #3 added terraform setup step
  • Loading branch information
SebastianKuesters authored Jan 15, 2025
2 parents 330b64d + 70116b1 commit 1c38ac9
Showing 1 changed file with 11 additions and 7 deletions.
18 changes: 11 additions & 7 deletions action.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@ name: Terraform (wemogy)
author: wemogy
description: Connects to a Terraform backend, applies or plans the changes and outputs the Terraform Output variables
branding:
icon: 'upload-cloud'
color: 'blue'
icon: "upload-cloud"
color: "blue"

inputs:
working-directory:
Expand All @@ -27,7 +27,7 @@ inputs:
force:
description: "Enforce changes, even if prevent_destroy is set to 'true'"
default: "false"
required: true
required: true
client-id:
description: "The Azure Service Pricipal Client ID"
required: true
Expand Down Expand Up @@ -67,8 +67,12 @@ runs:
find . -name '*.tf' -type f -exec perl -i -pe 's@prevent_destroy = true@prevent_destroy = false@g' {} \;
fi
shell: bash
working-directory: ${{ inputs.working-directory }}

working-directory: ${{ inputs.working-directory }}

# Setup terraform
- name: Setup Terraform
uses: hashicorp/setup-terraform@v3

# Initialize terraform
- name: Init Terraform
run: |
Expand Down Expand Up @@ -109,7 +113,7 @@ runs:
ARM_CLIENT_SECRET: ${{ inputs.client-secret }}
ARM_TENANT_ID: ${{ inputs.tenant-id }}
ARM_ACCESS_KEY: ${{ inputs.backend-access-key }}

# Apply / Destroy
- name: Apply / Destroy terraform
run: |
Expand All @@ -126,7 +130,7 @@ runs:
ARM_CLIENT_ID: ${{ inputs.client-id }}
ARM_CLIENT_SECRET: ${{ inputs.client-secret }}
ARM_TENANT_ID: ${{ inputs.tenant-id }}
ARM_ACCESS_KEY: ${{ inputs.backend-access-key }}
ARM_ACCESS_KEY: ${{ inputs.backend-access-key }}

# Export terraform outputs to output of this job
- name: Terraform Output
Expand Down

0 comments on commit 1c38ac9

Please sign in to comment.