Skip to content

Commit ddea4bd

Browse files
committed
Eliminate deprecation warning about aws_region data source
1 parent 8fadf71 commit ddea4bd

File tree

2 files changed

+3
-63
lines changed

2 files changed

+3
-63
lines changed

.github/workflows/terraform.yml

Lines changed: 2 additions & 62 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,7 @@
1-
# Some of this logic was stolen from https://www.freecodecamp.org/news/a-lightweight-tool-agnostic-ci-cd-flow-with-github-actions/
2-
31
name: terraform
42

53
on:
64
push:
7-
# branches:
8-
# - master
95
pull_request:
106

117
jobs:
@@ -14,69 +10,13 @@ jobs:
1410
runs-on: ubuntu-latest
1511
steps:
1612
- name: checkout
17-
uses: actions/checkout@v2
13+
uses: actions/checkout@v4
1814
with:
1915
fetch-depth: 1
2016

2117
- name: terraform setup
22-
uses: hashicorp/setup-terraform@v1
23-
with:
24-
terraform_version: 0.12.29
25-
# cli_config_credentials_token: ${{ secrets.TF_API_TOKEN }}
26-
27-
# TODO: This step duplicates work done by the Makefile.
28-
# - name: check terraform formatting
29-
# id: fmt
30-
# run: |
31-
# terraform fmt -check -recursive
18+
uses: hashicorp/setup-terraform@v3
3219

3320
- name: run make
34-
# env:
35-
# TOKEN: ${{ secrets.TOKEN }}
3621
run: |
3722
make all
38-
39-
# - name: terraform init
40-
# id: init
41-
# run: terraform init
42-
#
43-
# - name: terraform plan
44-
# id: plan
45-
# if: github.event_name == 'pull_request'
46-
# run: terraform plan -no-color
47-
# continue-on-error: true
48-
#
49-
# - uses: actions/github-script@0.9.0
50-
# if: github.event_name == 'pull_request'
51-
# env:
52-
# PLAN: "terraform\n${{ steps.plan.outputs.stdout }}"
53-
# with:
54-
# github-token: ${{ secrets.GITHUB_TOKEN }}
55-
# script: |
56-
# const output = `#### Terraform Format and Style 🖌\`${{ steps.fmt.outcome }}\`
57-
# #### Terraform Initialization ⚙️\`${{ steps.init.outcome }}\`
58-
# #### Terraform Plan 📖\`${{ steps.plan.outcome }}\`
59-
#
60-
# <details><summary>Show Plan</summary>
61-
#
62-
# \`\`\`${process.env.PLAN}\`\`\`
63-
#
64-
# </details>
65-
#
66-
# *Pusher: @${{ github.actor }}, Action: \`${{ github.event_name }}\`*`;
67-
#
68-
#
69-
# github.issues.createComment({
70-
# issue_number: context.issue.number,
71-
# owner: context.repo.owner,
72-
# repo: context.repo.repo,
73-
# body: output
74-
# })
75-
#
76-
# - name: terraform plan status
77-
# if: steps.plan.outcome == 'failure'
78-
# run: exit 1
79-
#
80-
# - name: terraform apply
81-
# if: github.ref == 'refs/heads/master' && github.event_name == 'push'
82-
# run: terraform apply -auto-approve

subscription-filter.tf

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
locals {
22
function_name = var.function_name
3-
principal = "logs.${data.aws_region.current.name}.amazonaws.com"
3+
principal = "logs.${data.aws_region.current.region}.amazonaws.com"
44
}
55

66
# Get current region.

0 commit comments

Comments
 (0)