Skip to content

Commit 1fa74cc

Browse files
committed
Initial commit
0 parents  commit 1fa74cc

17 files changed

+904
-0
lines changed

.docs/header.md

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
![nventive](https://nventive-public-assets.s3.amazonaws.com/nventive_logo_github.svg?v=2)
2+
3+
# terraform-aws-lb
4+
5+
[![License](https://img.shields.io/badge/License-Apache%202.0-blue.svg?style=flat-square)](LICENSE) [![Latest Release](https://img.shields.io/github/release/nventive/terraform-aws-lb.svg?style=flat-square)](https://github.com/nventive/terraform-aws-lb/releases/latest)
6+
7+
Terraform module to create an Application, Network or Gateway Load Balancer.
8+
9+
---
10+
11+
## Examples
12+
13+
**IMPORTANT:** We do not pin modules to versions in our examples because of the difficulty of keeping the versions in
14+
the documentation in sync with the latest released versions. We highly recommend that in your code you pin the version
15+
to the exact version you are using so that your infrastructure remains stable, and update versions in a systematic way
16+
so that they do not catch you by surprise.
17+
18+
```hcl
19+
module "alb" {
20+
source = "nventive/lb/aws"
21+
# We recommend pinning every module to a specific version
22+
# version = "x.x.x"
23+
24+
namespace = "eg"
25+
stage = "test"
26+
name = "app"
27+
28+
load_balancer_type = "application"
29+
}
30+
```

.docs/terraform-docs.yaml

Lines changed: 53 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,53 @@
1+
formatter: "markdown table"
2+
3+
header-from: .docs/header.md
4+
footer-from: .docs/footer.md
5+
6+
recursive:
7+
enabled: false
8+
path: modules
9+
10+
sections:
11+
hide: []
12+
show: []
13+
14+
content: |-
15+
{{ .Header }}
16+
{{ .Requirements }}
17+
{{ .Providers }}
18+
{{ .Modules }}
19+
{{ .Resources }}
20+
{{ .Inputs }}
21+
{{ .Outputs }}
22+
{{ .Footer }}
23+
24+
output:
25+
file: "README.md"
26+
mode: replace
27+
template: |-
28+
<!-- BEGIN_TF_DOCS -->
29+
{{ .Content }}
30+
<!-- END_TF_DOCS -->
31+
32+
output-values:
33+
enabled: false
34+
from: ""
35+
36+
sort:
37+
enabled: true
38+
by: name
39+
40+
settings:
41+
anchor: true
42+
color: true
43+
default: true
44+
description: false
45+
escape: true
46+
hide-empty: false
47+
html: true
48+
indent: 2
49+
lockfile: true
50+
read-comments: true
51+
required: true
52+
sensitive: true
53+
type: true

.editorconfig

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
[*]
2+
charset = utf-8
3+
end_of_line = lf
4+
indent_size = 2
5+
indent_style = space
6+
insert_final_newline = true
7+
max_line_length = 120
8+
tab_width = 2
9+
10+
[Makefile]
11+
indent_style = tab
12+
tab_width = 4

.gitattributes

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
# Define text file attributes.
2+
# - Treat them as text.
3+
# - Ensure no CRLF line-endings, neither on checkout nor on checkin.
4+
# - Detect whitespace errors.
5+
# - Exposed by default in `git diff --color` on the CLI.
6+
# - Validate with `git diff --check`.
7+
# - Deny applying with `git apply --whitespace=error-all`.
8+
# - Fix automatically with `git apply --whitespace=fix`.
9+
*.md text eol=lf whitespace=blank-at-eol,-blank-at-eof,-space-before-tab,tab-in-indent,tabwidth=2
10+
*.tf text eol=lf whitespace=blank-at-eol,-blank-at-eof,-space-before-tab,tab-in-indent,tabwidth=2
11+
*.yml text eol=lf whitespace=blank-at-eol,-blank-at-eof,-space-before-tab,tab-in-indent,tabwidth=2
12+
*.yaml text eol=lf whitespace=blank-at-eol,-blank-at-eof,-space-before-tab,tab-in-indent,tabwidth=2
13+
Makefile text eol=lf whitespace=blank-at-eol,-blank-at-eof,-space-before-tab,tab-in-indent,tabwidth=2
14+
.githooks/* text eol=lf whitespace=blank-at-eol,-blank-at-eof,-space-before-tab,tab-in-indent,tabwidth=2
15+
16+
# Define binary file attributes.
17+
# - Do not treat them as text.
18+
# - Include binary diff in patches instead of "binary files differ."
19+
*.gif -text diff
20+
*.jpeg -text diff
21+
*.jpg -text diff
22+
*.png -text diff
23+
*.svgz -text diff

.githooks/pre-commit

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
#!/bin/bash
2+
#
3+
# This hook will block a commit if Terraform isn't formatted properly or if README isn't up to date.
4+
#
5+
6+
[[ -f "$(which terraform)" ]] || (echo 1>&2 'Git Hooks (pre-commit): Terraform not in $PATH, can''t reformat.' && exit 1)
7+
terraform fmt -check 2>/dev/null || (echo 1>&2 'Git Hooks (pre-commit): Please run `terraform fmt` before committing.' && exit 1)
8+
9+
[[ -f "$(which terraform-docs)" ]] || (echo 1>&2 'Git Hooks (pre-commit): Terraform-docs not in $PATH, can''t update README file.' && exit 1)
10+
curl -sLo .docs/footer.md https://gist.githubusercontent.com/nventive-devops/7892a2ac9a2cc2ea219dd81796b6ce8b/raw/readme-footer.md
11+
terraform-docs markdown --config .docs/terraform-docs.yaml --output-check . 1>/dev/null 2>/dev/null || (
12+
echo 1>&2 'Git Hooks (pre-commit): Terraform-docs README file is out of date.'
13+
echo 1>&2 'Please run `make docs` before committing '
14+
exit 1
15+
)

.github/ISSUE_TEMPLATE.md

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
## Expected Behavior
2+
3+
4+
## Actual Behavior
5+
6+
7+
## Steps to Reproduce the Problem
8+
9+
1.
10+
2.
11+
3.
12+
13+
## Specifications
14+
15+
- OS [e.g. Linux, OSX, WSL, etc]:
16+
- Version [e.g. 11.5]:
17+
- Module version:
18+
- Terraform version:

.github/PULL_REQUEST_TEMPLATE.md

Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,40 @@
1+
GitHub Issue: #
2+
<!-- Link to relevant GitHub issue if applicable.
3+
All PRs should be associated with an issue -->
4+
5+
## Proposed Changes
6+
<!-- Please check one or more that apply to this PR. -->
7+
8+
- [ ] Bug fix
9+
- [ ] Feature
10+
- [ ] Code style update (formatting)
11+
- [ ] Refactoring (no functional changes, no api changes)
12+
- [ ] Build or CI related changes
13+
- [ ] Documentation content changes
14+
- [ ] Other, please describe:
15+
16+
17+
## What is the current behavior?
18+
<!-- Please describe the current behavior that you are modifying,
19+
or link to a relevant issue. -->
20+
21+
22+
## What is the new behavior?
23+
<!-- Please describe the new behavior after your modifications. -->
24+
25+
26+
## Checklist
27+
28+
Please check that your PR fulfills the following requirements:
29+
30+
- [ ] Documentation has been added/updated.
31+
- [ ] Automated tests for the changes have been added/updated.
32+
- [ ] Commits have been squashed (if applicable).
33+
- [ ] Updated [BREAKING_CHANGES.md](../BREAKING_CHANGES.md) (if you introduced a breaking change).
34+
35+
<!-- If this PR contains a breaking change, please describe the impact
36+
and migration path for existing applications below. -->
37+
38+
## Other information
39+
<!-- Please provide any additional information if necessary -->
40+
Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
name: Conventional Commits
2+
3+
on:
4+
pull_request:
5+
types:
6+
- opened
7+
- synchronize
8+
9+
#env:
10+
# GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
11+
12+
jobs:
13+
validate-commits:
14+
runs-on: ubuntu-latest
15+
16+
steps:
17+
- name: Check out code into the Go module directory
18+
uses: actions/checkout@v1
19+
20+
- name: Commitsar check
21+
uses: docker://aevea/commitsar
Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
name: Terraform actions
2+
3+
on:
4+
pull_request:
5+
types:
6+
- opened
7+
- synchronize
8+
9+
jobs:
10+
terraform-format-check:
11+
runs-on: ubuntu-latest
12+
13+
steps:
14+
- uses: actions/checkout@v3
15+
with:
16+
ref: ${{ github.event.pull_request.head.ref }}
17+
18+
- name: Set up Terraform
19+
uses: hashicorp/setup-terraform@v1
20+
21+
- name: Check Terraform Code Formatting
22+
run: terraform fmt -check
23+
24+
- name: Download footer.md
25+
run: curl -sLo .docs/footer.md https://gist.githubusercontent.com/nventive-devops/7892a2ac9a2cc2ea219dd81796b6ce8b/raw/readme-footer.md
26+
27+
- name: Render terraform docs and push changes back to PR
28+
uses: terraform-docs/gh-actions@main
29+
with:
30+
working-dir: .
31+
git-commit-message: "docs: Update README.md (automated action)"
32+
config-file: .docs/terraform-docs.yaml
33+
output-file: README.md
34+
output-method: replace
35+
git-push: "true"

.gitignore

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
# IDE
2+
.idea
3+
.vscode
4+
5+
# Terraform specific
6+
.terraform.lock.hcl
7+
.terraform/
8+
9+
# Temporary files
10+
.docs/footer.md

0 commit comments

Comments
 (0)