Skip to content

SetUp the sales demo #4

SetUp the sales demo

SetUp the sales demo #4

Workflow file for this run

name: SetUp the sales demo
on:
workflow_dispatch:
inputs:
module:
description: Module to run
type: choice
default: foundation
options:
- admin-tenant
- aws-services
- app
cmd:
description: Command to run
type: choice
default: plan
options:
- plan
- apply
- destroy
environment:
description: Environment to deploy to
type: environment
default: salesdemo
workspace:
description: Workspace to run
type: string
default: default
workflow_call:
inputs:
cmd:
description: Command to run
type: string
default: plan
environment:
description: Environment to deploy to
type: string
default: dev
module:
description: Module to run
type: string
default: admin-tenant
workspace:
description: Workspace to run
type: string
default: default
secrets:
DUPLO_TOKEN:
description: Duplo Token
required: true
jobs:
module:
name: ${{ inputs.cmd }} ${{ inputs.workspace }} foundation
runs-on: ubuntu-latest
environment:
name: ${{ inputs.environment }}
env:
DUPLO_TOKEN: ${{ secrets.DUPLO_TOKEN }}
DUPLO_HOST: ${{ vars.DUPLO_HOST }}
DUPLO_TENANT: ${{ vars.DUPLO_TENANT }}
TF_CLI_ARGS_apply: -parallelism=1
steps:
- name: Checkout source code
uses: actions/checkout@v3
- name: Duplo and AWS Setup
uses: duplocloud/actions/setup@main
- name: Terraform Setup
uses: duplocloud/actions/setup-terraform@main
- name: TF Validate Module
uses: duplocloud/actions/terraform-module@main
with:
module: modules/foundation
test: false
- name: TF Execute Module
uses: duplocloud/actions/terraform-exec@main
with:
module: iac/${{ inputs.module }}
workspace: ${{ inputs.workspace }}
command: ${{ inputs.cmd }}