diff --git a/.github/workflows/java-eks-otlp-ocb-test.yml b/.github/workflows/java-eks-otlp-ocb-test.yml index 7131c22e..cee3c3ef 100644 --- a/.github/workflows/java-eks-otlp-ocb-test.yml +++ b/.github/workflows/java-eks-otlp-ocb-test.yml @@ -202,7 +202,9 @@ jobs: - name: Install OTel Collector uses: ./.github/workflows/actions/execute_and_retry with: - command: "cd ${{ env.TEST_RESOURCES_FOLDER }}/terraform/java/eks-otlp-ocb/util && kubectl apply -f ./appsignals-collector.yaml -n ${{ env.SAMPLE_APP_NAMESPACE }}" + command: "cd ${{ env.TEST_RESOURCES_FOLDER }}/terraform/java/eks-otlp-ocb/util && \ + sed -i 's/{E2E_TEST_AWS_REGION}/{{ env.E2E_TEST_AWS_REGION }}/g' ./appsignals-collector.yaml && \ + kubectl apply -f ./appsignals-collector.yaml -n ${{ env.SAMPLE_APP_NAMESPACE }}" cleanup: "kubectl delete -f ./appsignals-collector.yaml -n ${{ env.SAMPLE_APP_NAMESPACE }} && \ aws eks update-kubeconfig --name ${{ env.CLUSTER_NAME }} --region ${{ env.E2E_TEST_AWS_REGION }}" max_retry: 3 @@ -271,7 +273,7 @@ jobs: run: ./gradlew validator:run --args='-c java/eks-otlp-ocb/log-validation.yml --testing-id ${{ env.TESTING_ID }} --endpoint http://${{ env.APP_ENDPOINT }} - --region us-east-1 + --region ${{ env.E2E_TEST_AWS_REGION }} --account-id ${{ env.ACCOUNT_ID }} --metric-namespace ${{ env.METRIC_NAMESPACE }} --log-group ${{ env.LOG_GROUP_NAME }} @@ -282,8 +284,6 @@ jobs: --remote-service-ip ${{ env.REMOTE_SERVICE_POD_IP }} --query-string ip=${{ env.REMOTE_SERVICE_POD_IP }}&testingId=${{ env.TESTING_ID }} --rollup' - # TODO: Undo hardcode - # --region ${{ env.E2E_TEST_AWS_REGION }} - name: Call endpoints and validate generated metrics id: metric-validation @@ -291,7 +291,7 @@ jobs: run: ./gradlew validator:run --args='-c java/eks-otlp-ocb/metric-validation.yml --testing-id ${{ env.TESTING_ID }} --endpoint http://${{ env.APP_ENDPOINT }} - --region us-east-1 + --region ${{ env.E2E_TEST_AWS_REGION }} --account-id ${{ env.ACCOUNT_ID }} --metric-namespace ${{ env.METRIC_NAMESPACE }} --log-group ${{ env.LOG_GROUP_NAME }} @@ -303,8 +303,6 @@ jobs: --remote-service-ip ${{ env.REMOTE_SERVICE_POD_IP }} --query-string ip=${{ env.REMOTE_SERVICE_POD_IP }}&testingId=${{ env.TESTING_ID }} --rollup' - # TODO: Undo hardcodes: - # --region ${{ env.E2E_TEST_AWS_REGION }} - name: Call endpoints and validate generated traces id: trace-validation @@ -312,7 +310,7 @@ jobs: run: ./gradlew validator:run --args='-c java/eks-otlp-ocb/trace-validation.yml --testing-id ${{ env.TESTING_ID }} --endpoint http://${{ env.APP_ENDPOINT }} - --region us-east-1 + --region ${{ env.E2E_TEST_AWS_REGION }} --account-id ${{ env.ACCOUNT_ID }} --metric-namespace ${{ env.METRIC_NAMESPACE }} --log-group ${{ env.LOG_GROUP_NAME }} @@ -323,8 +321,6 @@ jobs: --remote-service-ip ${{ env.REMOTE_SERVICE_POD_IP }} --query-string ip=${{ env.REMOTE_SERVICE_POD_IP }}&testingId=${{ env.TESTING_ID }} --rollup' - # TODO: Undo hardcode - # --region ${{ env.E2E_TEST_AWS_REGION }} - name: Refresh AWS Credentials if: ${{ github.event.repository.name == 'aws-application-signals-test-framework' }} diff --git a/terraform/java/eks-otlp-ocb/util/appsignals-collector.yaml b/terraform/java/eks-otlp-ocb/util/appsignals-collector.yaml index a0688b5c..f1d48782 100644 --- a/terraform/java/eks-otlp-ocb/util/appsignals-collector.yaml +++ b/terraform/java/eks-otlp-ocb/util/appsignals-collector.yaml @@ -50,7 +50,7 @@ spec: config: | extensions: sigv4auth: - region: "us-east-1" + region: "{E2E_TEST_AWS_REGION}" service: "xray" receivers: @@ -137,7 +137,7 @@ spec: exporters: otlphttp: - traces_endpoint: https://xray.us-east-1.amazonaws.com/v1/traces + traces_endpoint: https://xray.{E2E_TEST_AWS_REGION}.amazonaws.com/v1/traces auth: authenticator: sigv4auth