diff --git a/.github/PULL_REQUEST_TEMPLATE.md b/.github/PULL_REQUEST_TEMPLATE.md index e414e28..98d6aa3 100644 --- a/.github/PULL_REQUEST_TEMPLATE.md +++ b/.github/PULL_REQUEST_TEMPLATE.md @@ -1,12 +1,88 @@ -## what -* Describe high-level what changed as a result of these commits (i.e. in plain-english, what do these changes mean?) -* Use bullet points to be concise and to the point. - -## why -* Provide the justifications for the changes (e.g. business case). -* Describe why these changes were made (e.g. why do these commits fix the problem?) -* Use bullet points to be concise and to the point. - -## references -* Link to any supporting jira issues or helpful documentation to add some context (e.g. stackoverflow). -* Use `closes #123`, if this PR closes a Jira issue `#123` +## ๐Ÿ“Œ Description + + + +--- + +## ๐Ÿ”„ Type of Change + + + +* [ ] ๐Ÿ› Bug fix (non-breaking change) +* [ ] โœจ New resource / feature +* [ ] โ™ป๏ธ Refactoring +* [ ] โšก Performance improvement +* [ ] ๐Ÿ”’ Security improvement +* [ ] ๐Ÿ“ Documentation update +* [ ] โš ๏ธ BREAKING CHANGE +* [ ] โš™๏ธ CI/CD update + +--- + +## ๐ŸŒ Terraform Scope + + + +* [ ] New resource added +* [ ] Existing resource updated +* [ ] Variable(s) modified +* [ ] Output(s) modified +* [ ] Provider / backend configuration change +* [ ] CI/CD (Terraform workflow) update +* [ ] Examples / usage updated + +--- + +## โœ… Checklist + + + +* [ ] Code follows Terraform best practices +* [ ] `terraform fmt -recursive` and `terraform validate` have been executed +* [ ] `terraform plan` has been reviewed and changes are expected +* [ ] Changes are backward compatible (or breaking changes are clearly documented) +* [ ] Documentation has been updated (README, examples, etc.) +* [ ] Variables and outputs are properly defined and documented +* [ ] No sensitive data (secrets, credentials, keys) is exposed + +--- + +## ๐Ÿงฉ Terraform Version & Providers + + + +* Terraform Version: +* Provider(s): + +--- + +## ๐Ÿงช Testing + + + +* [ ] Tested locally using `terraform plan` / `apply` +* [ ] Tested in a staging / sandbox environment (if applicable) + +**Test Details:** + + + +--- + +## ๐Ÿ“ธ Screenshots / Documentation + + + +--- + +## ๐Ÿ”— Related Issues + + + +Closes # + +--- + +## ๐Ÿ“ Additional Notes + + \ No newline at end of file diff --git a/.github/workflows/automerge.yml b/.github/workflows/automerge.yml index e51bfa7..481c51b 100644 --- a/.github/workflows/automerge.yml +++ b/.github/workflows/automerge.yml @@ -1,3 +1,4 @@ +--- name: Auto merge on: @@ -17,3 +18,4 @@ jobs: tfchecks_azure: '["tf-lint / tflint"]' secrets: GITHUB: ${{ secrets.GITHUB }} +... \ No newline at end of file diff --git a/.github/workflows/changelog.yml b/.github/workflows/changelog.yml deleted file mode 100644 index 4c3bb12..0000000 --- a/.github/workflows/changelog.yml +++ /dev/null @@ -1,14 +0,0 @@ -name: changelog -permissions: write-all -on: - push: - tags: - - "*" - workflow_dispatch: -jobs: - changelog: - uses: clouddrove/github-shared-workflows/.github/workflows/changelog.yml@master - secrets: inherit - with: - branch: 'master' - diff --git a/.github/workflows/auto_assignee.yml b/.github/workflows/pr-auto-assignee.yml similarity index 54% rename from .github/workflows/auto_assignee.yml rename to .github/workflows/pr-auto-assignee.yml index a07d2fa..38c89bc 100644 --- a/.github/workflows/auto_assignee.yml +++ b/.github/workflows/pr-auto-assignee.yml @@ -1,12 +1,16 @@ +--- name: Auto Assign PRs + on: pull_request: types: [opened, reopened] + workflow_dispatch: jobs: assignee: - uses: clouddrove/github-shared-workflows/.github/workflows/auto_assignee.yml@master + uses: clouddrove/github-shared-workflows/.github/workflows/pr-auto-assignee.yml@v2 secrets: - GITHUB: ${{ secrets.GITHUB }} + GITHUB: ${{ secrets.GITHUB_TOKEN }} with: assignees: 'clouddrove-ci' +... \ No newline at end of file diff --git a/.github/workflows/pr-check.yml b/.github/workflows/pr-check.yml new file mode 100644 index 0000000..def59bc --- /dev/null +++ b/.github/workflows/pr-check.yml @@ -0,0 +1,11 @@ +--- +name: ๐Ÿ” PR Checks + +on: + pull_request: + types: [opened, edited, synchronize, reopened] +jobs: + pr-validation: + if: github.actor != 'dependabot[bot]' + uses: clouddrove/github-shared-workflows/.github/workflows/pr-checks.yml@v2 +... \ No newline at end of file diff --git a/.github/workflows/pre-commit.yml b/.github/workflows/pre-commit.yml index 6ff79c5..676fce4 100644 --- a/.github/workflows/pre-commit.yml +++ b/.github/workflows/pre-commit.yml @@ -1,3 +1,4 @@ +--- name: pre-commit on: pull_request: @@ -35,3 +36,4 @@ jobs: - name: Run pre-commit run: SKIP=terraform_validate,terraform_tflint pre-commit run -a --show-diff-on-failure || true +... \ No newline at end of file diff --git a/.github/workflows/readme.yml b/.github/workflows/readme.yml index c4a5793..0172488 100644 --- a/.github/workflows/readme.yml +++ b/.github/workflows/readme.yml @@ -1,3 +1,4 @@ +--- name: Readme Workflow on: push: @@ -5,11 +6,11 @@ on: - master paths-ignore: - 'README.md' - - 'docs/**' workflow_dispatch: jobs: README: - uses: clouddrove/github-shared-workflows/.github/workflows/readme.yml@master + uses: clouddrove/github-shared-workflows/.github/workflows/readme.yml@v2 secrets: TOKEN : ${{ secrets.GITHUB }} SLACK_WEBHOOK_TERRAFORM: ${{ secrets.SLACK_WEBHOOK_TERRAFORM }} +... \ No newline at end of file diff --git a/.github/workflows/release-changelog.yml b/.github/workflows/release-changelog.yml new file mode 100644 index 0000000..07b35e7 --- /dev/null +++ b/.github/workflows/release-changelog.yml @@ -0,0 +1,15 @@ +name: Release + +on: + release: + types: [published] + +jobs: + changelog: + uses: clouddrove/github-shared-workflows/.github/workflows/release-changelog.yml@v2 + with: + branch: master + tag_format: vX.Y.Z + release_tag: ${{ github.ref_name }} + secrets: + GITHUB: ${{ secrets.GITHUB_TOKEN }} \ No newline at end of file diff --git a/.github/workflows/security-tfsec.yml b/.github/workflows/security-tfsec.yml new file mode 100644 index 0000000..633b809 --- /dev/null +++ b/.github/workflows/security-tfsec.yml @@ -0,0 +1,17 @@ +--- +name: tfsec +permissions: write-all +on: + pull_request: + paths: + - '**/*.tf' + - '*.tf' + workflow_dispatch: +jobs: + tfsec: + if: github.actor != 'dependabot[bot]' + uses: clouddrove/github-shared-workflows/.github/workflows/security-tfsec.yml@v2 + secrets: inherit + with: + working_directory: '.' +... \ No newline at end of file diff --git a/.github/workflows/tf-checks.yml b/.github/workflows/tf-checks.yml index 4f1912e..bb0f140 100644 --- a/.github/workflows/tf-checks.yml +++ b/.github/workflows/tf-checks.yml @@ -1,17 +1,32 @@ +--- name: tf-checks +permissions: + id-token: write + contents: read on: - push: - branches: [ master ] pull_request: - workflow_dispatch: + paths: + - '**/*.tf' + - '*.tf' jobs: single-account-example: - uses: clouddrove/github-shared-workflows/.github/workflows/tf-checks.yml@master + if: github.actor != 'dependabot[bot]' + uses: clouddrove/github-shared-workflows/.github/workflows/tf-checks.yml@v2 with: working_directory: './examples/complete/' - provider: none + provider: aws + enable_plan: true + show_plan: false + secrets: + BUILD_ROLE: ${{ secrets.BUILD_ROLE }} main-account-example: - uses: clouddrove/github-shared-workflows/.github/workflows/tf-checks.yml@master + if: github.actor != 'dependabot[bot]' + uses: clouddrove/github-shared-workflows/.github/workflows/tf-checks.yml@v2 with: working_directory: './examples/ecr_dashboard/' - provider: none + provider: aws + enable_plan: true + show_plan: false + secrets: + BUILD_ROLE: ${{ secrets.BUILD_ROLE }} +... \ No newline at end of file diff --git a/.github/workflows/tflint.yml b/.github/workflows/tflint.yml index 71a6fc4..f968720 100644 --- a/.github/workflows/tflint.yml +++ b/.github/workflows/tflint.yml @@ -1,11 +1,14 @@ +--- name: tf-lint on: - push: - branches: [ master ] pull_request: - workflow_dispatch: + paths: + - '**/*.tf' + - '*.tf' jobs: tf-lint: - uses: clouddrove/github-shared-workflows/.github/workflows/tf-lint.yml@master + if: github.actor != 'dependabot[bot]' + uses: clouddrove/github-shared-workflows/.github/workflows/tf-lint.yml@v2 secrets: - GITHUB: ${{ secrets.GITHUB }} + GITHUB: ${{ secrets.GITHUB_TOKEN }} +... \ No newline at end of file diff --git a/.github/workflows/tfsec.yml b/.github/workflows/tfsec.yml deleted file mode 100644 index c203751..0000000 --- a/.github/workflows/tfsec.yml +++ /dev/null @@ -1,11 +0,0 @@ -name: tfsec -permissions: write-all -on: - pull_request: - workflow_dispatch: -jobs: - tfsec: - uses: clouddrove/github-shared-workflows/.github/workflows/tfsec.yml@master - secrets: inherit - with: - working_directory: '.' diff --git a/commitlint.config.cjs b/commitlint.config.cjs new file mode 100644 index 0000000..a25b454 --- /dev/null +++ b/commitlint.config.cjs @@ -0,0 +1,12 @@ +module.exports = { + extends: ['@commitlint/config-conventional'], + rules: { + 'type-enum': [2, 'always', [ + 'fix', 'feat', 'docs', 'ci', 'chore', 'test', 'refactor', 'style', 'perf', 'build', 'revert', + 'Fix', 'Feat', 'Docs', 'Ci', 'Chore', 'Test', 'Refactor', 'Style', 'Perf', 'Build', 'Revert' + ]], + 'header-max-length': [2, 'always', 150], + 'subject-case': [0], + 'type-case': [0], + } +}; \ No newline at end of file