Skip to content

Commit fe12ba9

Browse files
Initial commit
0 parents  commit fe12ba9

24 files changed

+624
-0
lines changed

Diff for: .editorconfig

+58
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,58 @@
1+
[*]
2+
end_of_line = lf
3+
charset = utf-8
4+
indent_style = space
5+
indent_size = 4
6+
insert_final_newline = true
7+
trim_trailing_whitespace = true
8+
9+
[*.py]
10+
indent_style = space
11+
indent_size = 4
12+
max_line_length = 140
13+
14+
[*.sh]
15+
indent_style = space
16+
indent_size = 2
17+
18+
[Makefile]
19+
indent_style = tab
20+
21+
[*.{tf,tfvars}]
22+
indent_size = 2
23+
indent_style = space
24+
25+
[*.{yml,yaml}]
26+
indent_style = space
27+
indent_size = 2
28+
29+
[*.feature]
30+
indent_size = 2
31+
32+
[*.{json,tpl}]
33+
indent_style = space
34+
indent_size = 2
35+
36+
[Jenkinsfile]
37+
indent_size = 2
38+
indent_style = space
39+
40+
[*.{xml,config,props,targets,nuspec,resx,ruleset,vsixmanifest,vsct}]
41+
indent_size = 2
42+
43+
[{*.scala,*.sbt}]
44+
indent_size = 2
45+
max_line_length = 80
46+
47+
[{*.hcl,*.conf}]
48+
indent_size = 2
49+
max_line_length = 100
50+
51+
# JS
52+
[*.js, **/*.js]
53+
indent_size = 4
54+
indent_style = space
55+
56+
[{package.json}]
57+
indent_size = 2
58+
indent_style = space

Diff for: .github/ISSUE_TEMPLATE/Bug_report.md

+24
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
---
2+
name: 🐛 Bug Report
3+
about: If something isn't working as expected 🤔.
4+
5+
---
6+
7+
## Bug Report
8+
9+
### Steps to Reproduce:
10+
1. ...step 1 description...
11+
2. ...step 2 description...
12+
3. ...step 3 description...
13+
14+
### Expected Result:
15+
...description of what you expected to see...
16+
17+
### Actual Result:
18+
...what actually happened, including full exceptions (please include the entire stack trace, including "caused by" entries), log entries, screen shots etc. where appropriate...
19+
20+
### Environment:
21+
...version and build of the project, OS and runtime versions, virtualised environment (if any), etc. ...
22+
23+
### Additional Context:
24+
...add any other context about the problem here. If applicable, add screenshots to help explain...

Diff for: .github/ISSUE_TEMPLATE/Feature_request.md

+17
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
---
2+
name: 🚀 Feature Request
3+
about: I have a suggestion (and may want to implement it 🙂)!
4+
5+
---
6+
7+
## Feature Request
8+
9+
### Description of Problem:
10+
...what *problem* are you trying to solve that the project doesn't currently solve?
11+
12+
...please resist the temptation to describe your request in terms of a solution. Job Story form ("When [triggering condition], I want to [motivation/goal], so I can [outcome].") can help ensure you're expressing a problem statement.
13+
14+
### Potential Solutions:
15+
...clearly and concisely describe what you want to happen. Add any considered drawbacks.
16+
17+
... if you've considered alternatives, clearly and concisely describe those too.

Diff for: .github/ISSUE_TEMPLATE/Support_question.md

+11
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
---
2+
name: 🤗 Support Question
3+
about: If you have a question about configuration, usage, etc. 💬
4+
5+
---
6+
7+
## Support Question
8+
9+
...ask your question here.
10+
11+
...be sure to search existing issues since someone might have already asked something similar.

Diff for: .github/release-drafter.yml

+2
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
# Configuration for Release Drafter: https://github.com/toolmantim/release-drafter
2+
_extends: .github

Diff for: .github/settings.yml

+26
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
# These settings are synced to GitHub by https://probot.github.io/apps/settings/
2+
_extends: .github
3+
4+
repository:
5+
# See https://developer.github.com/v3/repos/#edit for all available settings.
6+
name: terraform-module-blueprint
7+
description: "ℹ️ Terraform module blueprint."
8+
homepage: https://ivankatliarchuk.github.io
9+
topics: ivank, terraform, terraform-module
10+
private: false
11+
has_issues: true
12+
has_projects: false
13+
has_wiki: false
14+
has_downloads: false
15+
has_pages: true
16+
is_template: true
17+
default_branch: master
18+
allow_squash_merge: true
19+
allow_merge_commit: true
20+
allow_rebase_merge: true
21+
delete_branch_on_merge: true
22+
enable_automated_security_fixes: true
23+
enable_vulnerability_alerts: false
24+
25+
branches:
26+
- name: master

Diff for: .github/stale.yml

+2
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
# Configuration for https://github.com/probot/stale
2+
_extends: .github

Diff for: .github/workflows/lint.yml

+42
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,42 @@
1+
name: linter
2+
3+
on:
4+
push:
5+
branches: [ master ]
6+
pull_request:
7+
8+
env:
9+
# renovate: datasource=github-releases depName=terraform-linters/tflint
10+
TFLINT_VERSION: v0.34.0
11+
12+
jobs:
13+
tflint:
14+
runs-on: ${{ matrix.os }}
15+
16+
strategy:
17+
matrix:
18+
os: [ubuntu-latest]
19+
20+
steps:
21+
- uses: actions/checkout@v3
22+
name: Checkout source code
23+
24+
- uses: actions/cache@v3
25+
name: Cache plugin dir
26+
with:
27+
path: ~/.tflint.d/plugins
28+
key: ${{ matrix.os }}-tflint-${{ hashFiles('.tflint.hcl') }}
29+
30+
- uses: terraform-linters/setup-tflint@v2
31+
name: Setup TFLint
32+
with:
33+
tflint_version: ${{ env.RENOVATE_CONFIG_FOLDER }}
34+
35+
- name: Show version
36+
run: tflint --version
37+
38+
- name: Init TFLint
39+
run: tflint --init
40+
41+
- name: Run TFLint
42+
run: tflint -f compact

Diff for: .github/workflows/pr-title.yml

+49
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,49 @@
1+
name: 'validate-pr-title'
2+
3+
on:
4+
pull_request_target:
5+
types:
6+
- opened
7+
- edited
8+
- synchronize
9+
10+
jobs:
11+
main:
12+
name: validate pr title
13+
runs-on: ubuntu-latest
14+
steps:
15+
# Please look up the latest version from
16+
# https://github.com/amannn/action-semantic-pull-request/releases
17+
- uses: amannn/[email protected]
18+
env:
19+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
20+
with:
21+
# Configure which types are allowed.
22+
# Default: https://github.com/commitizen/conventional-commit-types
23+
types: |
24+
fix
25+
feat
26+
docs
27+
ci
28+
chore
29+
# Configure that a scope must always be provided.
30+
requireScope: false
31+
# If `subjectPattern` is configured, you can use this property to override
32+
# the default error message that is shown when the pattern doesn't match.
33+
# The variables `subject` and `title` can be used within the message.
34+
subjectPatternError: |
35+
The subject "{subject}" found in the pull request title "{title}"
36+
didn't match the configured pattern. Please ensure that the subject
37+
starts with an uppercase character.
38+
# For work-in-progress PRs you can typically use draft pull requests
39+
# from Github. However, private repositories on the free plan don't have
40+
# this option and therefore this action allows you to opt-in to using the
41+
# special "[WIP]" prefix to indicate this state. This will avoid the
42+
# validation of the PR title and the pull request checks remain pending.
43+
# Note that a second check will be reported if this is enabled.
44+
wip: true
45+
# When using "Squash and merge" on a PR with only one commit, GitHub
46+
# will suggest using that commit message instead of the PR title for the
47+
# merge commit, and it's easy to commit this by mistake. Enable this option
48+
# to also validate the commit message for one commit PRs.
49+
validateSingleCommit: false

Diff for: .github/workflows/release.draft.yml

+60
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,60 @@
1+
---
2+
name: release.draft
3+
4+
on:
5+
push:
6+
branches:
7+
- master
8+
workflow_dispatch:
9+
inputs:
10+
prerelease:
11+
description: Is this a pre-release
12+
required: true
13+
default: true
14+
type: boolean
15+
publish:
16+
description: Publish release
17+
required: false
18+
default: false
19+
type: boolean
20+
bump:
21+
description: 'Bumping (#major, #minor or #patch)'
22+
required: false
23+
default: patch
24+
type: choice
25+
options:
26+
- 'patch'
27+
- 'minor'
28+
- 'major'
29+
30+
jobs:
31+
draft-a-release:
32+
runs-on: ubuntu-latest
33+
steps:
34+
35+
- uses: actions/checkout@v3
36+
37+
- name: check next version
38+
uses: anothrNick/[email protected]
39+
id: tag
40+
env:
41+
DRY_RUN: true
42+
WITH_V: true
43+
DEFAULT_BUMP: ${{ github.event_name == 'workflow_dispatch' && github.event.inputs.bump || 'patch' }}
44+
45+
- name: release-draft
46+
uses: release-drafter/[email protected]
47+
if: "!contains(github.event.head_commit.message, 'skip')"
48+
id: release
49+
env:
50+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
51+
with:
52+
publish: ${{ github.event.inputs.publish }}
53+
prerelease: ${{ github.event.inputs.prerelease }}
54+
tag: ${{ steps.tag.outputs.new_tag }}
55+
56+
- name: check-version
57+
run: |
58+
echo "release it: ${{ github.event.inputs.prerelease }}"
59+
echo "out: ${{ steps.release.name }}"
60+
echo "tag: ${{ steps.release.outputs.tag_name }}"

Diff for: .github/workflows/validator.yml

+54
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,54 @@
1+
---
2+
name: validator
3+
# This workflow is triggered on pushes to the repository.
4+
on:
5+
pull_request:
6+
branches:
7+
- main
8+
- master
9+
workflow_dispatch:
10+
11+
12+
jobs:
13+
collectInputs:
14+
name: collect workflow inputs
15+
runs-on: ubuntu-latest
16+
outputs:
17+
directories: ${{ steps.dirs.outputs.directories }}
18+
steps:
19+
- name: Checkout
20+
uses: actions/checkout@v3
21+
22+
- name: Get root directories
23+
id: dirs
24+
uses: clowdhaus/terraform-composite-actions/[email protected]
25+
26+
tfLint:
27+
name: tflint
28+
runs-on: ubuntu-latest
29+
steps:
30+
- uses: actions/checkout@master
31+
- name: TFLint
32+
uses: docker://wata727/tflint
33+
34+
fmt:
35+
name: code format
36+
runs-on: ubuntu-latest
37+
container:
38+
image: hashicorp/terraform:latest
39+
steps:
40+
- uses: actions/checkout@master
41+
- run: |
42+
terraform fmt --recursive -check=true
43+
44+
preCommit:
45+
name: pre-commit-hook
46+
runs-on: macos-latest
47+
steps:
48+
- uses: actions/checkout@master
49+
- name: install dependencies
50+
run: |
51+
brew install pre-commit terraform-docs terraform tflint
52+
- name: validate sources
53+
run: |
54+
pre-commit run --all-files

Diff for: .gitignore

+9
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
# Local .terraform directories
2+
**/.terraform/*
3+
4+
# .tfstate files
5+
*.tfstate
6+
*.tfstate.*
7+
8+
# .tfvars files
9+
*.tfvars

Diff for: .pre-commit-config.yaml

+24
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
repos:
2+
- repo: https://github.com/pre-commit/pre-commit-hooks
3+
rev: v4.2.0
4+
hooks:
5+
- id: check-added-large-files
6+
args: ['--maxkb=500']
7+
- id: check-executables-have-shebangs
8+
- id: pretty-format-json
9+
args: ['--autofix', '--no-sort-keys', '--indent=2']
10+
- id: check-byte-order-marker
11+
- id: check-case-conflict
12+
- id: check-executables-have-shebangs
13+
- id: check-merge-conflict
14+
- id: check-symlinks
15+
- id: detect-private-key
16+
- id: check-merge-conflict
17+
- id: detect-aws-credentials
18+
args: ['--allow-missing-credentials']
19+
- repo: https://github.com/antonbabenko/pre-commit-terraform
20+
rev: v1.70.1
21+
hooks:
22+
- id: terraform_fmt
23+
- id: terraform_docs
24+
- id: terraform_tflint

0 commit comments

Comments
 (0)