diff --git a/.github/workflows/sonar_poc_cli.yml b/.github/workflows/sonar_poc_cli.yml index 110a5de2c..576871e7a 100644 --- a/.github/workflows/sonar_poc_cli.yml +++ b/.github/workflows/sonar_poc_cli.yml @@ -39,6 +39,7 @@ on: - 'modules/null/hadr/*' - 'examples/poc/sonar_basic_deployment/*' - 'examples/poc/sonar_hadr_deployment/*' + - 'examples/azure/dsf_deployment/*' pull_request: types: @@ -59,6 +60,7 @@ on: - 'modules/null/hadr/*' - 'examples/poc/sonar_basic_deployment/*' - 'examples/poc/sonar_hadr_deployment/*' + - 'examples/azure/dsf_deployment/*' env: TF_CLI_ARGS: "-no-color" @@ -66,7 +68,10 @@ env: TF_VAR_gw_count: 1 AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }} AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }} - + ARM_SUBSCRIPTION_ID: ${{ vars.ARM_SUBSCRIPTION_ID }} + ARM_CLIENT_ID: ${{ vars.ARM_CLIENT_ID }} + ARM_TENANT_ID: ${{ vars.ARM_TENANT_ID }} + ARM_CLIENT_SECRET: ${{ secrets.ARM_CLIENT_SECRET }} permissions: contents: read @@ -76,23 +81,28 @@ jobs: fail-fast: false matrix: include: - - workspace: basic_cli-${{ github.run_number }}-${{ github.run_attempt }} - example_dir: ./examples/poc/sonar_basic_deployment - aws_region: eu-west-2 - hub_output: '.dsf_hub.value.public_dns' - gw_output: '.dsf_agentless_gw.value."agentless-gw-0".private_ip' - - workspace: hadr_cli-${{ github.run_number }}-${{ github.run_attempt }} - example_dir: ./examples/poc/sonar_hadr_deployment - aws_region: eu-west-1 +# - workspace: basic_cli-${{ github.run_number }}-${{ github.run_attempt }} +# example_dir: ./examples/poc/sonar_basic_deployment +# aws_region: eu-west-2 +# hub_output: '.dsf_hub.value.public_dns' +# gw_output: '.dsf_agentless_gw.value."agentless-gw-0".private_ip' +# - workspace: hadr_cli-${{ github.run_number }}-${{ github.run_attempt }} +# example_dir: ./examples/poc/sonar_hadr_deployment +# aws_region: eu-west-1 +# hub_output: '.dsf_hubs.value.main.public_dns' +# gw_output: '.dsf_agentless_gw.value."agentless-gw-0".main.private_ip' + - workspace: azure_cli-${{ github.run_number }}-${{ github.run_attempt }} + example_dir: ./examples/azure/dsf_deployment hub_output: '.dsf_hubs.value.main.public_dns' gw_output: '.dsf_agentless_gw.value."agentless-gw-0".main.private_ip' + name: 'Terraform ${{ matrix.workspace }}' runs-on: ubuntu-latest env: EXAMPLE_DIR: ${{ matrix.example_dir }} TF_WORKSPACE: ${{ matrix.workspace }} - AWS_REGION: ${{ matrix.aws_region }} +# AWS_REGION: ${{ matrix.aws_region }} HUB_OUTPUT: ${{ matrix.hub_output }} GW_OUTPUT: ${{ matrix.gw_output }} environment: test @@ -119,7 +129,7 @@ jobs: - name: Change the modules source to local if: ${{ inputs.use_modules_from_terraform_registry == false }} run: | - find ./examples/ -type f -exec sed -i -f sed.expr {} \; + find $EXAMPLE_DIR -type f -exec sed -i -f sed.expr {} \; - name: Sets env vars for environment run: | diff --git a/.github/workflows/sonar_poc_cli_azure.yml b/.github/workflows/sonar_poc_cli_azure.yml index 006012b14..0cce839dc 100644 --- a/.github/workflows/sonar_poc_cli_azure.yml +++ b/.github/workflows/sonar_poc_cli_azure.yml @@ -72,7 +72,7 @@ env: ARM_CLIENT_ID: ${{ vars.ARM_CLIENT_ID }} ARM_TENANT_ID: ${{ vars.ARM_TENANT_ID }} ARM_CLIENT_SECRET: ${{ secrets.ARM_CLIENT_SECRET }} - permissions: +permissions: contents: read jobs: