diff --git a/.github/workflows/tfdrift.yml b/.github/workflows/tfdrift.yml index ff3d07be..668f6853 100644 --- a/.github/workflows/tfdrift.yml +++ b/.github/workflows/tfdrift.yml @@ -24,9 +24,9 @@ on: type: string description: 'Terraform var file directory. e.g. vars/dev.tfvars' terraform_version: - required: false type: string - description: 'Terraform version.' + default: 1.3.6 + description: 'Required erraform version ' secrets: AZURE_CREDENTIALS: required: false @@ -37,6 +37,9 @@ on: aws_secret_access_key: required: false description: 'AWS Secret access key to install AWS CLI' + aws_session_token: + required: false + description: 'AWS Session Token to install AWS CLI' build_role: required: false description: 'AWS OIDC role for aws authentication' @@ -67,6 +70,7 @@ jobs: with: aws-access-key-id: ${{ secrets.aws_access_key_id }} aws-secret-access-key: ${{ secrets.aws_secret_access_key }} + aws-session-token: ${{ secrets.aws_session_token }} role-to-assume: ${{ secrets.build_role }} aws-region: ${{ inputs.aws_region }} role-duration-seconds: 900 @@ -79,27 +83,10 @@ jobs: with: creds: ${{ secrets.AZURE_CREDENTIALS }} - # Install the latest version of the Terraform CLI - # - name: Setup Terraform - # uses: hashicorp/setup-terraform@v2 - # with: - # terraform_wrapper: false - # Run some scripts - name: Run shell commands run: ls -la - # # Initialize a new or existing Terraform working directory by creating initial files, loading any remote state, downloading modules, etc. - # - name: "Terraform Init" - # uses: hashicorp/terraform-github-actions@master - # with: - # tf_actions_subcommand: "init" - # tf_actions_version: 1.3.6 - # tf_actions_working_dir: ${{ inputs.working_directory }} - # env: - # GITHUB_TOKEN: '${{ secrets.GITHUB }}' - # TF_CLI_ARGS: "-backend-config=token=${{ secrets.TF_API_TOKEN }}" - - name: Set up Terraform uses: hashicorp/setup-terraform@v2 with: