From f93cb82a0dd2d4e620cb8ecc7802d9fbdddb57c0 Mon Sep 17 00:00:00 2001 From: aswin-in-philips Date: Tue, 3 May 2022 09:57:04 +0530 Subject: [PATCH] adding gated sanity files with Automation tests --- .github/workflows/ci-deploy-gated.yml | 143 +++++++++++++ .github/workflows/ci-gated.yaml | 189 ++++++++++++++++++ .../ci-gated/api-gateway/.terraform.lock.hcl | 63 ++++++ deploy/ci-gated/api-gateway/terragrunt.hcl | 52 +++++ .../ci-gated/cloudfoundry/.terraform.lock.hcl | 25 +++ deploy/ci-gated/cloudfoundry/terragrunt.hcl | 31 +++ deploy/ci-gated/core/.terraform.lock.hcl | 59 ++++++ deploy/ci-gated/core/terragrunt.hcl | 12 ++ deploy/ci-gated/terragrunt.hcl | 48 +++++ deploy/dependent_modules/core-gated/data.tf | 33 +++ deploy/dependent_modules/core-gated/main.tf | 82 ++++++++ .../dependent_modules/core-gated/outputs.tf | 91 +++++++++ .../dependent_modules/core-gated/provider.tf | 13 ++ .../dependent_modules/core-gated/secrets.tf | 18 ++ .../dependent_modules/core-gated/variables.tf | 37 ++++ .../dependent_modules/core-gated/versions.tf | 13 ++ 16 files changed, 909 insertions(+) create mode 100644 .github/workflows/ci-deploy-gated.yml create mode 100644 .github/workflows/ci-gated.yaml create mode 100644 deploy/ci-gated/api-gateway/.terraform.lock.hcl create mode 100644 deploy/ci-gated/api-gateway/terragrunt.hcl create mode 100644 deploy/ci-gated/cloudfoundry/.terraform.lock.hcl create mode 100644 deploy/ci-gated/cloudfoundry/terragrunt.hcl create mode 100644 deploy/ci-gated/core/.terraform.lock.hcl create mode 100644 deploy/ci-gated/core/terragrunt.hcl create mode 100644 deploy/ci-gated/terragrunt.hcl create mode 100644 deploy/dependent_modules/core-gated/data.tf create mode 100644 deploy/dependent_modules/core-gated/main.tf create mode 100644 deploy/dependent_modules/core-gated/outputs.tf create mode 100644 deploy/dependent_modules/core-gated/provider.tf create mode 100644 deploy/dependent_modules/core-gated/secrets.tf create mode 100644 deploy/dependent_modules/core-gated/variables.tf create mode 100644 deploy/dependent_modules/core-gated/versions.tf diff --git a/.github/workflows/ci-deploy-gated.yml b/.github/workflows/ci-deploy-gated.yml new file mode 100644 index 00000000..095624e5 --- /dev/null +++ b/.github/workflows/ci-deploy-gated.yml @@ -0,0 +1,143 @@ +name: Deploy CI + +on: + workflow_call: + secrets: + INNER_SOURCE_ACTIONS_APP_ID: + required: true + INNER_SOURCE_ACTIONS_APP_PRIVATE_KEY_BASE64: + required: true + GH_PAT_TOKEN: + required: true + HSDP_DOCKER_USER: + required: true + HSDP_DOCKER_PASSWORD: + required: true + CODESCENE_CI_CD_GITHUB_TOKEN: + required: true + ARM_CLIENT_ID: + required: true + ARM_CLIENT_SECRET: + required: true + +env: + TF_IN_AUTOMATION: true + ARM_SUBSCRIPTION_ID: 74d03f75-4bdb-4666-8095-500178a40764 + ARM_TENANT_ID: 1a407a2d-7675-4d17-8692-b3ac285306e4 +jobs: + terragrunt-workflow-core: + name: Terragrunt - core + runs-on: [self-hosted, research] + container: alpine/terragrunt:1.0.1 + outputs: + core: ${{ steps.tf_output.outputs.core }} + env: + ARM_CLIENT_ID: ${{ secrets.ARM_CLIENT_ID }} + ARM_CLIENT_SECRET: ${{ secrets.ARM_CLIENT_SECRET }} + defaults: + run: + working-directory: ./deploy/ci-gated/core + strategy: + fail-fast: false + steps: + - uses: actions/checkout@v1 + - id: inner-source-action + uses: ./.github/workflows/innersource-action + with: + GH_PAT_TOKEN: ${{ secrets.GH_PAT_TOKEN }} + INNER_SOURCE_ACTIONS_APP_ID: ${{ secrets.INNER_SOURCE_ACTIONS_APP_ID }} + INNER_SOURCE_ACTIONS_APP_PRIVATE_KEY_BASE64: ${{ secrets.INNER_SOURCE_ACTIONS_APP_PRIVATE_KEY_BASE64 }} + + - id: plan + uses: ./../.actions/terragrunt-plan-action + with: + working-directory: ./deploy/ci-gated/core + key: client-test-core-plan + + - id: apply + uses: ./../.actions/terragrunt-apply-action + with: + working-directory: ./deploy/ci-gated/core + key: client-test-core-plan + + - id: output + uses: ./.github/workflows/terragrunt-output-action + with: + working-directory: ./deploy/ci-gated/core + key: client-test-core-output + + terragrunt-workflow-cloudfoundry: + name: Terragrunt - cloudfoundry + runs-on: [self-hosted, research] + needs: [terragrunt-workflow-core] + container: alpine/terragrunt:1.0.1 + env: + ARM_CLIENT_ID: ${{ secrets.ARM_CLIENT_ID }} + ARM_CLIENT_SECRET: ${{ secrets.ARM_CLIENT_SECRET }} + defaults: + run: + working-directory: ./deploy/ci-gated/cloudfoundry + strategy: + fail-fast: false + steps: + - uses: actions/checkout@v1 + - id: inner-source-action + uses: ./.github/workflows/innersource-action + with: + GH_PAT_TOKEN: ${{ secrets.GH_PAT_TOKEN }} + INNER_SOURCE_ACTIONS_APP_ID: ${{ secrets.INNER_SOURCE_ACTIONS_APP_ID }} + INNER_SOURCE_ACTIONS_APP_PRIVATE_KEY_BASE64: ${{ secrets.INNER_SOURCE_ACTIONS_APP_PRIVATE_KEY_BASE64 }} + + - id: plan + uses: ./../.actions/terragrunt-plan-action + with: + working-directory: ./deploy/ci-gated/cloudfoundry + key: client-test-cloudfoundry-plan + + - id: apply + uses: ./../.actions/terragrunt-apply-action + with: + working-directory: ./deploy/ci-gated/cloudfoundry + key: client-test-cloudfoundry-plan + + terragrunt-workflow-api-gateway: + name: Terragrunt - api-gateway + runs-on: [self-hosted, research] + needs: [terragrunt-workflow-cloudfoundry] + container: alpine/terragrunt:1.0.1 + env: + ARM_CLIENT_ID: ${{ secrets.ARM_CLIENT_ID }} + ARM_CLIENT_SECRET: ${{ secrets.ARM_CLIENT_SECRET }} + CONFIG: ./envoyconfig_without_multitenancy.yml + SOURCE: url + defaults: + run: + working-directory: ./deploy/ci-gated/api-gateway + strategy: + fail-fast: false + steps: + - uses: actions/checkout@v1 + - id: inner-source-action + uses: ./.github/workflows/innersource-action + with: + GH_PAT_TOKEN: ${{ secrets.GH_PAT_TOKEN }} + INNER_SOURCE_ACTIONS_APP_ID: ${{ secrets.INNER_SOURCE_ACTIONS_APP_ID }} + INNER_SOURCE_ACTIONS_APP_PRIVATE_KEY_BASE64: ${{ secrets.INNER_SOURCE_ACTIONS_APP_PRIVATE_KEY_BASE64 }} + + - id: plan + uses: ./../.actions/terragrunt-plan-action + with: + working-directory: ./deploy/ci-gated/api-gateway + key: client-test-api-gateway-plan + + - id: apply + uses: ./../.actions/terragrunt-apply-action + with: + working-directory: ./deploy/ci-gated/api-gateway + key: client-test-api-gateway-plan + + - id: output + uses: ./.github/workflows/terragrunt-output-action + with: + working-directory: ./deploy/ci-gated/api-gateway + key: client-test-api-gateway-output \ No newline at end of file diff --git a/.github/workflows/ci-gated.yaml b/.github/workflows/ci-gated.yaml new file mode 100644 index 00000000..d86372bb --- /dev/null +++ b/.github/workflows/ci-gated.yaml @@ -0,0 +1,189 @@ +name: CI-GATED + +on: + pull_request: + branches: [ master ] + workflow_dispatch: + +jobs: + Init: + name: Initialize + runs-on: [self-hosted, research] + container: + image: docker.na1.hsdp.io/edi/build-env:master-45 + credentials: + username: ${{ secrets.HSDP_DOCKER_USER }} + password: ${{ secrets.HSDP_DOCKER_PASSWORD }} + + steps: + - uses: actions/checkout@v2 + + - name: Extract branch name + uses: vazco/github-actions-branch-name@v1 + id: branch + + Build-Automation-Solution: + needs: [Init] + runs-on: builder_blr + name: Build Automation Solution + steps: + - name: cleanup + run: Remove-Item ${{ github.workspace }}\* -Recurse + - uses: actions/checkout@v2 + with: + token: ${{ secrets.GH_TOKEN_CI }} + - name: Add msbuild to PATH + uses: microsoft/setup-msbuild@v1.0.2 + with: + vs-version: '[16.4,17.0)' + - name: Add dotnet + uses: actions/setup-dotnet@v1 + with: + dotnet-version: '3.1.x' + - name: msbuild execute + run: msbuild ${{ github.workspace }}\Build\api_automation_build.proj /t:build /p:configuration=release,platform=anycpu /nowarn:MSB4011,MSB4210 + - name: push nuget to artifactory + run: dotnet nuget push ${{ github.workspace }}\AutomationTest\**\*.nupkg -s JFrogrepository --skip-duplicate + + DeployCIGated: + if: github.ref == 'refs/heads/workflow-trigger' + needs: [Init, Build-Automation-Solution] + uses: ./.github/workflows/ci-deploy-gated.yml + secrets: + ARM_CLIENT_ID: ${{ secrets.ARM_CLIENT_ID }} + ARM_CLIENT_SECRET: ${{ secrets.ARM_CLIENT_SECRET }} + HSDP_DOCKER_USER: ${{ secrets.HSDP_DOCKER_USER }} + HSDP_DOCKER_PASSWORD: ${{ secrets.HSDP_DOCKER_PASSWORD }} + CODESCENE_CI_CD_GITHUB_TOKEN: ${{ secrets.CODESCENE_CI_CD_GITHUB_TOKEN }} + INNER_SOURCE_ACTIONS_APP_ID: ${{ secrets.INNER_SOURCE_ACTIONS_APP_ID }} + INNER_SOURCE_ACTIONS_APP_PRIVATE_KEY_BASE64: ${{ secrets.INNER_SOURCE_ACTIONS_APP_PRIVATE_KEY_BASE64 }} + GH_PAT_TOKEN: ${{secrets.GH_PAT_TOKEN}} + + CI-Automation-Variables: + if: github.ref == 'refs/heads/workflow-trigger' + needs: [DeployCIGated] + runs-on: [self-hosted, research] + container: + image: docker.na1.hsdp.io/edi/build-env:master-45 + credentials: + username: ${{ secrets.HSDP_DOCKER_USER }} + password: ${{ secrets.HSDP_DOCKER_PASSWORD }} + outputs: + oauth_client_secret: ${{ steps.core-output.outputs.oauth_client_secret }} + ci_service_private_key: ${{ steps.core-output.outputs.ci_service_private_key }} + envoy_base_url: "https://${{ steps.gateway-output.outputs.gateway_url }}" + deploy_user: ${{ steps.core-output.outputs.deploy_user }} + deploy_password: ${{ steps.core-output.outputs.deploy_password }} + ci_service_id: ${{ steps.core-output.outputs.ci_service_id }} + oauth_client_id: ${{ steps.core-output.outputs.oauth_client_id }} + steps: + - name: Download Core output + uses: actions/download-artifact@v2 + with: + name: client-test-core-output + path: ${{ github.workspace}}/output/core + - name: Download Gateway output + uses: actions/download-artifact@v2 + with: + name: client-test-api-gateway-output + path: ${{ github.workspace}}/output/gateway + - name: Get Outputs from Core module + working-directory: ${{ github.workspace}}/output/core + id: core-output + shell: bash + run: | + apt update && apt install jq -y + core_output=$(cat output.json) + + oauth_client_secret=$(echo $core_output | jq -r '.fdn_envoy_oauth_client_password.value') + ci_service_private_key=$(echo $core_output | jq -r '.foundation_envoy_nightly_service_private_key.value') + deploy_user=$(echo $core_output | jq -r '.cf_deploy_user.value') + deploy_password=$(echo $core_output | jq -r '.cf_deploy_password.value') + ci_service_id=$(echo $core_output | jq -r '.foundation_envoy_nightly_service_id.value') + oauth_client_id=$(echo $core_output | jq -r '.fdn_envoy_oauth_client_id.value') + + echo "::set-output name=oauth_client_secret::$oauth_client_secret" + echo "::set-output name=ci_service_private_key::$ci_service_private_key" + echo "::set-output name=oauth_client_id::$oauth_client_id" + echo "::set-output name=deploy_user::$deploy_user" + echo "::set-output name=deploy_password::$deploy_password" + echo "::set-output name=ci_service_id::$ci_service_id" + + - name: Get Outputs from Api Gateway + working-directory: ${{ github.workspace}}/output/gateway + id: gateway-output + shell: bash + run: | + apt update && apt install jq -y + output=$(cat output.json) + + gateway_url=$(echo $output | jq -r '.api_gateway_url.value') + echo $gateway_url + + echo "::set-output name=gateway_url::$gateway_url" + + TestCI-Gated: + if: github.ref == 'refs/heads/workflow-trigger' + needs: [Build-Automation-Solution, CI-Automation-Variables] + runs-on: builder_blr + steps: + - uses: actions/checkout@v2 + with: + token: ${{ secrets.GH_TOKEN_CI }} + + - name: Add dotnet + uses: actions/setup-dotnet@v1 + with: + dotnet-version: '3.1.x' + + - name: Restore Automation Test Project + working-directory: ${{ github.workspace }} + run: | + dotnet restore ${{ github.workspace }}\AutomationTest\automation.packages.proj --packages ./automation-dll + + - uses: microsoft/variable-substitution@v1 + name: Update Env Json + with: + files: ${{ github.workspace }}/automation-dll/philips.edi.foundation.apigateway.automationtest/1.0.3/lib/net3.1/Env.json + env: + PipelineConfiguration.AuthUserName: "sai.chand@philips.com" + PipelineConfiguration.AuthPassword: ${{ secrets.IAM_TEST_USER_PASSWORD }} + PipelineConfiguration.APIGatewayBaseUrl: "https://envoyci-gated-api-gateway.us-east.philips-healthsuite.com" + PipelineConfiguration.ServiceID: ${{ needs.CI-Automation-Variables.outputs.ci_service_id }} + PipelineConfiguration.ServiceIDPrivateKey: ${{ needs.CI-Automation-Variables.outputs.ci_service_private_key }} + PipelineConfiguration.OauthClientID: ${{ needs.CI-Automation-Variables.outputs.oauth_client_id }} + PipelineConfiguration.OauthClientSecret: ${{ needs.CI-Automation-Variables.outputs.oauth_client_secret }} + PipelineConfiguration.CFOrgName: "client-EDI-SolutionAccelerator" + PipelineConfiguration.CFSpaceName: "envoyci-gated" + PipelineConfiguration.CFUserName: ${{ secrets.CF_USERNAME }} + PipelineConfiguration.CFPassword: ${{ secrets.CF_PASSWD }} + PipelineConfiguration.CookieName: "edi_session_envoyci-gated" + PipelineConfiguration.CFOauthTokenUrl: "https://login.cloud.pcftest.com/oauth/token" + PipelineConfiguration.CFBaseUrl: "https://api.cloud.pcftest.com/v3" + PipelineConfiguration.CFAuthenticatorAppName: "authenticator_service" + PipelineConfiguration.OauthProxyCookieTimeoutInSeconds: "25" + PipelineConfiguration.AuthenticatorSessionExpireOffsetInPercent: "99" + PipelineConfiguration.AccessTokenTestRoleName: "ENVOY-NIGHTLY-SERVICE-TF-GATED" + PipelineConfiguration.OpenIdConfigurationBaseUrl: "https://foundation-client-test.us-east.philips-healthsuite.com" + PipelineConfiguration.OrgSymmetricKey: ${{ secrets.ORG_SYMMETRIC_KEY }} + PipelineConfiguration.OpenIdConfigOrganizationCertificateMapping: '[{"organizationId":"ed186a39-8b5f-4351-bebc-4e17779c293b","certificate":"-----BEGIN CERTIFICATE-----MIIGaDCCBFCgAwIBAgIUTB3PGrDIqwKPIZfFgawieigND00wDQYJKoZIhvcNAQELBQAwHjEcMBoGA1UEAxMTcGhpbGlwcy1oZWFsdGhzdWl0ZTAeFw0yMjAyMTcwMTQzMTdaFw0yMzAxMTgwMTQzNDVaMB4xHDAaBgNVBAMTE3BoaWxpcHMtaGVhbHRoc3VpdGUwggIiMA0GCSq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cwFYITcGhpbGlwcy1oZWFsdGhzdWl0ZTB9BgNVHR8EdjB0MHKgcKBuhmxodHRwOi8vcGtpLWNsaWVudC10ZXN0LnVzLWVhc3QucGhpbGlwcy1oZWFsdGhzdWl0ZS5jb20vY29yZS9wa2kvYXBpL2E1ZjIzMzY2LTViOGYtNDFkOC1iNWY5LThkMzczZDJmOGZjNC9jcmwwDQYJKoZIhvcNAQELBQADggIBABUTQsPb6zHrczqllwniWVd8mDMJmvgRKAKFcJno1n1FRx7emTmk2zCFQQiURRGRlOKO+tY08AYPBLbqm+90tHvYBKzGSRU4uS9VgkKzwYn/NdhKgb2FGJIZF1Vsh9IfJTwt5/KUxjhDQW8MXtlgzNCrFavgrkBa2Mcj0/7Tc4Fh4Brj60UbfYU35HNUAnQibs9Ld6ffvmpmyU4ARNO8ZS6bpZzeTIipgwySGllyK7j1cbih764TQh9vtS19uWhxV4BpeLjoBT8GWPzu/nOf2WQucDx0DpDt4gZCvAiLkL93EndhMD6EOHRxkfcU4RCLDwwr2jP1omMGdTo9p9edO4ZCVER/3oskkcS6TQlpDgaKJFqWehKQYF/M/WVKHN+1DsBklIfFFrZtWdhwPD56jh0apjfxIn2WBlztXCp2lblOqwxmf6A+WAcfZh/CF4q6TFzw9+aBm33stbxGKVl2mgITil2UIlyq4iFRftcErMXd3OErxQknxgnsKl2xfFHOrrSUp5n8sQ0gvVHbOjIXwq+V/F0pwF2nwcHliOnrIaIwW9eqjvbGoaeysNJwEKIl+5xpN/5GXXAk69tPnp2RrYAQjGwqtAfsb+3BNbuzl54JvSp90tlNcW7ujs7r1LvXpUPbSasT8rOhzsZBEw1fVbWIOc8/Ip7ED+UESIfiRhK0-----END CERTIFICATE-----"},{"organizationId":"51e2503f-c1df-430d-a1ce-2524fa796cda","certificate":"-----BEGIN CERTIFICATE-----MIIGaDCCBFCgAwIBAgIULlL9VXieeY/tgVYPtTqkJ5yAJSwwDQYJKoZIhvcNAQELBQAwHjEcMBoGA1UEAxMTcGhpbGlwc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user" + PipelineConfiguration.TenantDetails: '{"ValidTenant": {"tenantName": "org1-envoyci-gated-api-gateway", "iamOrganizationId": "51e2503f-c1df-430d-a1ce-2524fa796cda"}, "InvalidTenant":{"tenantName": "invalidorg-envoyci-gated-api-gateway","iamOrganizationId": "1234"},"AccessTokenTenant":{"tenantName": "accesstokentestorg","iamOrganizationId": "9ccf3768-53b9-412c-ae22-dcd5aa38242e"}}' + PipelineConfiguration.IAMAuthorizationUrl: "https://iam-client-test.us-east.philips-healthsuite.com/authorize/oauth2/token" + PipelineConfiguration.IAMAccessTokenUrl: "https://iam-client-test.us-east.philips-healthsuite.com/oauth2/access_token" + PipelineConfiguration.IDMClientBaseUrl: "https://idm-client-test.us-east.philips-healthsuite.com/authorize/identity" + PipelineConfiguration.IAMGetUserUrl: "https://idm-client-test.us-east.philips-healthsuite.com/authorize/identity/User?profileType=membership&userId=" + PipelineConfiguration.CDRBaseUrl: "https://cdr-edisa-test.us-east.philips-healthsuite.com" + + - name: Run Tests + continue-on-error: true + working-directory: ${{ github.workspace }}/automation-dll/philips.edi.foundation.apigateway.automationtest + run: | + dotnet test **/net3.1/*Test.dll --no-restore --filter TestCategory=PostDeployment --results-directory ${{ github.workspace }}/automation-dll/philips.edi.foundation.apigateway.automationtest/TestResults --logger trx + dotnet test **/net3.1/*Test.dll --no-restore --filter TestCategory=GatedSanity --results-directory ${{ github.workspace }}/automation-dll/philips.edi.foundation.apigateway.automationtest/TestResults --logger trx + + - name: email-notification + continue-on-error: true + working-directory: ${{ github.workspace }}/Build/PS + run: | + powershell -ExecutionPolicy RemoteSigned -NoExit -File email-notification.ps1 -BuildNumber ${{ github.run_id }} -ReportFolder ${{ github.workspace }}/automation-dll/philips.edi.foundation.apigateway.automationtest/TestResults -Subject Api-Gateway-WithoutMultitenancy-Gated \ No newline at end of file diff --git a/deploy/ci-gated/api-gateway/.terraform.lock.hcl b/deploy/ci-gated/api-gateway/.terraform.lock.hcl new file mode 100644 index 00000000..a272fc3c --- /dev/null +++ b/deploy/ci-gated/api-gateway/.terraform.lock.hcl @@ -0,0 +1,63 @@ +# This file is maintained automatically by "terraform init". +# Manual edits may be lost in future updates. + +provider "registry.terraform.io/cloudfoundry-community/cloudfoundry" { + version = "0.15.0" + constraints = ">= 0.14.2" + hashes = [ + "h1:28advLdfgEFgPgjN8ZkPoknjGNa1hu+zpRQ4fQsVSis=", + "zh:143c1624ee5c2813c32126467fb9c56053bbfcae275d6ce61c7b59c259c4b8e0", + "zh:18a5cb24695a1521cb8ee1e488234c337228af1b471b30a284db41c4362c6149", + "zh:261595c1bd8105160e8c505d76be5f49d3bd12bb7aa6882ac6315cc5727aec55", + "zh:2e8627bf812848fe1b232e4fe91e21eaedc3759f8997ffc5a9f201757627e835", + "zh:4a19d909843952b9cbf6b0445c3627d22c5caaa2ad8db1eab2f382d5faff3402", + "zh:4e78b3de83b2686c66c2b2e0d8a7c910ed423fd5b7b853bcc0fd05b851c6bd28", + "zh:713e43a21a1d3aaddfa0bf841a2cc1e2c06160917bdd443e6eac99b620d668fa", + "zh:a36d3e5406f96abaf9a6eb89663b7fa504d0c68521a7334c498525e8018ad7f9", + "zh:aa3abf232a49f66031f2a1a032f53604a51d8c9b0a3a297591d7a57949943c40", + "zh:b2ccc93024f1ed6e18fd92e199be12ea148383a4f5d8c3ab9e632ae88b0f5263", + "zh:b85379c01fc963289203170731880fb89f10047d63c45566750826ad9aff39cb", + "zh:c5d59b6fe39f7f4f2c556209906aa9cbb31cc0630d225fb0abd48c6de1089f2e", + "zh:c956d630c087fc2ede5967e89249b2477a552185c2d4167292002fc5fd1b380c", + "zh:edf41138788f7b16ed572f1fad940ba75f3c7b9a7c06f6876c31bf281de1257a", + "zh:f873bbff4c7ae1c6b7c5ba0dd42552526435d9b1bd373b18ea4169e965e4d283", + ] +} + +provider "registry.terraform.io/hashicorp/random" { + version = "3.1.2" + hashes = [ + "h1:oLnKXeY6OAJhYHr7PFCYt5mFOoZrdEQrwVh0U8KtrYY=", + "zh:0daceba867b330d3f8e2c5dc895c4291845a78f31955ce1b91ab2c4d1cd1c10b", + "zh:104050099efd30a630741f788f9576b19998e7a09347decbec3da0b21d64ba2d", + "zh:173f4ef3fdf0c7e2564a3db0fac560e9f5afdf6afd0b75d6646af6576b122b16", + "zh:41d50f975e535f968b3f37170fb07937c15b76d85ba947d0ce5e5ff9530eda65", + "zh:51a5038867e5e60757ed7f513dd6a973068241190d158a81d1b69296efb9cb8d", + "zh:6432a568e97a5a36cc8aebca5a7e9c879a55d3bc71d0da1ab849ad905f41c0be", + "zh:6bac6501394b87138a5e17c9f3a41e46ff7833ad0ba2a96197bb7787e95b641c", + "zh:6c0a7f5faacda644b022e7718e53f5868187435be6d000786d1ca05aa6683a25", + "zh:74c89de3fa6ef3027efe08f8473c2baeb41b4c6cee250ba7aeb5b64e8c79800d", + "zh:78d5eefdd9e494defcb3c68d282b8f96630502cac21d1ea161f53cfe9bb483b3", + "zh:b29eabbf0a5298f0e95a1df214c7cfe06ea9bcf362c63b3ad2f72d85da7d4685", + "zh:e891458c7a61e5b964e09616f1a4f87d0471feae1ec04cc51776e7dec1a3abce", + ] +} + +provider "registry.terraform.io/philips-software/hsdp" { + version = "0.30.10" + constraints = ">= 0.14.8, >= 0.19.5" + hashes = [ + "h1:XTfMEVlCslMPXFJk4oELJ6rQ+huxmuz7wD0t7LpPYbs=", + "zh:186831a191684c8f62dca4e09527808e2959d05f67d65cb28cbebe8783a9643e", + "zh:1bb46a97336693a0492441cc348a77834aa20100998fd48b178a8322e317c878", + "zh:600cea763d58421234de681d6f82f61c205d0373852578bf625b9f450dda70f5", + "zh:809798d793630692767cdaa21e98995dc2852e1ac24250b93f3b76a7c4cfe794", + "zh:8d703ac14832dd31fa8d7324111c5bc5ec84aac4ae2f1199f0a3c43e6c10070b", + "zh:aa43e8a8e355726bf6e118fdc4c484bd1065f4118d42df8d66ac9488206b9488", + "zh:b2669cceb7bc9cbdb614cdd677ef634e64bc5f791c719a5a2f254b58efa27508", + "zh:b52a34b779af83ae8af5943dae643bb91793381f104fe022f87bc1d0ed276f30", + "zh:d2ec6a8ba0f9277f99a93cc64ff8b6f4b74224c116207695489b2ddb8f0964ed", + "zh:e02a94406c1f5a9ae20b6af3e4ba871eb7166c9c7f05c6332892a46ae9b42e06", + "zh:e6a8e818905c3efd932dc1b8768b90cabcf4a53a1a59613a472833928c471c28", + ] +} \ No newline at end of file diff --git a/deploy/ci-gated/api-gateway/terragrunt.hcl b/deploy/ci-gated/api-gateway/terragrunt.hcl new file mode 100644 index 00000000..0eb29603 --- /dev/null +++ b/deploy/ci-gated/api-gateway/terragrunt.hcl @@ -0,0 +1,52 @@ +include { + path = find_in_parent_folders() +} + +terraform { + source = "../../dependent_modules//api-gateway" +} + +inputs = { + + proposition_id = dependency.core.outputs.foundation_envoy_proposition_id + cf_org = "client-EDI-SolutionAccelerator" + cf_space = "envoyci-gated" + cf_deploy_user = dependency.core.outputs.cf_deploy_user + cf_deploy_password = dependency.core.outputs.cf_deploy_password + cf_domain = "us-east.philips-healthsuite.com" + redis_credentials = dependency.cloudfoundry.outputs.redis_credentials + logdrainer = dependency.cloudfoundry.outputs.logdrainer_service_id + oauth_proxy_redis = dependency.cloudfoundry.outputs.redis_service_id + org_id_source = get_env("SOURCE", "url") + config_file_location = get_env("CONFIG", "./envoyconfig_without_multitenancy.yml") + envoy_tag = dependency.core.outputs.envoy_tag + oauth_tag = dependency.core.outputs.oauth_tag + authenticator_tag = dependency.core.outputs.authenticator_tag + tokenexchange_tag = dependency.core.outputs.tokenexchange_tag +} + +dependency "core" { + config_path = "../core/" +} + +dependency "cloudfoundry" { + config_path = "../cloudfoundry/" +} + +generate "provider" { + path = "provider.tf" + if_exists = "overwrite_terragrunt" + contents = <