Skip to content

Commit eedf435

Browse files
committed
Initial commit
0 parents  commit eedf435

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

52 files changed

+1716
-0
lines changed

.github/release.yml

+17
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
changelog:
2+
categories:
3+
- title: Breaking Changes 🛠
4+
labels:
5+
- breaking-change
6+
- title: New Features 🎉
7+
labels:
8+
- enhancement
9+
- title: Bug Fixes 🐛
10+
labels:
11+
- bug
12+
- title: Documentation 📖
13+
labels:
14+
- documentation
15+
- title: Other Changes
16+
labels:
17+
- "*"

.github/workflows/document.yml

+54
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,54 @@
1+
# This confirms that the repo is properly documented according
2+
# to the information located in README-HEADER.md
3+
4+
name: Document
5+
6+
on:
7+
pull_request:
8+
# Run tests when PRs opened or updated
9+
types: [opened, synchronize]
10+
branches:
11+
- main
12+
concurrency: document-${{ github.base_ref }}
13+
jobs:
14+
document:
15+
name: "Document"
16+
runs-on: ubuntu-latest
17+
defaults:
18+
run:
19+
shell: bash
20+
steps:
21+
- name: "Checkout"
22+
uses: actions/checkout@main
23+
24+
- name: Setup asdf
25+
uses: asdf-vm/actions/setup@v1
26+
27+
- name: Cache asdf
28+
id: asdf-cache
29+
uses: actions/cache@v2
30+
with:
31+
path: ~/.asdf/
32+
key: ${{ runner.os }}-${{ hashFiles('**/.tool-versions') }}
33+
34+
- name: Setup asdf
35+
if: steps.asdf-cache.outputs.cache-hit != 'true'
36+
uses: asdf-vm/actions/install@v1
37+
38+
- name: "Generate documentation"
39+
run: ./scripts/document.sh
40+
env:
41+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
42+
43+
- name: "Confirm"
44+
run: |
45+
if [[ "$(basename "$(git rev-parse --show-toplevel)")" != 'terraform-aws-template' ]]; then
46+
echo "Setting core.fileMode to false to avoid false positives in documentation check."
47+
git config core.fileMode false
48+
if [[ -n $(git status --porcelain) ]]; then
49+
echo "Documentation is not up to date. Run ./scripts/document.sh"
50+
git status -v
51+
git diff
52+
exit 1
53+
fi
54+
fi

.github/workflows/format.yml

+46
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,46 @@
1+
# This confirms that the repo is properly formatted according
2+
# to the information located in README-HEADER.md
3+
4+
name: Format
5+
6+
on:
7+
pull_request:
8+
# Run tests when PRs opened or updated
9+
types: [opened, synchronize]
10+
branches:
11+
- main
12+
concurrency: format-${{ github.base_ref }}
13+
jobs:
14+
format:
15+
name: "Format"
16+
runs-on: ubuntu-latest
17+
defaults:
18+
run:
19+
shell: bash
20+
steps:
21+
- name: "Checkout"
22+
uses: actions/checkout@main
23+
24+
- name: Setup asdf
25+
uses: asdf-vm/actions/setup@v1
26+
27+
- name: Cache asdf
28+
id: asdf-cache
29+
uses: actions/cache@v2
30+
with:
31+
path: ~/.asdf/
32+
key: ${{ runner.os }}-${{ hashFiles('**/.tool-versions') }}
33+
34+
- name: Setup asdf
35+
if: steps.asdf-cache.outputs.cache-hit != 'true'
36+
uses: asdf-vm/actions/install@v1
37+
38+
- name: "Format"
39+
run: ./scripts/format.sh
40+
41+
- name: "Confirm"
42+
run: |
43+
if [[ ! -z $(git status --porcelain) ]]; then
44+
echo "Repo is not canonically formatted. Run ./scripts/format.sh"
45+
exit 1
46+
fi

.github/workflows/lint.yml

+36
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
name: Lint
2+
3+
on:
4+
pull_request:
5+
# Run linter when PRs opened or updated
6+
types: [opened, synchronize]
7+
branches:
8+
- main
9+
concurrency: lint-${{ github.base_ref }}
10+
jobs:
11+
lint:
12+
name: "Lint"
13+
runs-on: ubuntu-latest
14+
defaults:
15+
run:
16+
shell: bash
17+
steps:
18+
- name: "Checkout"
19+
uses: actions/checkout@main
20+
21+
- name: Setup asdf
22+
uses: asdf-vm/actions/setup@v1
23+
24+
- name: Cache asdf
25+
id: asdf-cache
26+
uses: actions/cache@v2
27+
with:
28+
path: ~/.asdf/
29+
key: ${{ runner.os }}-${{ hashFiles('**/.tool-versions') }}
30+
31+
- name: Setup asdf
32+
if: steps.asdf-cache.outputs.cache-hit != 'true'
33+
uses: asdf-vm/actions/install@v1
34+
35+
- name: "Lint"
36+
run: ./scripts/lint.sh

.github/workflows/release.yml

