Skip to content

Commit faf423a

Browse files
authored
Update examples template to use pre-defined role (#411)
Removed policies from examples SAM template and added a new RoleArn parameter. Now, instead of auto-generating a new role for each function, they will all now use the same pre-existing role The new RoleArn parameter is passed in from a GitHub secret.
1 parent c73cf4f commit faf423a

2 files changed

Lines changed: 41 additions & 249 deletions

File tree

.github/workflows/e2e-tests.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -68,13 +68,13 @@ jobs:
6868
- name: sam build
6969
run: | # add --no-cached if debugging sam build
7070
sam build --debug --parameter-overrides \
71-
'ParameterKey=Architecture,ParameterValue=x86_64 ParameterKey=JavaVersion,ParameterValue=java${{ matrix.java }}'
71+
'ParameterKey=Architecture,ParameterValue=x86_64 ParameterKey=JavaVersion,ParameterValue=java${{ matrix.java }} ParameterKey=RoleArn,ParameterValue=${{ secrets.DURABLE_INTEGRATION_TEST_ROLE_ARN }}'
7272
working-directory: ./examples
7373
- name: sam deploy
7474
run: |
7575
sam deploy --stack-name JavaSDKCloudBasedIntegrationTestStack-Java${{ matrix.java }}Runtime \
76-
--resolve-image-repos --resolve-s3 --capabilities CAPABILITY_IAM --parameter-overrides \
77-
'ParameterKey=Architecture,ParameterValue=x86_64 ParameterKey=JavaVersion,ParameterValue=java${{ matrix.java }}'
76+
--resolve-image-repos --resolve-s3 --parameter-overrides \
77+
'ParameterKey=Architecture,ParameterValue=x86_64 ParameterKey=JavaVersion,ParameterValue=java${{ matrix.java }} ParameterKey=RoleArn,ParameterValue=${{ secrets.DURABLE_INTEGRATION_TEST_ROLE_ARN }}'
7878
working-directory: ./examples
7979
- name: Cloud Based Integration Tests
8080
run: mvn clean test -B -Dtest.cloud.enabled=true -Dtest=CloudBasedIntegrationTest -Dtest.function.name.suffix='-java${{ matrix.java }}-runtime'

0 commit comments

Comments
 (0)