Skip to content

Commit a13167d

Browse files
committed
initial plan config
1 parent c6ec2e3 commit a13167d

1 file changed

Lines changed: 39 additions & 0 deletions

File tree

.github/terraform-plan.yaml

Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
1+
name: Deploy IAM Resources to AWS with Terraform
2+
3+
on:
4+
pull-request:
5+
branches:
6+
- main # or any other branch you want to trigger the deployment
7+
8+
jobs:
9+
terraform:
10+
name: Terraform
11+
runs-on: ubuntu-latest
12+
env:
13+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
14+
15+
steps:
16+
- name: Checkout code
17+
uses: actions/checkout@v3
18+
19+
- name: Set up Terraform
20+
uses: hashicorp/setup-terraform@v1
21+
with:
22+
terraform_version: 1.0.0 # Specify the Terraform version
23+
24+
- name: Configure AWS Credentials
25+
uses: aws-actions/configure-aws-credentials@v1
26+
with:
27+
aws-access-key-id: ${{ secrets.AWS_ACCESS_KEY_ID }}
28+
aws-secret-access-key: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
29+
aws-region: us-west-2 # Change to your AWS region
30+
31+
- name: Terraform Init
32+
run: terraform init
33+
34+
- name: Terraform Plan
35+
uses: dflook/terraform-plan@v1
36+
with:
37+
path: terraform
38+
39+

0 commit comments

Comments
 (0)