Skip to content

Commit f7a3146

Browse files
authored
bump modules to be supported by tf 0.13+
1 parent af2f557 commit f7a3146

File tree

37 files changed

+135
-125
lines changed

37 files changed

+135
-125
lines changed

.github/CODEOWNERS

+1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
* @grupoboticario/sq-devops-dea-ped

.github/dependabot.yml

+17
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
version: 2
2+
3+
registries:
4+
github-grupoboticario:
5+
type: git
6+
url: https://github.com
7+
username: x-access-token
8+
password: ${{ secrets.GB_TERRAFORM_API_TOKEN }}
9+
10+
updates:
11+
- package-ecosystem: github-actions
12+
directory: /
13+
open-pull-requests-limit: 10
14+
schedule:
15+
interval: weekly
16+
17+
updates:

.github/workflows/dependabot.yaml

+22
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
name: Update Dependabot Config File
2+
3+
on:
4+
- pull_request
5+
6+
permissions:
7+
contents: write
8+
pull-requests: read
9+
deployments: write
10+
11+
jobs:
12+
updateDependabotCfgFile:
13+
runs-on: [self-hosted, core-shr]
14+
steps:
15+
- name: Checkout
16+
uses: actions/checkout@v4
17+
with:
18+
ref: ${{ github.event.pull_request.head.ref }}
19+
- name: Update Dependabot Config File
20+
uses: grupoboticario/actions-tf-dependabot@v1
21+
with:
22+
token: ${{ secrets.GITHUB_TOKEN }}

.github/workflows/devsecops.yml

+13
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
run-name: DevSecOps
2+
name: DevSecOps
3+
on:
4+
workflow_dispatch:
5+
push:
6+
branches:
7+
- main
8+
pull_request:
9+
types: [opened, synchronize, reopened]
10+
11+
jobs:
12+
devsecops:
13+
uses: grupoboticario/actions-devsecops-workflows/.github/workflows/devsecops.yml@v0

.github/workflows/pre-commit.yml

+9-71
Original file line numberDiff line numberDiff line change
@@ -1,78 +1,16 @@
1-
name: Pre-Commit
1+
name: pre-commit
22

33
on:
44
pull_request:
5-
branches:
6-
- main
7-
- master
8-
9-
env:
10-
TERRAFORM_DOCS_VERSION: v0.16.0
5+
branches: [main]
6+
push:
7+
branches: [main]
118

129
jobs:
13-
collectInputs:
14-
name: Collect workflow inputs
15-
runs-on: ubuntu-latest
16-
outputs:
17-
directories: ${{ steps.dirs.outputs.directories }}
10+
pre-commit:
11+
runs-on: [self-hosted, core-shr]
1812
steps:
1913
- name: Checkout
20-
uses: actions/checkout@v2
21-
22-
- name: Get root directories
23-
id: dirs
24-
uses: clowdhaus/terraform-composite-actions/[email protected]
25-
26-
preCommitMinVersions:
27-
name: Min TF pre-commit
28-
needs: collectInputs
29-
runs-on: ubuntu-latest
30-
strategy:
31-
matrix:
32-
directory: ${{ fromJson(needs.collectInputs.outputs.directories) }}
33-
steps:
34-
- name: Checkout
35-
uses: actions/checkout@v2
36-
37-
- name: Terraform min/max versions
38-
id: minMax
39-
uses: clowdhaus/[email protected]
40-
with:
41-
directory: ${{ matrix.directory }}
42-
43-
- name: Pre-commit Terraform ${{ steps.minMax.outputs.minVersion }}
44-
# Run only validate pre-commit check on min version supported
45-
if: ${{ matrix.directory != '.' }}
46-
uses: clowdhaus/terraform-composite-actions/[email protected]
47-
with:
48-
terraform-version: ${{ steps.minMax.outputs.minVersion }}
49-
args: 'terraform_validate --color=always --show-diff-on-failure --files ${{ matrix.directory }}/*'
50-
51-
- name: Pre-commit Terraform ${{ steps.minMax.outputs.minVersion }}
52-
# Run only validate pre-commit check on min version supported
53-
if: ${{ matrix.directory == '.' }}
54-
uses: clowdhaus/terraform-composite-actions/[email protected]
55-
with:
56-
terraform-version: ${{ steps.minMax.outputs.minVersion }}
57-
args: 'terraform_validate --color=always --show-diff-on-failure --files $(ls *.tf)'
58-
59-
preCommitMaxVersion:
60-
name: Max TF pre-commit
61-
runs-on: ubuntu-latest
62-
needs: collectInputs
63-
steps:
64-
- name: Checkout
65-
uses: actions/checkout@v2
66-
with:
67-
ref: ${{ github.event.pull_request.head.ref }}
68-
repository: ${{github.event.pull_request.head.repo.full_name}}
69-
70-
- name: Terraform min/max versions
71-
id: minMax
72-
uses: clowdhaus/[email protected]
73-
74-
- name: Pre-commit Terraform ${{ steps.minMax.outputs.maxVersion }}
75-
uses: clowdhaus/terraform-composite-actions/[email protected]
76-
with:
77-
terraform-version: ${{ steps.minMax.outputs.maxVersion }}
78-
terraform-docs-version: ${{ env.TERRAFORM_DOCS_VERSION }}
14+
uses: actions/checkout@v4
15+
- name: pre-commit
16+
uses: grupoboticario/actions-tf-pre-commit@v1

