Skip to content

Commit

Permalink
Add module
Browse files Browse the repository at this point in the history
Signed-off-by: Erik Jagyugya <jagyugyaerik@gmail.com>
  • Loading branch information
jagyugyaerik committed Nov 25, 2021
1 parent a0ca7eb commit f5d3c94
Showing 1 changed file with 26 additions and 45 deletions.
71 changes: 26 additions & 45 deletions .github/workflows/terraform.yaml
Original file line number Diff line number Diff line change
@@ -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
Expand Down

0 comments on commit f5d3c94

Please sign in to comment.