Skip to content

Commit ec2ae86

Browse files
committed
Added code for SSM Parameter module
1 parent 3bbd3b6 commit ec2ae86

26 files changed

+1478
-2
lines changed

.editorconfig

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
# EditorConfig is awesome: http://EditorConfig.org
2+
# Uses editorconfig to maintain consistent coding styles
3+
4+
# top-most EditorConfig file
5+
root = true
6+
7+
# Unix-style newlines with a newline ending every file
8+
[*]
9+
charset = utf-8
10+
end_of_line = lf
11+
indent_size = 2
12+
indent_style = space
13+
insert_final_newline = true
14+
max_line_length = 80
15+
trim_trailing_whitespace = true
16+
17+
[*.{tf,tfvars}]
18+
indent_size = 2
19+
indent_style = space
20+
21+
[*.md]
22+
max_line_length = 0
23+
trim_trailing_whitespace = false
24+
25+
[Makefile]
26+
tab_width = 2
27+
indent_style = tab
28+
29+
[COMMIT_EDITMSG]
30+
max_line_length = 0

.github/workflows/lock.yml

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
name: 'Lock Threads'
2+
3+
on:
4+
schedule:
5+
- cron: '50 1 * * *'
6+
7+
jobs:
8+
lock:
9+
runs-on: ubuntu-latest
10+
steps:
11+
- uses: dessant/lock-threads@v4
12+
with:
13+
github-token: ${{ secrets.GITHUB_TOKEN }}
14+
issue-comment: >
15+
I'm going to lock this issue because it has been closed for _30 days_ ⏳. This helps our maintainers find and focus on the active issues.
16+
If you have found a problem that seems similar to this, please open a new issue and complete the issue template so we can capture all the details necessary to investigate further.
17+
issue-inactive-days: '30'
18+
pr-comment: >
19+
I'm going to lock this pull request because it has been closed for _30 days_ ⏳. This helps our maintainers find and focus on the active issues.
20+
If you have found a problem that seems related to this change, please open a new issue and complete the issue template so we can capture all the details necessary to investigate further.
21+
pr-inactive-days: '30'

.github/workflows/pr-title.yml

Lines changed: 52 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,52 @@
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/action-semantic-pull-request@v5.0.2
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+
# Configure additional validation for the subject based on a regex.
32+
# This example ensures the subject starts with an uppercase character.
33+
subjectPattern: ^[A-Z].+$
34+
# If `subjectPattern` is configured, you can use this property to override
35+
# the default error message that is shown when the pattern doesn't match.
36+
# The variables `subject` and `title` can be used within the message.
37+
subjectPatternError: |
38+
The subject "{subject}" found in the pull request title "{title}"
39+
didn't match the configured pattern. Please ensure that the subject
40+
starts with an uppercase character.
41+
# For work-in-progress PRs you can typically use draft pull requests
42+
# from Github. However, private repositories on the free plan don't have
43+
# this option and therefore this action allows you to opt-in to using the
44+
# special "[WIP]" prefix to indicate this state. This will avoid the
45+
# validation of the PR title and the pull request checks remain pending.
46+
# Note that a second check will be reported if this is enabled.
47+
wip: true
48+
# When using "Squash and merge" on a PR with only one commit, GitHub
49+
# will suggest using that commit message instead of the PR title for the
50+
# merge commit, and it's easy to commit this by mistake. Enable this option
51+
# to also validate the commit message for one commit PRs.
52+
validateSingleCommit: false

.github/workflows/pre-commit.yml

Lines changed: 83 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,83 @@
1+
name: Pre-Commit
2+
3+
on:
4+
pull_request:
5+
branches:
6+
- main
7+
- master
8+
9+
env:
10+
TERRAFORM_DOCS_VERSION: v0.16.0
11+
TFLINT_VERSION: v0.44.1
12+
13+
jobs:
14+
collectInputs:
15+
name: Collect workflow inputs
16+
runs-on: ubuntu-latest
17+
outputs:
18+
directories: ${{ steps.dirs.outputs.directories }}
19+
steps:
20+
- name: Checkout
21+
uses: actions/checkout@v3
22+
23+
- name: Get root directories
24+
id: dirs
25+
uses: clowdhaus/terraform-composite-actions/directories@v1.8.3
26+
27+
preCommitMinVersions:
28+
name: Min TF pre-commit
29+
needs: collectInputs
30+
runs-on: ubuntu-latest
31+
strategy:
32+
matrix:
33+
directory: ${{ fromJson(needs.collectInputs.outputs.directories) }}
34+
steps:
35+
- name: Checkout
36+
uses: actions/checkout@v3
37+
38+
- name: Terraform min/max versions
39+
id: minMax
40+
uses: clowdhaus/terraform-min-max@v1.2.4
41+
with:
42+
directory: ${{ matrix.directory }}
43+
44+
- name: Pre-commit Terraform ${{ steps.minMax.outputs.minVersion }}
45+
# Run only validate pre-commit check on min version supported
46+
if: ${{ matrix.directory != '.' }}
47+
uses: clowdhaus/terraform-composite-actions/pre-commit@v1.8.3
48+
with:
49+
terraform-version: ${{ steps.minMax.outputs.minVersion }}
50+
tflint-version: ${{ env.TFLINT_VERSION }}
51+
args: 'terraform_validate --color=always --show-diff-on-failure --files ${{ matrix.directory }}/*'
52+
53+
- name: Pre-commit Terraform ${{ steps.minMax.outputs.minVersion }}
54+
# Run only validate pre-commit check on min version supported
55+
if: ${{ matrix.directory == '.' }}
56+
uses: clowdhaus/terraform-composite-actions/pre-commit@v1.8.3
57+
with:
58+
terraform-version: ${{ steps.minMax.outputs.minVersion }}
59+
tflint-version: ${{ env.TFLINT_VERSION }}
60+
args: 'terraform_validate --color=always --show-diff-on-failure --files $(ls *.tf)'
61+
62+
preCommitMaxVersion:
63+
name: Max TF pre-commit
64+
runs-on: ubuntu-latest
65+
needs: collectInputs
66+
steps:
67+
- name: Checkout
68+
uses: actions/checkout@v3
69+
with:
70+
ref: ${{ github.event.pull_request.head.ref }}
71+
repository: ${{github.event.pull_request.head.repo.full_name}}
72+
73+
- name: Terraform min/max versions
74+
id: minMax
75+
uses: clowdhaus/terraform-min-max@v1.2.4
76+
77+
- name: Pre-commit Terraform ${{ steps.minMax.outputs.maxVersion }}
78+
uses: clowdhaus/terraform-composite-actions/pre-commit@v1.8.3
79+
with:
80+
terraform-version: ${{ steps.minMax.outputs.maxVersion }}
81+
tflint-version: ${{ env.TFLINT_VERSION }}
82+
terraform-docs-version: ${{ env.TERRAFORM_DOCS_VERSION }}
83+
install-hcledit: true

.github/workflows/release.yml

Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
name: Release
2+
3+
on:
4+
workflow_dispatch:
5+
push:
6+
branches:
7+
- main
8+
- master
9+
paths:
10+
- '**/*.tpl'
11+
- '**/*.py'
12+
- '**/*.tf'
13+
- '.github/workflows/release.yml'
14+
15+
jobs:
16+
release:
17+
name: Release
18+
runs-on: ubuntu-latest
19+
# Skip running release workflow on forks
20+
if: github.repository_owner == 'terraform-aws-modules'
21+
steps:
22+
- name: Checkout
23+
uses: actions/checkout@v3
24+
with:
25+
persist-credentials: false
26+
fetch-depth: 0
27+
28+
- name: Release
29+
uses: cycjimmy/semantic-release-action@v3
30+
with:
31+
semantic_version: 18.0.0
32+
extra_plugins: |
33+
@semantic-release/changelog@6.0.0
34+
@semantic-release/git@10.0.0
35+
conventional-changelog-conventionalcommits@4.6.3
36+
env:
37+
GITHUB_TOKEN: ${{ secrets.SEMANTIC_RELEASE_TOKEN }}
Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
name: 'Mark or close stale issues and PRs'
2+
on:
3+
schedule:
4+
- cron: '0 0 * * *'
5+
6+
jobs:
7+
stale:
8+
runs-on: ubuntu-latest
9+
steps:
10+
- uses: actions/stale@v6
11+
with:
12+
repo-token: ${{ secrets.GITHUB_TOKEN }}
13+
# Staling issues and PR's
14+
days-before-stale: 30
15+
stale-issue-label: stale
16+
stale-pr-label: stale
17+
stale-issue-message: |
18+
This issue has been automatically marked as stale because it has been open 30 days
19+
with no activity. Remove stale label or comment or this issue will be closed in 10 days
20+
stale-pr-message: |
21+
This PR has been automatically marked as stale because it has been open 30 days
22+
with no activity. Remove stale label or comment or this PR will be closed in 10 days
23+
# Not stale if have this labels or part of milestone
24+
exempt-issue-labels: bug,wip,on-hold
25+
exempt-pr-labels: bug,wip,on-hold
26+
exempt-all-milestones: true
27+
# Close issue operations
28+
# Label will be automatically removed if the issues are no longer closed nor locked.
29+
days-before-close: 10
30+
delete-branch: true
31+
close-issue-message: This issue was automatically closed because of stale in 10 days
32+
close-pr-message: This PR was automatically closed because of stale in 10 days

.gitignore

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
# Local .terraform directories
2+
**/.terraform/*
3+
4+
# Terraform lockfile
5+
.terraform.lock.hcl
6+
7+
# .tfstate files
8+
*.tfstate
9+
*.tfstate.*
10+
11+
# Crash log files
12+
crash.log
13+
14+
# Exclude all .tfvars files, which are likely to contain sentitive data, such as
15+
# password, private keys, and other secrets. These should not be part of version
16+
# control as they are data points which are potentially sensitive and subject
17+
# to change depending on the environment.
18+
*.tfvars
19+
20+
# Ignore override files as they are usually used to override resources locally and so
21+
# are not checked in
22+
override.tf
23+
override.tf.json
24+
*_override.tf
25+
*_override.tf.json
26+
27+
# Ignore CLI configuration files
28+
.terraformrc
29+
terraform.rc

.pre-commit-config.yaml

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
repos:
2+
- repo: https://github.com/antonbabenko/pre-commit-terraform
3+
rev: v1.78.0
4+
hooks:
5+
- id: terraform_fmt
6+
- id: terraform_wrapper_module_for_each
7+
- id: terraform_validate
8+
- id: terraform_docs
9+
args:
10+
- '--args=--lockfile=false'
11+
- id: terraform_tflint
12+
args:
13+
- '--args=--only=terraform_deprecated_interpolation'
14+
- '--args=--only=terraform_deprecated_index'
15+
- '--args=--only=terraform_unused_declarations'
16+
- '--args=--only=terraform_comment_syntax'
17+
- '--args=--only=terraform_documented_outputs'
18+
- '--args=--only=terraform_documented_variables'
19+
- '--args=--only=terraform_typed_variables'
20+
- '--args=--only=terraform_module_pinned_source'
21+
- '--args=--only=terraform_naming_convention'
22+
- '--args=--only=terraform_required_version'
23+
- '--args=--only=terraform_required_providers'
24+
- '--args=--only=terraform_standard_module_structure'
25+
- '--args=--only=terraform_workspace_remote'
26+
- repo: https://github.com/pre-commit/pre-commit-hooks
27+
rev: v4.4.0
28+
hooks:
29+
- id: check-merge-conflict
30+
- id: end-of-file-fixer

.releaserc.json

Lines changed: 45 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,45 @@
1+
{
2+
"branches": [
3+
"main",
4+
"master"
5+
],
6+
"ci": false,
7+
"plugins": [
8+
[
9+
"@semantic-release/commit-analyzer",
10+
{
11+
"preset": "conventionalcommits"
12+
}
13+
],
14+
[
15+
"@semantic-release/release-notes-generator",
16+
{
17+
"preset": "conventionalcommits"
18+
}
19+
],
20+
[
21+
"@semantic-release/github",
22+
{
23+
"successComment": "This ${issue.pull_request ? 'PR is included' : 'issue has been resolved'} in version ${nextRelease.version} :tada:",
24+
"labels": false,
25+
"releasedLabels": false
26+
}
27+
],
28+
[
29+
"@semantic-release/changelog",
30+
{
31+
"changelogFile": "CHANGELOG.md",
32+
"changelogTitle": "# Changelog\n\nAll notable changes to this project will be documented in this file."
33+
}
34+
],
35+
[
36+
"@semantic-release/git",
37+
{
38+
"assets": [
39+
"CHANGELOG.md"
40+
],
41+
"message": "chore(release): version ${nextRelease.version} [skip ci]\n\n${nextRelease.notes}"
42+
}
43+
]
44+
]
45+
}

0 commit comments

Comments
 (0)