@@ -78,8 +78,12 @@ functions:
7878 bash ${DRIVERS_TOOLS}/.evergreen/stop-orchestration.sh
7979
8080 " bootstrap mongohoused " :
81+ - command : ec2.assume_role
82+ params :
83+ role_arn : ${DRIVERS_SECRETS_ARN}
8184 - command : shell.exec
8285 params :
86+ add_expansions_to_env : true
8387 script : |
8488 ${PREPARE_SHELL}
8589 DRIVERS_TOOLS="${DRIVERS_TOOLS}" bash ${DRIVERS_TOOLS}/.evergreen/atlas_data_lake/pull-mongohouse-image.sh
@@ -354,13 +358,17 @@ functions:
354358 rm -rf ./node_modules/@aws-sdk/credential-providers
355359
356360 " run atlas tests " :
361+ - command : ec2.assume_role
362+ params :
363+ role_arn : ${DRIVERS_SECRETS_ARN}
357364 # This creates secrets-export.sh, which is later sourced by run-tests.sh
358365 - command : subprocess.exec
359366 params :
360367 working_dir : " src"
361368 binary : bash
362369 env :
363370 DRIVERS_TOOLS : ${DRIVERS_TOOLS}
371+ add_expansions_to_env : true
364372 args :
365373 - -c
366374 - ${DRIVERS_TOOLS}/.evergreen/secrets_handling/setup-secrets.sh drivers/atlas_connect
@@ -623,6 +631,9 @@ functions:
623631 include_expansions_in_env :
624632 - MONGODB_URI
625633 - DRIVERS_TOOLS
634+ - AWS_SECRET_ACCESS_KEY
635+ - AWS_ACCESS_KEY_ID
636+ - AWS_SESSION_TOKEN
626637 env :
627638 AWS_CREDENTIAL_TYPE : env-creds
628639 MONGODB_AWS_SDK : " true"
@@ -742,6 +753,9 @@ functions:
742753 - ${PROJECT_DIRECTORY}/.evergreen/install-mongodb-client-encryption.sh
743754
744755 " build and test alpine FLE " :
756+ - command : ec2.assume_role
757+ params :
758+ role_arn : ${DRIVERS_SECRETS_ARN}
745759 - command : subprocess.exec
746760 type : test
747761 params :
@@ -753,6 +767,7 @@ functions:
753767 NODE_VERSION : ${NODE_VERSION}
754768 MONGODB_URI : ${MONGODB_URI}
755769 binary : bash
770+ add_expansions_to_env : true
756771 args :
757772 - .evergreen/docker/alpine.sh
758773
@@ -777,12 +792,14 @@ tasks:
777792 params :
778793 updates :
779794 - { key: NPM_VERSION, value: "9" }
795+ - func : assume secrets manager rule
780796 - func : " install dependencies"
781797 # Upload node driver to a GCP instance
782798 - command : subprocess.exec
783799 type : setup
784800 params :
785801 binary : bash
802+ add_expansions_to_env : true
786803 env :
787804 DRIVERS_TOOLS : ${DRIVERS_TOOLS}
788805 args :
@@ -813,6 +830,7 @@ tasks:
813830
814831 - name : " test-azurekms-task"
815832 commands :
833+ - func : assume secrets manager rule
816834 - command : expansions.update
817835 type : setup
818836 params :
@@ -825,6 +843,7 @@ tasks:
825843 binary : bash
826844 env :
827845 DRIVERS_TOOLS : ${DRIVERS_TOOLS}
846+ add_expansions_to_env : true
828847 args :
829848 - src/.evergreen/run-deployed-azure-kms-tests.sh
830849
@@ -1051,10 +1070,12 @@ task_groups:
10511070 setup_group_timeout_secs : 1800 # 30 minutes
10521071 setup_group :
10531072 - func : fetch source
1073+ - func : assume secrets manager rule
10541074 - command : subprocess.exec
10551075 params :
10561076 working_dir : " src"
10571077 binary : bash
1078+ add_expansions_to_env : true
10581079 args :
10591080 - ${DRIVERS_TOOLS}/.evergreen/csfle/gcpkms/setup.sh
10601081
@@ -1073,12 +1094,14 @@ task_groups:
10731094 setup_group_timeout_secs : 1800 # 30 minutes
10741095 setup_group :
10751096 - func : fetch source
1097+ - func : assume secrets manager rule
10761098 - command : subprocess.exec
10771099 params :
10781100 working_dir : " src"
10791101 binary : bash
10801102 env :
10811103 AZUREKMS_VMNAME_PREFIX : " NODE_DRIVER"
1104+ add_expansions_to_env : true
10821105 args :
10831106 - ${DRIVERS_TOOLS}/.evergreen/csfle/azurekms/setup.sh
10841107
@@ -1099,12 +1122,11 @@ task_groups:
10991122 - name : testk8soidc_task_group_eks
11001123 setup_group :
11011124 - func : fetch source
1102- - command : ec2.assume_role
1103- params :
1104- role_arn : ${DRIVERS_SECRETS_ARN}
1125+ - func : assume secrets manager rule
11051126 - command : subprocess.exec
11061127 params :
11071128 binary : bash
1129+ add_expansions_to_env : true
11081130 args :
11091131 - ${DRIVERS_TOOLS}/.evergreen/auth_oidc/k8s/setup.sh
11101132 teardown_group :
@@ -1122,12 +1144,11 @@ task_groups:
11221144 - name : testk8soidc_task_group_gke
11231145 setup_group :
11241146 - func : fetch source
1125- - command : ec2.assume_role
1126- params :
1127- role_arn : ${DRIVERS_SECRETS_ARN}
1147+ - func : assume secrets manager rule
11281148 - command : subprocess.exec
11291149 params :
11301150 binary : bash
1151+ add_expansions_to_env : true
11311152 args :
11321153 - ${DRIVERS_TOOLS}/.evergreen/auth_oidc/k8s/setup.sh
11331154 teardown_group :
@@ -1145,12 +1166,11 @@ task_groups:
11451166 - name : testk8soidc_task_group_aks
11461167 setup_group :
11471168 - func : fetch source
1148- - command : ec2.assume_role
1149- params :
1150- role_arn : ${DRIVERS_SECRETS_ARN}
1169+ - func : assume secrets manager rule
11511170 - command : subprocess.exec
11521171 params :
11531172 binary : bash
1173+ add_expansions_to_env : true
11541174 args :
11551175 - ${DRIVERS_TOOLS}/.evergreen/auth_oidc/k8s/setup.sh
11561176 teardown_group :
@@ -1168,9 +1188,7 @@ task_groups:
11681188 - name : testtestoidc_task_group
11691189 setup_group :
11701190 - func : fetch source
1171- - command : ec2.assume_role
1172- params :
1173- role_arn : ${DRIVERS_SECRETS_ARN}
1191+ - func : assume secrets manager rule
11741192 - command : subprocess.exec
11751193 params :
11761194 binary : bash
@@ -1190,9 +1208,11 @@ task_groups:
11901208 - name : testazureoidc_task_group
11911209 setup_group :
11921210 - func : fetch source
1211+ - func : assume secrets manager rule
11931212 - command : shell.exec
11941213 params :
11951214 shell : bash
1215+ add_expansions_to_env : true
11961216 script : |-
11971217 set -o errexit
11981218 ${PREPARE_SHELL}
@@ -1214,9 +1234,11 @@ task_groups:
12141234 - name : testgcpoidc_task_group
12151235 setup_group :
12161236 - func : fetch source
1237+ - func : assume secrets manager rule
12171238 - command : shell.exec
12181239 params :
12191240 shell : bash
1241+ add_expansions_to_env : true
12201242 script : |-
12211243 set -o errexit
12221244 ${PREPARE_SHELL}
@@ -1238,10 +1260,12 @@ task_groups:
12381260 - name : test_atlas_task_group
12391261 setup_group :
12401262 - func : fetch source
1263+ - func : assume secrets manager rule
12411264 - command : subprocess.exec
12421265 params :
12431266 working_dir : src
12441267 binary : bash
1268+ add_expansions_to_env : true
12451269 env :
12461270 MONGODB_VERSION : " 7.0"
12471271 LAMBDA_STACK_NAME : dbx-node-lambda
@@ -1268,13 +1292,15 @@ task_groups:
12681292 - name : test_atlas_task_group_search_indexes
12691293 setup_group :
12701294 - func : fetch source
1295+ - func : assume secrets manager rule
12711296 - command : subprocess.exec
12721297 params :
12731298 working_dir : src
12741299 binary : bash
12751300 env :
12761301 MONGODB_VERSION : " 7.0"
12771302 CLUSTER_PREFIX : dbx-node-search
1303+ add_expansions_to_env : true
12781304 args :
12791305 - ${DRIVERS_TOOLS}/.evergreen/atlas/setup-atlas-cluster.sh
12801306 - command : expansions.update
0 commit comments