Skip to content

Commit 68b7f03

Browse files
authored
chore: code refresh (#6)
* code refresh * removed outputs.tf * restored outputs.tf * removed .tool-versions from examples * updated readme * the example - added github_team resource * optional maintainers_team_id, removed provider config * updated readme * conditional fix * added admins list * unified users and teams assignment * delete_branch_on_merge
1 parent a69542a commit 68b7f03

File tree

17 files changed

+229
-284
lines changed

17 files changed

+229
-284
lines changed

.envrc

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1 +1,7 @@
1+
#
2+
# https://direnv.net/
3+
#
4+
15
pre-commit install
6+
7+
source_env_if_exists .envrc.private

.gitignore

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,3 +24,7 @@
2424
**/.CFUserTextEncoding
2525
**/.Trash/
2626
**/$RECYCLE.BIN/
27+
28+
## direnv
29+
/.envrc.private
30+
/.direnv/

.pre-commit-config.yaml

Lines changed: 25 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,33 @@
11
repos:
2-
# Pre-commit
2+
# Pre-commit hooks
33
- repo: https://github.com/pre-commit/pre-commit-hooks
4-
rev: v4.3.0 # Get the latest from https://github.com/pre-commit/pre-commit-hooks/releases
4+
rev: v4.5.0 # See the release notes at https://github.com/pre-commit/pre-commit-hooks/releases
55
hooks:
66
- id: end-of-file-fixer
7+
name: end of file fixer
8+
description: Let's be sure that a new line has been added to the end of the file.
79
- id: trailing-whitespace
10+
name: trailing whitespace
11+
description: Automatically remove trailing whitespace before committing.
812
- id: check-merge-conflict
13+
name: check merge conflict
14+
description: Check for files that contain merge conflict strings.
915
stages: [commit]
1016
- id: check-executables-have-shebangs
17+
name: check executables have shebangs
18+
description: Checks that non-binary executables have a proper shebang.
1119
stages: [commit]
1220
- id: detect-private-key
21+
name: detect private key
22+
description: Checks for the existence of private keys.
1323
stages: [commit]
1424
- id: check-symlinks
25+
name: check symlinks
26+
description: Checks for symlinks which do not point to anything.
1527
stages: [commit]
1628
- id: mixed-line-ending
29+
name: mixed line ending
30+
description: Replaces or checks mixed line ending.
1731
stages: [commit]
1832
- id: check-yaml
1933
name: check yaml
@@ -24,17 +38,25 @@ repos:
2438

2539
# Terraform
2640
- repo: https://github.com/antonbabenko/pre-commit-terraform
27-
rev: v1.75.0 # Get the latest from: https://github.com/antonbabenko/pre-commit-terraform/releases
41+
rev: v1.88.0 # See the release notes at https://github.com/antonbabenko/pre-commit-terraform/releases
2842
hooks:
2943
- id: terraform_fmt
44+
name: terraform fmt
45+
description: Checks if the terraform code format is valid.
3046
stages: [commit]
3147
- id: terraform_tflint
48+
name: terraform tflint
49+
description: Automatic terraform linting.
3250
stages: [commit]
3351
exclude: (examples)
3452
- id: terraform_validate
53+
name: terraform validate
54+
description: Terraform code validator.
3555
stages: [commit]
3656
exclude: (examples)
3757
- id: terraform_docs
58+
name: terraform docs
59+
description: Generates terraform documentation.
3860
args:
3961
- --args=--config=.terraform-docs.yml
4062
stages: [commit]

.terraform-docs.yml

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,15 @@
11
---
22
formatter: markdown table
33

4-
version: ">= 0.16.0, < 1.0.0"
4+
version: ">= 0.17.0, < 1.0.0"
55

66
output:
77
file: README.md
88
mode: inject
9+
template: |-
10+
<!-- BEGIN_TF_DOCS -->
11+
{{ .Content }}
12+
<!-- END_TF_DOCS -->
913
1014
sort:
1115
enabled: true

.tflint.hcl

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
config {
2+
format = "compact"
3+
module = false
4+
force = false
5+
}
6+
7+
# Enable all rules, always. The bundled plugin uses only recommended.
8+
plugin "terraform" {
9+
enabled = true
10+
preset = "all"
11+
}
12+
13+
# Enforces module version pinning.
14+
rule "terraform_module_pinned_source" {
15+
enabled = true
16+
style = "semver"
17+
}
18+
19+
# Enforces naming conventions.
20+
rule "terraform_naming_convention" {
21+
enabled = true
22+
format = "snake_case"
23+
}

.tool-versions

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
terraform 1.3.1
2-
terraform-docs 0.16.0
3-
tflint 0.41.0
4-
pre-commit 2.20.0
1+
terraform 1.5.7
2+
terraform-docs 0.17.0
3+
tflint 0.50.3
4+
pre-commit 3.6.2

CONTRIBUTING.md

Lines changed: 0 additions & 148 deletions
This file was deleted.

0 commit comments

Comments
 (0)