diff --git a/.github/actions/e2e/cleanup/action.yaml b/.github/actions/e2e/cleanup/action.yaml index c97996051108..21032bd2d8bb 100644 --- a/.github/actions/e2e/cleanup/action.yaml +++ b/.github/actions/e2e/cleanup/action.yaml @@ -21,12 +21,6 @@ inputs: runs: using: "composite" steps: - - name: configure aws credentials - uses: aws-actions/configure-aws-credentials@v4.0.1 - with: - role-to-assume: arn:aws:iam::${{ inputs.account_id }}:role/${{ inputs.role }} - aws-region: ${{ inputs.region }} - role-duration-seconds: 21600 - uses: actions/checkout@v4 with: ref: ${{ inputs.git_ref }} diff --git a/.github/actions/e2e/create-cluster/action.yaml b/.github/actions/e2e/create-cluster/action.yaml index 279ef08be588..149088bbe54e 100644 --- a/.github/actions/e2e/create-cluster/action.yaml +++ b/.github/actions/e2e/create-cluster/action.yaml @@ -30,12 +30,6 @@ inputs: runs: using: "composite" steps: - - name: configure aws credentials - uses: aws-actions/configure-aws-credentials@v4.0.1 - with: - role-to-assume: arn:aws:iam::${{ inputs.account_id }}:role/${{ inputs.role }} - aws-region: ${{ inputs.region }} - role-duration-seconds: 21600 - uses: actions/checkout@v4 with: ref: ${{ inputs.git_ref }} diff --git a/.github/actions/e2e/install-karpenter/action.yaml b/.github/actions/e2e/install-karpenter/action.yaml index 74179c812297..dec40174c4e3 100644 --- a/.github/actions/e2e/install-karpenter/action.yaml +++ b/.github/actions/e2e/install-karpenter/action.yaml @@ -24,12 +24,6 @@ inputs: runs: using: "composite" steps: - - name: configure aws credentials - uses: aws-actions/configure-aws-credentials@v4.0.1 - with: - role-to-assume: arn:aws:iam::${{ inputs.account_id }}:role/${{ inputs.role }} - aws-region: ${{ inputs.region }} - role-duration-seconds: 21600 - uses: actions/checkout@v4 with: ref: ${{ inputs.git_ref }} diff --git a/.github/workflows/e2e-cleanup.yaml b/.github/workflows/e2e-cleanup.yaml index 7f16e6c548e2..407ee9dc3b34 100644 --- a/.github/workflows/e2e-cleanup.yaml +++ b/.github/workflows/e2e-cleanup.yaml @@ -14,6 +14,8 @@ on: - "us-east-2" - "us-west-2" - "eu-west-1" +permissions: + id-token: write # aws-actions/configure-aws-credentials@v4.0.1 jobs: cleanup: name: cleanup-${{ inputs.cluster_name }} @@ -22,6 +24,12 @@ jobs: - uses: actions/checkout@v4 with: ref: ${{ inputs.git_ref }} + - name: configure aws credentials + uses: aws-actions/configure-aws-credentials@v4.0.1 + with: + role-to-assume: arn:aws:iam::${{ vars.ACCOUNT_ID }}:role/${{ vars.ROLE_NAME }} + aws-region: ${{ inputs.region }} + role-duration-seconds: 21600 - name: cleanup karpenter and cluster '${{ inputs.cluster_name }}' resources uses: ./.github/actions/e2e/cleanup with: