Skip to content

Commit

Permalink
feat: updated drift workflow for sso aws login
Browse files Browse the repository at this point in the history
  • Loading branch information
VishwajitNagulkar authored Aug 24, 2023
1 parent 8ccc263 commit e21f432
Showing 1 changed file with 6 additions and 19 deletions.
25 changes: 6 additions & 19 deletions .github/workflows/tfdrift.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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'
Expand Down Expand Up @@ -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
Expand All @@ -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:
Expand Down

0 comments on commit e21f432

Please sign in to comment.