Skip to content

Commit

Permalink
added OIDC auth
Browse files Browse the repository at this point in the history
Derek Morgan committed Oct 14, 2024

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature.
1 parent d5fa86d commit ce52cf1
Showing 2 changed files with 11 additions and 6 deletions.
15 changes: 10 additions & 5 deletions .github/workflows/terraform.yml
Original file line number Diff line number Diff line change
@@ -9,18 +9,23 @@ permissions:
contents: read

jobs:

terraform:
name: 'Terraform'
runs-on: ubuntu-latest
environment: production

defaults:
run:
shell: bash
working-directory: ./terraform

steps:
# Checkout the repository to the GitHub Actions runner
- name: Configure AWS Credentials
uses: aws-actions/configure-aws-credentials@v4
with:
role-to-assume: ${{ secrets.ROLE_TO_ASSUME }}
aws-region: us-east-1

- name: Checkout
uses: actions/checkout@v4

@@ -30,12 +35,12 @@ jobs:

# Initialize a new or existing Terraform working directory by creating initial files, loading any remote state, downloading modules, etc.
- name: Terraform Init
run: terraform -chdir="./terraform" init
run: terraform init

# Checks that all Terraform configuration files adhere to a canonical format
- name: Terraform Format
run: terraform -chdir="./terraform" fmt -check
run: terraform fmt -check

# Generates an execution plan for Terraform
- name: Terraform Plan
run: terraform -chdir="./terraform" plan -input=false
run: terraform plan -input=false
2 changes: 1 addition & 1 deletion cfn/oidc-role.yaml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
Parameters:
Repo:
Description: The GitHub organization/repo for which the OIDC provider is set up
Type: String
Type: String
Resources:
MyOIDCProvider:
Type: 'AWS::IAM::OIDCProvider'

0 comments on commit ce52cf1

Please sign in to comment.