From f5d3c945a73efaacc343b3fdd753921a5575e4c2 Mon Sep 17 00:00:00 2001 From: Erik Jagyugya Date: Thu, 25 Nov 2021 11:24:49 +0100 Subject: [PATCH] Add module Signed-off-by: Erik Jagyugya --- .github/workflows/terraform.yaml | 71 ++++++++++++-------------------- 1 file changed, 26 insertions(+), 45 deletions(-) diff --git a/.github/workflows/terraform.yaml b/.github/workflows/terraform.yaml index 47b15dc..99e0238 100644 --- a/.github/workflows/terraform.yaml +++ b/.github/workflows/terraform.yaml @@ -1,56 +1,37 @@ name: Terraform + +# Controls when the action will run. Triggers the workflow on push or pull request +# events but only for the master branch on: workflow_dispatch: inputs: - name: - description: 'Person to greet' + tfvars_file_name: + description: 'Name of project space tfvars file' required: true - default: 'Mona the Octocat' - home: - description: 'location' - required: false - default: 'The Octoverse' - + default: 'example_app' +defaults: + run: + working-directory: ./modules/terraform-azure-psp/examples/complete +# A workflow run is made up of one or more jobs that can run sequentially or in parallel jobs: - say_hello: + # This workflow contains the following jobs + terraform-plan: + # The type of runner that the job will run on runs-on: ubuntu-latest + env: + TF_CLI_ARGS: '-no-color' + ARM_CLIENT_ID: ${{ secrets.ARM_CLIENT_ID }} + ARM_CLIENT_SECRET: ${{ secrets.ARM_CLIENT_SECRET }} + ARM_SUBSCRIPTION_ID: ${{ secrets.ARM_SUBSCRIPTION_ID }} + ARM_TENANT_ID: ${{ secrets.ARM_TENANT_ID }} + # Steps represent a sequence of tasks that will be executed as part of the job steps: - - run: | - echo "Hello ${{ github.event.inputs.name }}!" - echo "- in ${{ github.event.inputs.home }}!" - -# Controls when the action will run. Triggers the workflow on push or pull request -# events but only for the master branch -# on: -# workflow_dispatch: -# inputs: -# tfvars_file_name: -# description: 'Name of project space tfvars file' -# required: true -# default: 'example_app' -# defaults: -# run: -# working-directory: ./modules/terraform-azure-psp/examples/complete -# # A workflow run is made up of one or more jobs that can run sequentially or in parallel -# jobs: -# # This workflow contains the following jobs -# terraform-plan: -# # The type of runner that the job will run on -# runs-on: ubuntu-latest -# env: -# TF_CLI_ARGS: '-no-color' -# ARM_CLIENT_ID: ${{ secrets.ARM_CLIENT_ID }} -# ARM_CLIENT_SECRET: ${{ secrets.ARM_CLIENT_SECRET }} -# ARM_SUBSCRIPTION_ID: ${{ secrets.ARM_SUBSCRIPTION_ID }} -# ARM_TENANT_ID: ${{ secrets.ARM_TENANT_ID }} -# # Steps represent a sequence of tasks that will be executed as part of the job -# steps: -# - name: Checkout Source Code -# uses: actions/checkout@v2 -# - name: Print the input name to STDOUT -# run: cat ${{ env.TFVARS_FILE_PATH }}/${{ inputs.tfvars_file_name }} -# env: -# TFVARS_FILE_PATH: ../../../../project_spaces + - name: Checkout Source Code + uses: actions/checkout@v2 + - name: Print the input name to STDOUT + run: cat ${{ env.TFVARS_FILE_PATH }}/${{ github.event.inputs.tfvars_file_name }}" + env: + TFVARS_FILE_PATH: ../../../../project_spaces # - name: Install Terraform # uses: hashicorp/setup-terraform@v1