Terraform #8
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Terraform | |
on: | |
workflow_dispatch: | |
inputs: | |
workspace_transfer_url: | |
description: "URL from which to download the workspace" | |
required: true | |
type: string | |
jobs: | |
plan: | |
name: Speculative Plan | |
runs-on: ubuntu-22.04 | |
env: | |
# renovate: datasource=github-releases depName=hashicorp/terraform | |
TERRAFORM_VERSION: "1.9.0" | |
TF_HTTP_PASSWORD: ${{ github.token }} | |
TF_IN_AUTOMATION: "true" | |
TF_CLI_ARGS: -input=false | |
# environment variables for providers | |
NETBOX_API_TOKEN: ${{ secrets.NETBOX_API_TOKEN }} | |
steps: | |
- name: Download Workspace | |
run: | | |
curl ${{ inputs.workspace_transfer_url }} --user github_pat:${TF_HTTP_PASSWORD} --fail --silent | tar -xzf - | |
- uses: hashicorp/setup-terraform@v3 | |
with: | |
terraform_version: ${TERRAFORM_VERSION} | |
- run: terraform init | |
- run: terraform plan |