7575 - 'cfn-resources/stream-connection/**'
7676 stream-instance:
7777 - 'cfn-resources/stream-instance/**'
78+ trigger:
79+ - 'cfn-resources/trigger/**'
7880 access-list-api-key :
7981 needs : change-detection
8082 if : ${{ needs.change-detection.outputs.access-list-api-key == 'true' }}
@@ -853,4 +855,61 @@ jobs:
853855 make create-test-resources
854856 cat inputs/inputs_1_create.json
855857 make run-contract-testing
856- make delete-test-resources
858+ make delete-test-resources
859+ trigger :
860+ needs : change-detection
861+ if : ${{ needs.change-detection.outputs.trigger == 'true' }}
862+ runs-on : ubuntu-latest
863+ env :
864+ MONGODB_ATLAS_PUBLIC_API_KEY : ${{ secrets.CLOUD_DEV_PUBLIC_KEY }}
865+ MONGODB_ATLAS_PRIVATE_API_KEY : ${{ secrets.CLOUD_DEV_PRIVATE_KEY }}
866+ MONGODB_ATLAS_ORG_ID : ${{ secrets.CLOUD_DEV_ORG_ID }}
867+ MONGODB_ATLAS_BASE_URL : ${{ vars.MONGODB_ATLAS_BASE_URL }}
868+
869+ FOLDER_PATH : cfn-resources/trigger
870+ # Atlas Init CLI Terminal formatting
871+ COLUMNS : 140
872+ FORCE_COLOR : " yes"
873+ TF_INPUT : " false"
874+ NON_INTERACTIVE : " true"
875+ # Atlas Init CLI Variables
876+ ATLAS_INIT_CFN_PROFILE : profile-${{ github.run_id }}
877+ ATLAS_INIT_CFN_REGION : " us-east-1"
878+ ATLAS_INIT_CFN_USE_KMS_KEY : " false"
879+ ATLAS_INIT_PROFILE : ${{ format('profile-{0}',github.run_id) }}
880+ ATLAS_INIT_PROJECT_NAME : ${{ format('gh-ci-{0}', github.run_id) }}
881+ steps :
882+ - uses : actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683
883+ - uses : actions/setup-go@41dfa10bad2bb2ae585af6ee5bb4d7d973ad74ed
884+ with :
885+ go-version-file : ' cfn-resources/go.mod'
886+ - uses : actions/setup-python@v4
887+ with :
888+ python-version : " 3.12"
889+ - uses : aws-actions/setup-sam@2360ef6d90015369947b45b496193ab9976a9b04
890+ with :
891+ use-installer : true
892+ - uses : aws-actions/configure-aws-credentials@e3dd6a429d7300a6a4c196c26e071d42e0343502
893+ with :
894+ aws-access-key-id : ${{ secrets.AWS_ACCESS_KEY_ID_TEST_ENV }}
895+ aws-secret-access-key : ${{ secrets.AWS_SECRET_ACCESS_KEY_TEST_ENV }}
896+ aws-region : us-east-1
897+ - uses : yezz123/setup-uv@v4
898+ with :
899+ uv-version : " 0.4.18"
900+ - name : setup Atlas Init CLI
901+ run : |
902+ uv pip install -U atlas-init==0.4.0 cloudformation-cli cloudformation-cli-go-plugin setuptools --system
903+ mkdir -p profiles/${{ env.ATLAS_INIT_PROFILE }}
904+ echo "ATLAS_INIT_PROFILES_PATH=$(pwd)/profiles" >> $GITHUB_ENV
905+ - name : atlas-init-init
906+ run : atlas-init init
907+ - name : atlas-init-apply
908+ run : ${{ env.FOLDER_PATH }} && atlas-init apply -auto-approve
909+ - name : atlas-init-contract-test-dry-run
910+ run : ${{ env.FOLDER_PATH }} && atlas-init --dry-run cfn contract-test
911+ - name : atlas-init-contract-test
912+ run : ${{ env.FOLDER_PATH }} && atlas-init cfn contract-test
913+ - name : atlas-init-destroy
914+ run : ${{ env.FOLDER_PATH }} && atlas-init destroy -auto-approve
915+ if : always()
0 commit comments