generated from opzkit/tf-template
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
0 parents
commit c8af398
Showing
11 changed files
with
157 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
const Configuration = { | ||
|
||
extends: ['@commitlint/config-conventional'], | ||
|
||
/* | ||
* Any rules defined here will override rules from @commitlint/config-conventional | ||
*/ | ||
rules: { | ||
'body-max-line-length': [2, 'always', 200], | ||
}, | ||
}; | ||
|
||
module.exports = Configuration; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
version: 2 | ||
updates: | ||
- package-ecosystem: terraform | ||
directory: "/" | ||
schedule: | ||
interval: "daily" | ||
open-pull-requests-limit: 10 | ||
|
||
- package-ecosystem: terraform | ||
directory: "/examples" | ||
schedule: | ||
interval: "daily" | ||
open-pull-requests-limit: 10 | ||
|
||
- package-ecosystem: "github-actions" | ||
directory: "/" | ||
schedule: | ||
interval: "daily" | ||
open-pull-requests-limit: 10 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
name: Build | ||
|
||
on: [ push, workflow_dispatch ] | ||
|
||
jobs: | ||
examples: | ||
runs-on: ubuntu-latest | ||
strategy: | ||
fail-fast: false | ||
matrix: | ||
os: [ ubuntu-latest ] | ||
tf-version: [ 1.1.9, 1.2.9, 1.3.2 ] | ||
steps: | ||
- name: Install terraform v${{ matrix.tf-version }} | ||
run: | | ||
curl -LO https://releases.hashicorp.com/terraform/${{ matrix.tf-version }}/terraform_${{ matrix.tf-version }}_linux_amd64.zip | ||
unzip terraform_${{ matrix.tf-version }}_linux_amd64.zip | ||
sudo mv terraform /usr/local/bin | ||
rm * | ||
- name: Checkout code | ||
uses: actions/checkout@v2 | ||
- name: Validate examples terraform v${{ matrix.tf-version }} | ||
run: make examples | ||
build: | ||
needs: [examples] | ||
runs-on: ubuntu-latest | ||
steps: | ||
- run: echo "OK" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
name: Lint Commit Messages | ||
|
||
on: [pull_request] | ||
|
||
jobs: | ||
commitlint: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v3 | ||
with: | ||
fetch-depth: 0 | ||
- uses: wagoid/commitlint-github-action@v5 | ||
with: | ||
configFile: "./.github/commitlint.config.js" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
name: Terrascan | ||
on: [ pull_request ] | ||
# https://github.com/marketplace/actions/terrascan-iac-scanner | ||
jobs: | ||
terrascan: | ||
runs-on: ubuntu-latest | ||
name: terrascan | ||
steps: | ||
- name: Checkout repository | ||
uses: actions/checkout@v3 | ||
- name: Run Terrascan | ||
id: terrascan | ||
uses: tenable/terrascan-action@main | ||
with: | ||
iac_type: 'terraform' | ||
iac_version: 'v14' | ||
policy_type: 'aws' | ||
only_warn: true | ||
sarif_upload: true | ||
#non_recursive: | ||
#iac_dir: | ||
#policy_path: | ||
#skip_rules: | ||
#config_path: | ||
#webhook_url: | ||
#webhook_token: | ||
- name: Upload SARIF file | ||
uses: github/codeql-action/upload-sarif@v2 | ||
with: | ||
sarif_file: terrascan.sarif |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
# Local .terraform directories | ||
**/.terraform/* | ||
|
||
# .tfstate files | ||
#*.tfstate | ||
*.tfstate.* | ||
|
||
# Crash log files | ||
crash.log | ||
*.tfvars | ||
|
||
|
||
examples/**/.terraform.lock.hcl | ||
.idea |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
* @argoyle @peter-svensson |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
MIT License | ||
|
||
Copyright (c) 2022 Opzkit | ||
|
||
Permission is hereby granted, free of charge, to any person obtaining a copy | ||
of this software and associated documentation files (the "Software"), to deal | ||
in the Software without restriction, including without limitation the rights | ||
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell | ||
copies of the Software, and to permit persons to whom the Software is | ||
furnished to do so, subject to the following conditions: | ||
|
||
The above copyright notice and this permission notice shall be included in all | ||
copies or substantial portions of the Software. | ||
|
||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR | ||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, | ||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE | ||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER | ||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, | ||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE | ||
SOFTWARE. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
#!/usr/bin/make -f | ||
|
||
SHELL = /bin/bash | ||
EXAMPLES = $(shell find ./examples/* -maxdepth 1 -type d -not -path '*/\.*') | ||
|
||
.PHONY: examples | ||
examples: $(addprefix example/,$(EXAMPLES)) | ||
|
||
.PHONY: example/% | ||
example/%: | ||
@echo "Processing example: $(notdir $*)" | ||
@terraform -chdir=$* init | ||
@terraform -chdir=$* validate | ||
@terraform -chdir=$* plan | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
# tf-template | ||
Template repository for Terraform modules |
Empty file.