-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #7 from clouddrove/CD-209
upgrade terraform version to 0.13.0 and add pipelines
- Loading branch information
Showing
11 changed files
with
189 additions
and
33 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/github-actions@v4.0' | ||
with: | ||
actions_subcommand: 'readme' | ||
github_token: '${{ secrets.GITHUB}}' | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN}} | ||
|
||
|
||
- name: pre-commit check errors | ||
uses: pre-commit/action@v2.0.0 | ||
continue-on-error: true | ||
|
||
- name: pre-commit fix erros | ||
uses: pre-commit/action@v2.0.0 | ||
continue-on-error: true | ||
|
||
- name: 'push readme' | ||
uses: 'clouddrove/github-actions@v4.0' | ||
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,90 @@ | ||
name: 'Terraform GitHub Actions' | ||
on: | ||
pull_request: | ||
branches: | ||
- master | ||
|
||
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: 'Terraform Format' | ||
uses: 'clouddrove/github-actions@v4.0' | ||
with: | ||
actions_subcommand: 'fmt' | ||
|
||
- name: 'Terraform init bucket-basic' | ||
uses: 'clouddrove/github-actions@v4.0' | ||
with: | ||
actions_subcommand: 'init' | ||
tf_actions_working_dir: ./_example/bucket-basic | ||
|
||
- name: 'Terraform validate bucket-basic' | ||
uses: 'clouddrove/github-actions@v4.0' | ||
with: | ||
actions_subcommand: 'validate' | ||
tf_actions_working_dir: ./_example/bucket-basic | ||
|
||
- name: 'Terraform plan bucket-basic' | ||
uses: 'clouddrove/github-actions@v4.0' | ||
with: | ||
actions_subcommand: 'plan' | ||
tf_actions_working_dir: ./_example/bucket-basic | ||
|
||
- name: 'Terraform init domain-cdn' | ||
uses: 'clouddrove/github-actions@v4.0' | ||
with: | ||
actions_subcommand: 'init' | ||
tf_actions_working_dir: ./_example/domain-cdn | ||
|
||
- name: 'Terraform validate domain-cdn' | ||
uses: 'clouddrove/github-actions@v4.0' | ||
with: | ||
actions_subcommand: 'validate' | ||
tf_actions_working_dir: ./_example/domain-cdn | ||
|
||
- name: 'Terraform plan domain-cdn' | ||
uses: 'clouddrove/github-actions@v4.0' | ||
with: | ||
actions_subcommand: 'plan' | ||
tf_actions_working_dir: ./_example/domain-cdn | ||
|
||
- name: 'Terraform init bucket-secure' | ||
uses: 'clouddrove/github-actions@v4.0' | ||
with: | ||
actions_subcommand: 'init' | ||
tf_actions_working_dir: ./_example/bucket-secure | ||
|
||
- name: 'Terraform validate bucket-secure' | ||
uses: 'clouddrove/github-actions@v4.0' | ||
with: | ||
actions_subcommand: 'validate' | ||
tf_actions_working_dir: ./_example/bucket-secure | ||
|
||
- name: 'Terraform plan bucket-secure' | ||
uses: 'clouddrove/github-actions@v4.0' | ||
with: | ||
actions_subcommand: 'plan' | ||
tf_actions_working_dir: ./_example/bucket-secure | ||
|
||
- 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 |
---|---|---|
@@ -1,13 +1,13 @@ | ||
repos: | ||
- repo: git://github.com/antonbabenko/pre-commit-terraform | ||
rev: v1.12.0 | ||
rev: v1.43.0 | ||
hooks: | ||
- id: terraform_fmt | ||
|
||
- repo: https://github.com/pre-commit/pre-commit-hooks | ||
rev: v2.0.0 | ||
rev: v3.2.0 | ||
hooks: | ||
- id: check-merge-conflict | ||
- id: trailing-whitespace | ||
- id: check-yaml | ||
- id: check-added-large-files | ||
- id: check-added-large-files | ||
- id: trailing-whitespace |
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
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
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
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
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
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
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
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 |
---|---|---|
@@ -1,4 +1,9 @@ | ||
# Terraform version | ||
terraform { | ||
required_version = ">= 0.12" | ||
required_version = ">= 0.12.0, < 0.14.0" | ||
required_providers { | ||
aws = { | ||
source = "hashicorp/aws" | ||
} | ||
} | ||
} |