-
Notifications
You must be signed in to change notification settings - Fork 9
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
Sohan
committed
Feb 23, 2022
0 parents
commit e44be87
Showing
37 changed files
with
3,863 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,54 @@ | ||
name: 'Create README.md file' | ||
on: | ||
push: | ||
branches: | ||
- master | ||
|
||
jobs: | ||
readme-create: | ||
name: 'readme-create' | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: 'Checkout' | ||
uses: actions/checkout@master | ||
|
||
- name: Set up Python 3.7. | ||
uses: actions/setup-python@v2 | ||
with: | ||
python-version: '3.x' | ||
|
||
- name: 'create readme' | ||
uses: 'clouddrove/[email protected]' | ||
with: | ||
actions_subcommand: 'readme' | ||
github_token: '${{ secrets.GITHUB}}' | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN}} | ||
|
||
|
||
- name: pre-commit check errors | ||
uses: pre-commit/[email protected] | ||
continue-on-error: true | ||
|
||
- name: pre-commit fix erros | ||
uses: pre-commit/[email protected] | ||
continue-on-error: true | ||
|
||
- name: 'push readme' | ||
uses: 'clouddrove/[email protected]' | ||
continue-on-error: true | ||
with: | ||
actions_subcommand: 'push' | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN}} | ||
|
||
- name: 'Slack Notification' | ||
uses: clouddrove/action-slack@v2 | ||
with: | ||
status: ${{ job.status }} | ||
fields: repo,author | ||
author_name: 'CloudDrove' | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} # required | ||
SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK_TERRAFORM }} # required | ||
if: always() |
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,112 @@ | ||
name: 'Terraform GitHub Actions' | ||
on: | ||
pull_request: | ||
branches: | ||
- master | ||
jobs: | ||
fmt: | ||
name: 'terraform fmt' | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: 'Checkout' | ||
uses: actions/[email protected] | ||
|
||
- name: 'Terraform Format' | ||
uses: 'clouddrove/[email protected]' | ||
with: | ||
actions_subcommand: 'fmt' | ||
|
||
auto-scaling: | ||
name: 'auto-scaling' | ||
needs: fmt | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: 'Checkout' | ||
uses: actions/[email protected] | ||
|
||
- name: 'Configure AWS Credentials' | ||
uses: clouddrove/configure-aws-credentials@v1 | ||
with: | ||
aws-access-key-id: ${{ secrets.TEST_AWS_ACCESS_KEY }} | ||
aws-secret-access-key: ${{ secrets.TEST_AWS_ACCESS_SECRET_KEY }} | ||
aws-region: us-east-2 | ||
|
||
- name: 'Terraform init for Auto Scale' | ||
uses: 'clouddrove/[email protected]' | ||
with: | ||
actions_subcommand: 'init' | ||
tf_actions_working_dir: ./_example/auto-scaling | ||
|
||
- name: 'Terraform validate for Auto Scale' | ||
uses: 'clouddrove/[email protected]' | ||
with: | ||
actions_subcommand: 'validate' | ||
tf_actions_working_dir: ./_example/auto-scaling | ||
|
||
- name: 'Terraform plan for Auto Scale' | ||
uses: 'clouddrove/[email protected]' | ||
with: | ||
actions_subcommand: 'plan' | ||
tf_actions_working_dir: ./_example/auto-scaling | ||
fargate: | ||
name: 'fargate' | ||
needs: fmt | ||
runs-on: ubuntu-latest | ||
steps: | ||
|
||
- name: 'Checkout' | ||
uses: actions/[email protected] | ||
|
||
- name: 'Configure AWS Credentials' | ||
uses: clouddrove/configure-aws-credentials@v1 | ||
with: | ||
aws-access-key-id: ${{ secrets.TEST_AWS_ACCESS_KEY }} | ||
aws-secret-access-key: ${{ secrets.TEST_AWS_ACCESS_SECRET_KEY }} | ||
aws-region: us-east-2 | ||
|
||
- name: 'Terraform init for fargate' | ||
uses: 'clouddrove/[email protected]' | ||
with: | ||
actions_subcommand: 'init' | ||
tf_actions_working_dir: ./_example/fargate | ||
|
||
- name: 'Terraform validate for fargate' | ||
uses: 'clouddrove/[email protected]' | ||
with: | ||
actions_subcommand: 'validate' | ||
tf_actions_working_dir: ./_example/fargate | ||
|
||
- name: 'Terraform plan for fargate' | ||
uses: 'clouddrove/[email protected]' | ||
with: | ||
actions_subcommand: 'plan' | ||
tf_actions_working_dir: ./_example/fargate | ||
|
||
pre-commit: | ||
name: 'Pre-Commit' | ||
needs: | ||
- fmt | ||
- auto-scaling | ||
- fargate | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: 'Checkout' | ||
uses: actions/[email protected] | ||
|
||
- name: 'Install Tflint' | ||
run: | | ||
curl https://raw.githubusercontent.com/terraform-linters/tflint/master/install_linux.sh | bash | ||
- name: 'Pre-Commit 🔎' | ||
uses: pre-commit/[email protected] | ||
continue-on-error: true | ||
|
||
- name: 'Slack Notification' | ||
uses: clouddrove/action-slack@v2 | ||
with: | ||
status: ${{ job.status }} | ||
fields: repo,author | ||
author_name: 'CloudDrove' | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} # required | ||
SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK_TERRAFORM }} # required | ||
if: always() |
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,51 @@ | ||
name: 'Terratest GitHub Actions' | ||
on: | ||
pull_request: | ||
branches: | ||
- master | ||
types: [labeled] | ||
|
||
jobs: | ||
terraform: | ||
name: 'Terraform' | ||
runs-on: ubuntu-latest | ||
steps: | ||
|
||
- name: 'Checkout' | ||
uses: actions/checkout@master | ||
|
||
- name: Configure AWS Credentials | ||
uses: clouddrove/configure-aws-credentials@v1 | ||
with: | ||
aws-access-key-id: ${{ secrets.TEST_AWS_ACCESS_KEY }} | ||
aws-secret-access-key: ${{ secrets.TEST_AWS_ACCESS_SECRET_KEY }} | ||
aws-region: us-east-2 | ||
|
||
- name: 'Terratest auto-scaling' | ||
if: ${{ github.event.label.name == 'terratest' }} | ||
uses: 'clouddrove/[email protected]' | ||
with: | ||
actions_subcommand: 'terratest' | ||
tf_actions_working_dir: '_test/auto-scaling' | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
|
||
- name: 'Terratest fargate' | ||
if: ${{ github.event.label.name == 'terratest' }} | ||
uses: 'clouddrove/[email protected]' | ||
with: | ||
actions_subcommand: 'terratest' | ||
tf_actions_working_dir: '_test/fargate' | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
|
||
- name: 'Slack Notification' | ||
uses: clouddrove/action-slack@v2 | ||
with: | ||
status: ${{ job.status }} | ||
fields: repo,author | ||
author_name: 'CloudDrove' | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} # required | ||
SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK_TERRAFORM }} # required | ||
if: always() |
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,42 @@ | ||
eks-admin-cluster-role-binding.yaml | ||
eks-admin-service-account.yaml | ||
config-map-aws-auth*.yaml | ||
kubeconfig_* | ||
.idea | ||
|
||
################################################################# | ||
# Default .gitignore content for all terraform-aws-modules below | ||
################################################################# | ||
|
||
.DS_Store | ||
|
||
# Local .terraform directories | ||
**/.terraform/* | ||
|
||
# Terraform lockfile | ||
.terraform.lock.hcl | ||
|
||
# .tfstate files | ||
*.tfstate | ||
*.tfstate.* | ||
*.tfplan | ||
|
||
# Crash log files | ||
crash.log | ||
|
||
# Exclude all .tfvars files, which are likely to contain sentitive data, such as | ||
# password, private keys, and other secrets. These should not be part of version | ||
# control as they are data points which are potentially sensitive and subject | ||
# to change depending on the environment. | ||
*.tfvars | ||
|
||
# Ignore override files as they are usually used to override resources locally and so | ||
# are not checked in | ||
override.tf | ||
override.tf.json | ||
*_override.tf | ||
*_override.tf.json | ||
|
||
# Ignore CLI configuration files | ||
.terraformrc | ||
terraform.rc |
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 @@ | ||
repos: | ||
- repo: https://github.com/antonbabenko/pre-commit-terraform | ||
rev: v1.58.0 | ||
hooks: | ||
- id: terraform_fmt | ||
# - id: terraform_validate | ||
- id: terraform_docs | ||
args: | ||
- '--args=--lockfile=false' | ||
- id: terraform_tflint | ||
args: | ||
- '--args=--only=terraform_deprecated_interpolation' | ||
- '--args=--only=terraform_deprecated_index' | ||
- '--args=--only=terraform_unused_declarations' | ||
- '--args=--only=terraform_comment_syntax' | ||
- '--args=--only=terraform_documented_outputs' | ||
- '--args=--only=terraform_documented_variables' | ||
- '--args=--only=terraform_typed_variables' | ||
- '--args=--only=terraform_module_pinned_source' | ||
# - '--args=--only=terraform_naming_convention' | ||
- '--args=--only=terraform_required_version' | ||
- '--args=--only=terraform_required_providers' | ||
- '--args=--only=terraform_standard_module_structure' | ||
- '--args=--only=terraform_workspace_remote' | ||
- repo: https://github.com/pre-commit/pre-commit-hooks | ||
rev: v4.0.1 | ||
hooks: | ||
- id: check-merge-conflict |
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) 2021 Cloud Drove | ||
|
||
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. |
Empty file.
Empty file.
Oops, something went wrong.