From c24b08ccbfa52abc8c6dc6d185e8c63b638e3727 Mon Sep 17 00:00:00 2001 From: Grzegorz Huber Date: Fri, 21 Jun 2024 17:03:16 +0200 Subject: [PATCH] [DOC-536] Smart Git diff compare for terraform modules --- bitbucket-pipelines.yml | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/bitbucket-pipelines.yml b/bitbucket-pipelines.yml index 3dbc0ae..14d531b 100644 --- a/bitbucket-pipelines.yml +++ b/bitbucket-pipelines.yml @@ -291,8 +291,10 @@ pipelines: name: Run Snowsql in CICD oidc: true script: - - *aws-context-dev +# - *aws-context-dev + - export STS_OUTPUT=$(aws sts assume-role-with-web-identity --role-arn $AWS_ROLE_ARN --role-session-name BitbucketPipeline --web-identity-token "$BITBUCKET_STEP_OIDC_TOKEN" --duration-seconds 3600) + - export AWS_ACCESS_KEY_ID=$(echo $STS_OUTPUT | jq -r '.Credentials.AccessKeyId') + - export AWS_SECRET_ACCESS_KEY=$(echo $STS_OUTPUT | jq -r '.Credentials.SecretAccessKey') + - export AWS_SESSION_TOKEN=$(echo $STS_OUTPUT | jq -r '.Credentials.SessionToken') - aws sts get-caller-identity --output text - - echo $AWS_ACCESS_KEY_ID - - echo $AWS_SECRET_ACCESS_KEY - bash snowsql-cicd.sh dev \ No newline at end of file