Skip to content

Commit 2e7bf98

Browse files
committed
upgrade to 0.14
1 parent 1108da9 commit 2e7bf98

14 files changed

+85
-638
lines changed

.github/workflows/readme.yml

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -12,30 +12,30 @@ jobs:
1212
- name: 'Checkout'
1313
uses: actions/checkout@master
1414

15-
- name: Set up Python 3.7.
15+
- name: 'Set up Python 3.7'
1616
uses: actions/setup-python@v2
1717
with:
1818
python-version: '3.x'
1919

2020
- name: 'create readme'
21-
uses: 'clouddrove/github-actions@v4.0'
21+
uses: 'clouddrove/github-actions@v6.0'
2222
with:
2323
actions_subcommand: 'readme'
2424
github_token: '${{ secrets.GITHUB}}'
2525
env:
2626
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN}}
2727

2828

29-
- name: pre-commit check errors
29+
- name: 'pre-commit check errors'
3030
uses: pre-commit/[email protected]
3131
continue-on-error: true
3232

33-
- name: pre-commit fix erros
33+
- name: 'pre-commit fix erros'
3434
uses: pre-commit/[email protected]
3535
continue-on-error: true
3636

3737
- name: 'push readme'
38-
uses: 'clouddrove/github-actions@v4.0'
38+
uses: 'clouddrove/github-actions@v6.0'
3939
continue-on-error: true
4040
with:
4141
actions_subcommand: 'push'

.github/workflows/terraform.yml

Lines changed: 39 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -5,50 +5,66 @@ on:
55
- master
66

77
jobs:
8-
terraform:
9-
name: 'Terraform'
8+
fmt:
9+
name: 'terraform fmt'
1010
runs-on: ubuntu-latest
1111
steps:
1212
- name: 'Checkout'
13-
uses: actions/checkout@master
13+
uses: actions/checkout@v2.3.4
1414

15-
- name: Configure AWS Credentials
15+
- name: 'Terraform Format'
16+
uses: 'clouddrove/[email protected]'
17+
with:
18+
actions_subcommand: 'fmt'
19+
20+
validate:
21+
name: 'terraform validate'
22+
runs-on: ubuntu-latest
23+
steps:
24+
- name: 'Checkout'
25+
uses: actions/[email protected]
26+
27+
- name: 'Configure AWS Credentials'
1628
uses: clouddrove/configure-aws-credentials@v1
1729
with:
1830
aws-access-key-id: ${{ secrets.TEST_AWS_ACCESS_KEY }}
1931
aws-secret-access-key: ${{ secrets.TEST_AWS_ACCESS_SECRET_KEY }}
2032
aws-region: us-east-2
2133

22-
- name: 'Terraform Format'
23-
uses: 'clouddrove/[email protected]'
24-
with:
25-
actions_subcommand: 'fmt'
26-
2734
- name: 'Terraform init'
28-
uses: 'clouddrove/github-actions@v4.0'
35+
uses: 'clouddrove/github-actions@v6.0'
2936
with:
3037
actions_subcommand: 'init'
3138
tf_actions_working_dir: ./_example
3239

3340
- name: 'Terraform validate'
34-
uses: 'clouddrove/github-actions@v4.0'
41+
uses: 'clouddrove/github-actions@v6.0'
3542
with:
3643
actions_subcommand: 'validate'
3744
tf_actions_working_dir: ./_example
3845

39-
- name: 'Terraform plan'
40-
uses: 'clouddrove/[email protected]'
46+
plan:
47+
name: 'terraform plan'
48+
runs-on: ubuntu-latest
49+
steps:
50+
- name: 'Checkout'
51+
uses: actions/[email protected]
52+
53+
- name: 'Terraform init'
54+
uses: 'clouddrove/[email protected]'
4155
with:
42-
actions_subcommand: 'plan'
56+
actions_subcommand: 'init'
4357
tf_actions_working_dir: ./_example
4458

45-
- name: 'Slack Notification'
46-
uses: clouddrove/action-slack@v2
59+
- name: 'Configure AWS Credentials'
60+
uses: clouddrove/configure-aws-credentials@v1
61+
with:
62+
aws-access-key-id: ${{ secrets.TEST_AWS_ACCESS_KEY }}
63+
aws-secret-access-key: ${{ secrets.TEST_AWS_ACCESS_SECRET_KEY }}
64+
aws-region: us-east-2
65+
66+
- name: 'Terraform plan'
67+
uses: 'clouddrove/[email protected]'
4768
with:
48-
status: ${{ job.status }}
49-
fields: repo,author
50-
author_name: 'CloudDrove'
51-
env:
52-
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} # required
53-
SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK_TERRAFORM }} # required
54-
if: always()
69+
actions_subcommand: 'plan'
70+
tf_actions_working_dir: ./_example

