Skip to content

Commit e62e629

Browse files
authored
fix: Update CI workflow versions to remove deprecated runtime warnings (#67)
1 parent bf969da commit e62e629

File tree

25 files changed

+106
-88
lines changed

25 files changed

+106
-88
lines changed

.github/workflows/lock.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ jobs:
88
lock:
99
runs-on: ubuntu-latest
1010
steps:
11-
- uses: dessant/lock-threads@v4
11+
- uses: dessant/lock-threads@v5
1212
with:
1313
github-token: ${{ secrets.GITHUB_TOKEN }}
1414
issue-comment: >

.github/workflows/pr-title.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ jobs:
1414
steps:
1515
# Please look up the latest version from
1616
# https://github.com/amannn/action-semantic-pull-request/releases
17-
- uses: amannn/action-semantic-pull-request@v5.0.2
17+
- uses: amannn/action-semantic-pull-request@v5.4.0
1818
env:
1919
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
2020
with:

.github/workflows/pre-commit.yml

Lines changed: 27 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ on:
88

99
env:
1010
TERRAFORM_DOCS_VERSION: v0.16.0
11-
TFLINT_VERSION: v0.44.1
11+
TFLINT_VERSION: v0.50.3
1212

1313
jobs:
1414
collectInputs:
@@ -18,11 +18,11 @@ jobs:
1818
directories: ${{ steps.dirs.outputs.directories }}
1919
steps:
2020
- name: Checkout
21-
uses: actions/checkout@v3
21+
uses: actions/checkout@v4
2222

2323
- name: Get root directories
2424
id: dirs
25-
uses: clowdhaus/terraform-composite-actions/directories@v1.8.0
25+
uses: clowdhaus/terraform-composite-actions/directories@v1.9.0
2626

2727
preCommitMinVersions:
2828
name: Min TF pre-commit
@@ -32,19 +32,27 @@ jobs:
3232
matrix:
3333
directory: ${{ fromJson(needs.collectInputs.outputs.directories) }}
3434
steps:
35+
# https://github.com/orgs/community/discussions/25678#discussioncomment-5242449
36+
- name: Delete huge unnecessary tools folder
37+
run: |
38+
rm -rf /opt/hostedtoolcache/CodeQL
39+
rm -rf /opt/hostedtoolcache/Java_Temurin-Hotspot_jdk
40+
rm -rf /opt/hostedtoolcache/Ruby
41+
rm -rf /opt/hostedtoolcache/go
42+
3543
- name: Checkout
36-
uses: actions/checkout@v3
44+
uses: actions/checkout@v4
3745

3846
- name: Terraform min/max versions
3947
id: minMax
40-
uses: clowdhaus/terraform-min-max@v1.2.0
48+
uses: clowdhaus/terraform-min-max@v1.3.0
4149
with:
4250
directory: ${{ matrix.directory }}
4351

4452
- name: Pre-commit Terraform ${{ steps.minMax.outputs.minVersion }}
4553
# Run only validate pre-commit check on min version supported
46-
if: ${{ matrix.directory != '.' && !contains(matrix.directory, 'wrappers') }}
47-
uses: clowdhaus/terraform-composite-actions/pre-commit@v1.8.0
54+
if: ${{ matrix.directory != '.' }}
55+
uses: clowdhaus/terraform-composite-actions/pre-commit@v1.9.0
4856
with:
4957
terraform-version: ${{ steps.minMax.outputs.minVersion }}
5058
tflint-version: ${{ env.TFLINT_VERSION }}
@@ -53,7 +61,7 @@ jobs:
5361
- name: Pre-commit Terraform ${{ steps.minMax.outputs.minVersion }}
5462
# Run only validate pre-commit check on min version supported
5563
if: ${{ matrix.directory == '.' }}
56-
uses: clowdhaus/terraform-composite-actions/pre-commit@v1.8.0
64+
uses: clowdhaus/terraform-composite-actions/pre-commit@v1.9.0
5765
with:
5866
terraform-version: ${{ steps.minMax.outputs.minVersion }}
5967
tflint-version: ${{ env.TFLINT_VERSION }}
@@ -64,18 +72,26 @@ jobs:
6472
runs-on: ubuntu-latest
6573
needs: collectInputs
6674
steps:
75+
# https://github.com/orgs/community/discussions/25678#discussioncomment-5242449
76+
- name: Delete huge unnecessary tools folder
77+
run: |
78+
rm -rf /opt/hostedtoolcache/CodeQL
79+
rm -rf /opt/hostedtoolcache/Java_Temurin-Hotspot_jdk
80+
rm -rf /opt/hostedtoolcache/Ruby
81+
rm -rf /opt/hostedtoolcache/go
82+
6783
- name: Checkout
68-
uses: actions/checkout@v3
84+
uses: actions/checkout@v4
6985
with:
7086
ref: ${{ github.event.pull_request.head.ref }}
7187
repository: ${{github.event.pull_request.head.repo.full_name}}
7288

7389
- name: Terraform min/max versions
7490
id: minMax
75-
uses: clowdhaus/terraform-min-max@v1.2.0
91+
uses: clowdhaus/terraform-min-max@v1.3.0
7692

7793
- name: Pre-commit Terraform ${{ steps.minMax.outputs.maxVersion }}
78-
uses: clowdhaus/terraform-composite-actions/pre-commit@v1.8.0
94+
uses: clowdhaus/terraform-composite-actions/pre-commit@v1.9.0
7995
with:
8096
terraform-version: ${{ steps.minMax.outputs.maxVersion }}
8197
tflint-version: ${{ env.TFLINT_VERSION }}

.github/workflows/release.yml

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -20,18 +20,18 @@ jobs:
2020
if: github.repository_owner == 'terraform-aws-modules'
2121
steps:
2222
- name: Checkout
23-
uses: actions/checkout@v3
23+
uses: actions/checkout@v4
2424
with:
2525
persist-credentials: false
2626
fetch-depth: 0
2727

2828
- name: Release
29-
uses: cycjimmy/semantic-release-action@v3
29+
uses: cycjimmy/semantic-release-action@v4
3030
with:
31-
semantic_version: 18.0.0
31+
semantic_version: 23.0.2
3232
extra_plugins: |
33-
@semantic-release/[email protected].0
34-
@semantic-release/[email protected].0
35-
conventional-changelog-conventionalcommits@4.6.3
33+
@semantic-release/[email protected].3
34+
@semantic-release/[email protected].1
35+
conventional-changelog-conventionalcommits@7.0.2
3636
env:
3737
GITHUB_TOKEN: ${{ secrets.SEMANTIC_RELEASE_TOKEN }}

.github/workflows/stale-actions.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ jobs:
77
stale:
88
runs-on: ubuntu-latest
99
steps:
10-
- uses: actions/stale@v6
10+
- uses: actions/stale@v9
1111
with:
1212
repo-token: ${{ secrets.GITHUB_TOKEN }}
1313
# Staling issues and PR's

.pre-commit-config.yaml

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,9 @@
11
repos:
22
- repo: https://github.com/antonbabenko/pre-commit-terraform
3-
rev: v1.76.0
3+
rev: v1.88.0
44
hooks:
55
- id: terraform_fmt
66
- id: terraform_wrapper_module_for_each
7-
- id: terraform_validate
87
- id: terraform_docs
98
args:
109
- '--args=--lockfile=false'
@@ -23,8 +22,11 @@ repos:
2322
- '--args=--only=terraform_required_providers'
2423
- '--args=--only=terraform_standard_module_structure'
2524
- '--args=--only=terraform_workspace_remote'
25+
- '--args=--only=terraform_unused_required_providers'
26+
- id: terraform_validate
2627
- repo: https://github.com/pre-commit/pre-commit-hooks
27-
rev: v4.3.0
28+
rev: v4.5.0
2829
hooks:
2930
- id: check-merge-conflict
3031
- id: end-of-file-fixer
32+
- id: trailing-whitespace

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -120,7 +120,7 @@ module "cis_alarms" {
120120

121121
AWS CloudTrail normally publishes logs into AWS CloudWatch Logs. This module creates log metric filters together with metric alarms according to [CIS AWS Foundations Benchmark v1.4.0 (05-28-2021)](https://www.cisecurity.org/benchmark/amazon_web_services/). Read more about [CIS AWS Foundations Controls](https://docs.aws.amazon.com/securityhub/latest/userguide/securityhub-cis-controls.html).
122122

123-
### Metric Stream
123+
### Metric Stream
124124

125125
```hcl
126126
module "metric_stream" {
@@ -170,7 +170,7 @@ module "metric_stream" {
170170
module "query_definition" {
171171
source = "terraform-aws-modules/cloudwatch/aws//modules/query-definition"
172172
version = "~> 4.0"
173-
173+
174174
name = "my-query-definition"
175175
log_group_names = ["my-log-group-name"]
176176
query_string = <<EOF

wrappers/cis-alarms/main.tf

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -3,16 +3,16 @@ module "wrapper" {
33

44
for_each = var.items
55

6-
create = try(each.value.create, var.defaults.create, true)
7-
use_random_name_prefix = try(each.value.use_random_name_prefix, var.defaults.use_random_name_prefix, false)
8-
name_prefix = try(each.value.name_prefix, var.defaults.name_prefix, "")
6+
actions_enabled = try(each.value.actions_enabled, var.defaults.actions_enabled, true)
7+
alarm_actions = try(each.value.alarm_actions, var.defaults.alarm_actions, [])
98
control_overrides = try(each.value.control_overrides, var.defaults.control_overrides, {})
9+
create = try(each.value.create, var.defaults.create, true)
1010
disabled_controls = try(each.value.disabled_controls, var.defaults.disabled_controls, [])
11-
namespace = try(each.value.namespace, var.defaults.namespace, "CISBenchmark")
11+
insufficient_data_actions = try(each.value.insufficient_data_actions, var.defaults.insufficient_data_actions, [])
1212
log_group_name = try(each.value.log_group_name, var.defaults.log_group_name, "")
13-
alarm_actions = try(each.value.alarm_actions, var.defaults.alarm_actions, [])
14-
actions_enabled = try(each.value.actions_enabled, var.defaults.actions_enabled, true)
15-
tags = try(each.value.tags, var.defaults.tags, {})
13+
name_prefix = try(each.value.name_prefix, var.defaults.name_prefix, "")
14+
namespace = try(each.value.namespace, var.defaults.namespace, "CISBenchmark")
1615
ok_actions = try(each.value.ok_actions, var.defaults.ok_actions, [])
17-
insufficient_data_actions = try(each.value.insufficient_data_actions, var.defaults.insufficient_data_actions, [])
16+
tags = try(each.value.tags, var.defaults.tags, {})
17+
use_random_name_prefix = try(each.value.use_random_name_prefix, var.defaults.use_random_name_prefix, false)
1818
}

wrappers/cis-alarms/outputs.tf

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
output "wrapper" {
22
description = "Map of outputs of a wrapper."
33
value = module.wrapper
4-
# sensitive = false # No sensitive module output found
4+
# sensitive = false # No sensitive module output found
55
}

wrappers/composite-alarm/main.tf

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3,14 +3,14 @@ module "wrapper" {
33

44
for_each = var.items
55

6-
create = try(each.value.create, var.defaults.create, true)
7-
alarm_name = try(each.value.alarm_name, var.defaults.alarm_name, null)
8-
alarm_description = try(each.value.alarm_description, var.defaults.alarm_description, null)
96
actions_enabled = try(each.value.actions_enabled, var.defaults.actions_enabled, true)
107
actions_suppressor = try(each.value.actions_suppressor, var.defaults.actions_suppressor, {})
118
alarm_actions = try(each.value.alarm_actions, var.defaults.alarm_actions, null)
9+
alarm_description = try(each.value.alarm_description, var.defaults.alarm_description, null)
10+
alarm_name = try(each.value.alarm_name, var.defaults.alarm_name, null)
11+
alarm_rule = try(each.value.alarm_rule, var.defaults.alarm_rule, null)
12+
create = try(each.value.create, var.defaults.create, true)
1213
insufficient_data_actions = try(each.value.insufficient_data_actions, var.defaults.insufficient_data_actions, null)
1314
ok_actions = try(each.value.ok_actions, var.defaults.ok_actions, null)
14-
alarm_rule = try(each.value.alarm_rule, var.defaults.alarm_rule, null)
1515
tags = try(each.value.tags, var.defaults.tags, {})
1616
}

wrappers/composite-alarm/outputs.tf

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
output "wrapper" {
22
description = "Map of outputs of a wrapper."
33
value = module.wrapper
4-
# sensitive = false # No sensitive module output found
4+
# sensitive = false # No sensitive module output found
55
}

wrappers/log-group/main.tf

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,11 +4,11 @@ module "wrapper" {
44
for_each = var.items
55

66
create = try(each.value.create, var.defaults.create, true)
7+
kms_key_id = try(each.value.kms_key_id, var.defaults.kms_key_id, null)
8+
log_group_class = try(each.value.log_group_class, var.defaults.log_group_class, null)
79
name = try(each.value.name, var.defaults.name, null)
810
name_prefix = try(each.value.name_prefix, var.defaults.name_prefix, null)
911
retention_in_days = try(each.value.retention_in_days, var.defaults.retention_in_days, null)
10-
kms_key_id = try(each.value.kms_key_id, var.defaults.kms_key_id, null)
11-
log_group_class = try(each.value.log_group_class, var.defaults.log_group_class, null)
1212
skip_destroy = try(each.value.skip_destroy, var.defaults.skip_destroy, null)
1313
tags = try(each.value.tags, var.defaults.tags, {})
1414
}

wrappers/log-group/outputs.tf

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
output "wrapper" {
22
description = "Map of outputs of a wrapper."
33
value = module.wrapper
4-
# sensitive = false # No sensitive module output found
4+
# sensitive = false # No sensitive module output found
55
}

wrappers/log-metric-filter/main.tf

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -4,13 +4,13 @@ module "wrapper" {
44
for_each = var.items
55

66
create_cloudwatch_log_metric_filter = try(each.value.create_cloudwatch_log_metric_filter, var.defaults.create_cloudwatch_log_metric_filter, true)
7-
name = try(each.value.name, var.defaults.name)
8-
pattern = try(each.value.pattern, var.defaults.pattern)
97
log_group_name = try(each.value.log_group_name, var.defaults.log_group_name)
8+
metric_transformation_default_value = try(each.value.metric_transformation_default_value, var.defaults.metric_transformation_default_value, null)
9+
metric_transformation_dimensions = try(each.value.metric_transformation_dimensions, var.defaults.metric_transformation_dimensions, {})
1010
metric_transformation_name = try(each.value.metric_transformation_name, var.defaults.metric_transformation_name)
1111
metric_transformation_namespace = try(each.value.metric_transformation_namespace, var.defaults.metric_transformation_namespace)
12-
metric_transformation_value = try(each.value.metric_transformation_value, var.defaults.metric_transformation_value, "1")
13-
metric_transformation_default_value = try(each.value.metric_transformation_default_value, var.defaults.metric_transformation_default_value, null)
1412
metric_transformation_unit = try(each.value.metric_transformation_unit, var.defaults.metric_transformation_unit, null)
15-
metric_transformation_dimensions = try(each.value.metric_transformation_dimensions, var.defaults.metric_transformation_dimensions, {})
13+
metric_transformation_value = try(each.value.metric_transformation_value, var.defaults.metric_transformation_value, "1")
14+
name = try(each.value.name, var.defaults.name)
15+
pattern = try(each.value.pattern, var.defaults.pattern)
1616
}

wrappers/log-metric-filter/outputs.tf

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
output "wrapper" {
22
description = "Map of outputs of a wrapper."
33
value = module.wrapper
4-
# sensitive = false # No sensitive module output found
4+
# sensitive = false # No sensitive module output found
55
}

wrappers/log-stream/main.tf

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,6 @@ module "wrapper" {
44
for_each = var.items
55

66
create = try(each.value.create, var.defaults.create, true)
7-
name = try(each.value.name, var.defaults.name, null)
87
log_group_name = try(each.value.log_group_name, var.defaults.log_group_name, null)
8+
name = try(each.value.name, var.defaults.name, null)
99
}

wrappers/log-stream/outputs.tf

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
output "wrapper" {
22
description = "Map of outputs of a wrapper."
33
value = module.wrapper
4-
# sensitive = false # No sensitive module output found
4+
# sensitive = false # No sensitive module output found
55
}

wrappers/metric-alarm/main.tf

Lines changed: 15 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -3,27 +3,27 @@ module "wrapper" {
33

44
for_each = var.items
55

6-
create_metric_alarm = try(each.value.create_metric_alarm, var.defaults.create_metric_alarm, true)
7-
alarm_name = try(each.value.alarm_name, var.defaults.alarm_name)
6+
actions_enabled = try(each.value.actions_enabled, var.defaults.actions_enabled, true)
7+
alarm_actions = try(each.value.alarm_actions, var.defaults.alarm_actions, null)
88
alarm_description = try(each.value.alarm_description, var.defaults.alarm_description, null)
9+
alarm_name = try(each.value.alarm_name, var.defaults.alarm_name)
910
comparison_operator = try(each.value.comparison_operator, var.defaults.comparison_operator)
11+
create_metric_alarm = try(each.value.create_metric_alarm, var.defaults.create_metric_alarm, true)
12+
datapoints_to_alarm = try(each.value.datapoints_to_alarm, var.defaults.datapoints_to_alarm, null)
13+
dimensions = try(each.value.dimensions, var.defaults.dimensions, null)
14+
evaluate_low_sample_count_percentiles = try(each.value.evaluate_low_sample_count_percentiles, var.defaults.evaluate_low_sample_count_percentiles, null)
1015
evaluation_periods = try(each.value.evaluation_periods, var.defaults.evaluation_periods)
11-
threshold = try(each.value.threshold, var.defaults.threshold, null)
12-
threshold_metric_id = try(each.value.threshold_metric_id, var.defaults.threshold_metric_id, null)
13-
unit = try(each.value.unit, var.defaults.unit, null)
16+
extended_statistic = try(each.value.extended_statistic, var.defaults.extended_statistic, null)
17+
insufficient_data_actions = try(each.value.insufficient_data_actions, var.defaults.insufficient_data_actions, null)
1418
metric_name = try(each.value.metric_name, var.defaults.metric_name, null)
19+
metric_query = try(each.value.metric_query, var.defaults.metric_query, [])
1520
namespace = try(each.value.namespace, var.defaults.namespace, null)
21+
ok_actions = try(each.value.ok_actions, var.defaults.ok_actions, null)
1622
period = try(each.value.period, var.defaults.period, null)
1723
statistic = try(each.value.statistic, var.defaults.statistic, null)
18-
actions_enabled = try(each.value.actions_enabled, var.defaults.actions_enabled, true)
19-
datapoints_to_alarm = try(each.value.datapoints_to_alarm, var.defaults.datapoints_to_alarm, null)
20-
dimensions = try(each.value.dimensions, var.defaults.dimensions, null)
21-
alarm_actions = try(each.value.alarm_actions, var.defaults.alarm_actions, null)
22-
insufficient_data_actions = try(each.value.insufficient_data_actions, var.defaults.insufficient_data_actions, null)
23-
ok_actions = try(each.value.ok_actions, var.defaults.ok_actions, null)
24-
extended_statistic = try(each.value.extended_statistic, var.defaults.extended_statistic, null)
25-
treat_missing_data = try(each.value.treat_missing_data, var.defaults.treat_missing_data, "missing")
26-
evaluate_low_sample_count_percentiles = try(each.value.evaluate_low_sample_count_percentiles, var.defaults.evaluate_low_sample_count_percentiles, null)
27-
metric_query = try(each.value.metric_query, var.defaults.metric_query, [])
2824
tags = try(each.value.tags, var.defaults.tags, {})
25+
threshold = try(each.value.threshold, var.defaults.threshold, null)
26+
threshold_metric_id = try(each.value.threshold_metric_id, var.defaults.threshold_metric_id, null)
27+
treat_missing_data = try(each.value.treat_missing_data, var.defaults.treat_missing_data, "missing")
28+
unit = try(each.value.unit, var.defaults.unit, null)
2929
}

wrappers/metric-alarm/outputs.tf

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
output "wrapper" {
22
description = "Map of outputs of a wrapper."
33
value = module.wrapper
4-
# sensitive = false # No sensitive module output found
4+
# sensitive = false # No sensitive module output found
55
}

0 commit comments

Comments
 (0)