Skip to content

Commit 3221bc1

Browse files
committed
#43 AWS CLIのインストールステップを削除し、AWS認証情報の設定を追加
1 parent 2c55ad2 commit 3221bc1

1 file changed

Lines changed: 4 additions & 17 deletions

File tree

.github/workflows/tfdrift.yaml

Lines changed: 4 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -11,28 +11,16 @@ on:
1111
jobs:
1212
drift-detection:
1313
runs-on: arc-runner-set
14+
container: hashicorp/terraform:latest
1415

1516
steps:
1617
- name: Checkout Repository
1718
uses: actions/checkout@v4
1819

19-
- name: Setup Node.js
20-
uses: actions/setup-node@v4
20+
- name: Configure AWS credentials
21+
uses: aws-actions/configure-aws-credentials@v4
2122
with:
22-
node-version: '18'
23-
24-
# - name: Install AWS CLI
25-
# run: |
26-
# curl "https://awscli.amazonaws.com/awscli-exe-linux-x86_64.zip" -o "awscliv2.zip"
27-
# unzip awscliv2.zip
28-
# sudo ./aws/install
29-
# aws --version
30-
31-
- name: Set up Terraform
32-
uses: hashicorp/setup-terraform@v3
33-
with:
34-
terraform_version: 1.11.3
35-
terraform_wrapper: false
23+
aws-region: ap-northeast-2
3624

3725
- name: Terraform Init
3826
run: |
@@ -46,7 +34,6 @@ jobs:
4634
terraform plan -detailed-exitcode
4735
4836
- name: Send SNS Notification on Plan Failure
49-
uses: aws-actions/configure-aws-credentials@v1
5037
if: ${{ failure() }}
5138
run: |
5239
aws sns publish \

0 commit comments

Comments
 (0)