.gitignore

+1
Original file line numberDiff line numberDiff line change
@@ -27,3 +27,4 @@ override.tf.json
2727
# Ignore CLI configuration files
2828
.terraformrc
2929
terraform.rc
30+
.terraform.lock.hcl

.pre-commit-config.yaml

+27-24
Original file line numberDiff line numberDiff line change
@@ -1,29 +1,32 @@
11
repos:
22
- repo: https://github.com/antonbabenko/pre-commit-terraform
3-
rev: v1.64.0
3+
rev: v1.89.0
44
hooks:
5-
- id: terraform_fmt
6-
- id: terraform_validate
7-
- id: terraform_docs
5+
- id: terraform_checkov
86
args:
9-
- '--args=--lockfile=false'
7+
- --args=--skip-check CKV_AWS_23
8+
- --args=--skip-check CKV_AWS_18
9+
- --args=--skip-check CKV_AWS_109
10+
- --args=--skip-check CKV_AWS_111
11+
- --args=--skip-check CKV_AWS_144
12+
- --args=--skip-check CKV_AWS_145
13+
- --args=--skip-check CKV_AWS_149
14+
- --args=--skip-check CKV_AWS_274
15+
- --args=--skip-check CKV_AWS_356
16+
- --args=--skip-check CKV2_AWS_5
17+
- --args=--skip-check CKV2_AWS_57
18+
- --args=--skip-check CKV2_AWS_61
19+
- --args=--skip-check CKV2_AWS_62
20+
- --args=--skip-check CKV2_AWS_65
21+
- --args=--skip-check CKV_TF_1
22+
- --args=--skip-check CKV2_GHA_1
23+
- id: terraform_docs
24+
- id: terraform_docs_without_aggregate_type_defaults
25+
- id: terraform_fmt
1026
- id: terraform_tflint
11-
args:
12-
- '--args=--only=terraform_deprecated_interpolation'
13-
- '--args=--only=terraform_deprecated_index'
14-
- '--args=--only=terraform_unused_declarations'
15-
- '--args=--only=terraform_comment_syntax'
16-
- '--args=--only=terraform_documented_outputs'
17-
- '--args=--only=terraform_documented_variables'
18-
- '--args=--only=terraform_typed_variables'
19-
- '--args=--only=terraform_module_pinned_source'
20-
- '--args=--only=terraform_naming_convention'
21-
- '--args=--only=terraform_required_version'
22-
- '--args=--only=terraform_required_providers'
23-
- '--args=--only=terraform_standard_module_structure'
24-
- '--args=--only=terraform_workspace_remote'
25-
- repo: https://github.com/pre-commit/pre-commit-hooks
26-
rev: v4.1.0
27-
hooks:
28-
- id: check-merge-conflict
29-
- id: end-of-file-fixer
27+
- id: terraform_trivy
28+
# - id: terraform_validate
29+
# - id: terrascan
30+
# args:
31+
# - --args=--non-recursive
32+
# - --args=--skip-rules="AC_AWS_0500"

README.md

+1
Original file line numberDiff line numberDiff line change
@@ -201,6 +201,7 @@ Users have the ability to:
201201
1. This module does not create RDS security group. Use [terraform-aws-security-group](https://github.com/terraform-aws-modules/terraform-aws-security-group) module for this.
202202

203203
<!-- BEGINNING OF PRE-COMMIT-TERRAFORM DOCS HOOK -->
204+
204205
## Requirements
205206

206207
| Name | Version |

examples/complete-mssql/README.md

+1
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@ $ terraform apply
1515
Note that this example may create resources which cost money. Run `terraform destroy` when you don't need these resources.
1616

1717
<!-- BEGINNING OF PRE-COMMIT-TERRAFORM DOCS HOOK -->
18+
1819
## Requirements
1920

2021
| Name | Version |

examples/complete-mssql/versions.tf

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
11
terraform {
2-
required_version = ">= 0.13.1"
2+
required_version = ">= 1"
33

44
required_providers {
55
aws = {
66
source = "hashicorp/aws"
7-
version = ">= 4.0"
7+
version = ">= 4"
88
}
99
}
1010
}

examples/complete-mysql/README.md

+1
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@ $ terraform apply
1515
Note that this example may create resources which cost money. Run `terraform destroy` when you don't need these resources.
1616

1717
<!-- BEGINNING OF PRE-COMMIT-TERRAFORM DOCS HOOK -->
18+
1819
## Requirements
1920

2021
| Name | Version |

examples/complete-mysql/versions.tf

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
11
terraform {
2-
required_version = ">= 0.13.1"
2+
required_version = ">= 1"
33

44
required_providers {
55
aws = {
66
source = "hashicorp/aws"
7-
version = ">= 4.0"
7+
version = ">= 4"
88
}
99
}
1010
}

examples/complete-oracle/README.md

+1
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@ $ terraform apply
1515
Note that this example may create resources which cost money. Run `terraform destroy` when you don't need these resources.
1616

1717
<!-- BEGINNING OF PRE-COMMIT-TERRAFORM DOCS HOOK -->
18+
1819
## Requirements
1920

2021
| Name | Version |

examples/complete-oracle/versions.tf

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
11
terraform {
2-
required_version = ">= 0.13.1"
2+
required_version = ">= 1"
33

44
required_providers {
55
aws = {
66
source = "hashicorp/aws"
7-
version = ">= 4.0"
7+
version = ">= 4"
88
}
99
}
1010
}

examples/complete-postgres/README.md

+1
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@ $ terraform apply
1515
Note that this example may create resources which cost money. Run `terraform destroy` when you don't need these resources.
1616

1717
<!-- BEGINNING OF PRE-COMMIT-TERRAFORM DOCS HOOK -->
18+
1819
## Requirements
1920

2021
| Name | Version |
+2-2
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
11
terraform {
2-
required_version = ">= 0.13.1"
2+
required_version = ">= 1"
33

44
required_providers {
55
aws = {
66
source = "hashicorp/aws"
7-
version = ">= 4.0"
7+
version = ">= 4"
88
}
99
}
1010
}

examples/cross-region-replica-postgres/README.md

+1
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@ $ terraform apply
1515
Note that this example may create resources which cost money. Run `terraform destroy` when you don't need these resources.
1616

1717
<!-- BEGINNING OF PRE-COMMIT-TERRAFORM DOCS HOOK -->
18+
1819
## Requirements
1920

2021
| Name | Version |
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
11
terraform {
2-
required_version = ">= 0.13.1"
2+
required_version = ">= 1"
33

44
required_providers {
55
aws = {
66
source = "hashicorp/aws"
7-
version = ">= 4.0"
7+
version = ">= 4"
88
}
99
}
1010
}

examples/enhanced-monitoring/README.md

+1
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@ $ terraform apply
1717
Note that this example may create resources which cost money. Run `terraform destroy` when you don't need these resources.
1818

1919
<!-- BEGINNING OF PRE-COMMIT-TERRAFORM DOCS HOOK -->
20+
2021
## Requirements
2122

2223
| Name | Version |
+2-2
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
11
terraform {
2-
required_version = ">= 0.13.1"
2+
required_version = ">= 1"
33

44
required_providers {
55
aws = {
66
source = "hashicorp/aws"
7-
version = ">= 4.0"
7+
version = ">= 4"
88
}
99
}
1010
}

examples/groups/README.md

+1
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@ $ terraform apply
1515
Note that this example may create resources which cost money. Run `terraform destroy` when you don't need these resources.
1616

1717
<!-- BEGINNING OF PRE-COMMIT-TERRAFORM DOCS HOOK -->
18+
1819
## Requirements
1920

2021
| Name | Version |

examples/groups/versions.tf

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
11
terraform {
2-
required_version = ">= 0.13.1"
2+
required_version = ">= 1"
33

44
required_providers {
55
aws = {
66
source = "hashicorp/aws"
7-
version = ">= 4.0"
7+
version = ">= 4"
88
}
99
}
1010
}

examples/replica-mysql/README.md

+1
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@ $ terraform apply
1515
Note that this example may create resources which cost money. Run `terraform destroy` when you don't need these resources.
1616

1717
<!-- BEGINNING OF PRE-COMMIT-TERRAFORM DOCS HOOK -->
18+
1819
## Requirements
1920

2021
| Name | Version |

examples/replica-mysql/versions.tf

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
11
terraform {
2-
required_version = ">= 0.13.1"
2+
required_version = ">= 1"
33

44
required_providers {
55
aws = {
66
source = "hashicorp/aws"
7-
version = ">= 4.0"
7+
version = ">= 4"
88
}
99
}
1010
}

examples/replica-postgres/README.md

+1
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@ $ terraform apply
1515
Note that this example may create resources which cost money. Run `terraform destroy` when you don't need these resources.
1616

1717
<!-- BEGINNING OF PRE-COMMIT-TERRAFORM DOCS HOOK -->
18+
1819
## Requirements
1920

2021
| Name | Version |

0 commit comments

Comments
 (0)