.github/workflows/terratest.yml

Lines changed: 7 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -6,29 +6,27 @@ on:
66
types: [labeled]
77

88
jobs:
9-
terraform:
10-
name: 'Terraform'
9+
Terratest:
10+
name: 'Terratest'
1111
runs-on: ubuntu-latest
1212
steps:
1313

1414
- name: 'Checkout'
15-
uses: actions/checkout@master
15+
uses: actions/checkout@v2.3.4
1616

17-
- name: Configure AWS Credentials
17+
- name: 'Configure AWS Credentials'
1818
uses: clouddrove/configure-aws-credentials@v1
1919
with:
2020
aws-access-key-id: ${{ secrets.TEST_AWS_ACCESS_KEY }}
2121
aws-secret-access-key: ${{ secrets.TEST_AWS_ACCESS_SECRET_KEY }}
2222
aws-region: us-east-2
2323

2424
- name: 'Terratest'
25-
if: ${{ github.event.label.name == 'terratest' }}
26-
uses: 'clouddrove/[email protected]'
25+
uses: 'clouddrove/[email protected]'
2726
with:
2827
actions_subcommand: 'terratest'
28+
if: ${{ github.event.label.name == 'terratest' }}
2929
tf_actions_working_dir: '_test'
30-
env:
31-
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
3230

3331
- name: 'Slack Notification'
3432
uses: clouddrove/action-slack@v2
@@ -39,4 +37,4 @@ jobs:
3937
env:
4038
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} # required
4139
SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK_TERRAFORM }} # required
42-
if: always()
40+
if: always()

.gitignore

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,4 +4,4 @@
44
.terraform
55
.idea
66
*.iml
7-
go.sum
7+
*.terraform.lock.hcl

.pre-commit-config.yaml

Lines changed: 13 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,20 @@
11
repos:
2-
- repo: git://github.com/antonbabenko/pre-commit-terraform
3-
rev: v1.45.0
2+
3+
- repo: https://github.com/gruntwork-io/pre-commit
4+
rev: v0.1.12 # Get the latest from: https://github.com/gruntwork-io/pre-commit/releases
45
hooks:
5-
- id: terraform_fmt
6+
- id: terraform-fmt
7+
- id: shellcheck
68

7-
- repo: https://github.com/pre-commit/pre-commit-hooks
8-
rev: v3.4.0
9+
- repo: git://github.com/pre-commit/pre-commit-hooks
10+
rev: v3.4.0 # Use the ref you want to point at
911
hooks:
12+
- id: end-of-file-fixer
13+
- id: trailing-whitespace
14+
- id: mixed-line-ending
15+
- id: check-byte-order-marker
16+
- id: check-executables-have-shebangs
1017
- id: check-merge-conflict
18+
- id: debug-statements
1119
- id: check-yaml
1220
- id: check-added-large-files
13-
- id: trailing-whitespace

README.yaml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,6 @@ usage: |-
4242
source = "clouddrove/security-group/aws"
4343
version = "0.14.0"
4444
name = "security-group"
45-
repository = "https://registry.terraform.io/modules/clouddrove/security-group/aws/0.14.0"
4645
environment = "test"
4746
protocol = "tcp"
4847
label_order = ["name", "environment"]

_example/.terraform.lock.hcl

Lines changed: 0 additions & 19 deletions
This file was deleted.

_example/example.tf

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,9 +3,9 @@ provider "aws" {
33
}
44

55
module "vpc" {
6-
source = "git::https://github.com/clouddrove/terraform-aws-vpc.git?ref=0.14"
6+
source = "clouddrove/vpc/aws"
7+
version = "0.14.0"
78
name = "vpc"
8-
repository = "https://registry.terraform.io/modules/clouddrove/vpc/aws/0.14.0"
99
environment = "test"
1010
label_order = ["name", "environment"]
1111
cidr_block = "10.0.0.0/16"
@@ -15,7 +15,6 @@ module "security_group" {
1515
source = "./../"
1616

1717
name = "security-group"
18-
repository = "https://registry.terraform.io/modules/clouddrove/security-group/aws/0.14.0"
1918
environment = "test"
2019
label_order = ["name", "environment"]
2120
vpc_id = module.vpc.vpc_id

_test/go.mod

Lines changed: 0 additions & 8 deletions
This file was deleted.

0 commit comments

Comments
 (0)