+31
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
name: Release
2+
on:
3+
push:
4+
branches: [ main ]
5+
concurrency: release-${{ github.base_ref }}
6+
jobs:
7+
release:
8+
runs-on: ubuntu-latest
9+
steps:
10+
- name: Checkout code
11+
uses: actions/checkout@main
12+
13+
- name: Setup asdf
14+
uses: asdf-vm/actions/setup@v1
15+
16+
- name: Cache asdf
17+
id: asdf-cache
18+
uses: actions/cache@v2
19+
with:
20+
path: ~/.asdf/
21+
key: ${{ runner.os }}-${{ hashFiles('**/.tool-versions') }}
22+
23+
- name: Setup asdf
24+
if: steps.asdf-cache.outputs.cache-hit != 'true'
25+
uses: asdf-vm/actions/install@v1
26+
27+
- name: Release
28+
run: ./scripts/release.sh
29+
env:
30+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
31+
GITHUB_USERNAME: ${{ github.actor }}

.github/workflows/todo.yml

+27
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
# This confirms that no TODOs have been left in the module.
2+
3+
name: TODO
4+
5+
on:
6+
pull_request:
7+
# Run tests when PRs opened or updated
8+
types: [opened, synchronize]
9+
branches:
10+
- main
11+
concurrency: todo-${{ github.base_ref }}
12+
jobs:
13+
todo:
14+
name: "TODO"
15+
runs-on: ubuntu-latest
16+
defaults:
17+
run:
18+
shell: bash
19+
steps:
20+
- name: "Checkout"
21+
uses: actions/checkout@main
22+
23+
- name: "TODO"
24+
run: |
25+
if [[ "$(basename $(git rev-parse --show-toplevel))" != 'terraform-aws-template' ]]; then
26+
./scripts/todo.sh
27+
fi

.github/workflows/validate.yml

+39
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
1+
# This confirms that the repo is properly validated according
2+
# to the information located in README-HEADER.md
3+
4+
name: Validate
5+
6+
on:
7+
pull_request:
8+
# Run tests when PRs opened or updated
9+
types: [opened, synchronize]
10+
branches:
11+
- main
12+
concurrency: validate-${{ github.base_ref }}
13+
jobs:
14+
validate:
15+
name: "Validate"
16+
runs-on: ubuntu-latest
17+
defaults:
18+
run:
19+
shell: bash
20+
steps:
21+
- name: "Checkout"
22+
uses: actions/checkout@main
23+
24+
- name: Setup asdf
25+
uses: asdf-vm/actions/setup@v1
26+
27+
- name: Cache asdf
28+
id: asdf-cache
29+
uses: actions/cache@v2
30+
with:
31+
path: ~/.asdf/
32+
key: ${{ runner.os }}-${{ hashFiles('**/.tool-versions') }}
33+
34+
- name: Setup asdf
35+
if: steps.asdf-cache.outputs.cache-hit != 'true'
36+
uses: asdf-vm/actions/install@v1
37+
38+
- name: "Validate Module"
39+
run: ./scripts/validate.sh

.gitignore

+6
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
.terraform
2+
.DS_Store
3+
target
4+
CHANGELOG.md
5+
*.tfstate
6+
*.tfstate.backup

.golang-pkgs

+2
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
github.com/gruntwork-io/[email protected]
2+
github.com/stretchr/[email protected]

.terraform-docs.yml

+6
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
formatter: formatter
2+
header-from: README-HEADER.md
3+
4+
sort:
5+
enabled: true
6+
by: required

.terraform.lock.hcl

+23
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

.tflint.hcl

+45
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,45 @@
1+
plugin "aws" {
2+
enabled = true
3+
version = "0.14.0"
4+
source = "github.com/terraform-linters/tflint-ruleset-aws"
5+
}
6+
7+
rule "terraform_deprecated_interpolation" {
8+
enabled = true
9+
}
10+
rule "terraform_deprecated_index" {
11+
enabled = true
12+
}
13+
rule "terraform_unused_declarations" {
14+
enabled = true
15+
}
16+
rule "terraform_comment_syntax" {
17+
enabled = true
18+
}
19+
rule "terraform_documented_outputs" {
20+
enabled = true
21+
}
22+
rule "terraform_documented_variables" {
23+
enabled = true
24+
}
25+
rule "terraform_typed_variables" {
26+
enabled = true
27+
}
28+
rule "terraform_module_pinned_source" {
29+
enabled = true
30+
}
31+
rule "terraform_naming_convention" {
32+
enabled = true
33+
}
34+
rule "terraform_required_version" {
35+
enabled = true
36+
}
37+
rule "terraform_required_providers" {
38+
enabled = true
39+
}
40+
rule "terraform_unused_required_providers" {
41+
enabled = true
42+
}
43+
rule "terraform_workspace_remote" {
44+
enabled = true
45+
}

.tool-versions

+7
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
terraform 1.2.4
2+
golang 1.18.3
3+
ripgrep 13.0.0
4+
tflint 0.38.1
5+
github-cli 2.13.0
6+
fd 8.4.0
7+
terraform-docs 0.16.0

LICENSE

+21
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
MIT License
2+
3+
Copyright (c) 2022 PBS
4+
5+
Permission is hereby granted, free of charge, to any person obtaining a copy
6+
of this software and associated documentation files (the "Software"), to deal
7+
in the Software without restriction, including without limitation the rights
8+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9+
copies of the Software, and to permit persons to whom the Software is
10+
furnished to do so, subject to the following conditions:
11+
12+
The above copyright notice and this permission notice shall be included in all
13+
copies or substantial portions of the Software.
14+
15+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21+
SOFTWARE.

0 commit comments

Comments
 (0)