Skip to content

Commit 0b5e720

Browse files
author
Om Sharma
authored
Merge pull request #6 from clouddrove/0.15
update github-action, module tags and module update in 0.15
2 parents 3750ed5 + 2c0301d commit 0b5e720

File tree

14 files changed

+167
-178
lines changed

14 files changed

+167
-178
lines changed

.github/workflows/readme.yml

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -10,32 +10,32 @@ jobs:
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: 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@v8.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/action@v2.0.0
3131
continue-on-error: true
3232

33-
- name: pre-commit fix erros
33+
- name: 'pre-commit fix errors'
3434
uses: pre-commit/action@v2.0.0
3535
continue-on-error: true
3636

3737
- name: 'push readme'
38-
uses: 'clouddrove/github-actions@v4.0'
38+
uses: 'clouddrove/github-actions@v8.0'
3939
continue-on-error: true
4040
with:
4141
actions_subcommand: 'push'
@@ -51,4 +51,4 @@ jobs:
5151
env:
5252
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} # required
5353
SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK_TERRAFORM }} # required
54-
if: always()
54+
if: always()

.github/workflows/terraform.yml

Lines changed: 97 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -5,61 +5,133 @@ 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/github-actions@v8.0'
17+
with:
18+
actions_subcommand: 'fmt'
19+
- name: 'Terraform Format'
20+
uses: 'clouddrove/github-actions@v8.0'
21+
with:
22+
actions_subcommand: 'fmt'
23+
24+
private-hostedzone:
25+
name: 'private-hostedzone'
26+
runs-on: ubuntu-latest
27+
steps:
28+
- name: 'Checkout'
29+
uses: actions/checkout@v2.3.4
30+
31+
- name: 'Configure AWS Credentials'
1632
uses: clouddrove/configure-aws-credentials@v1
1733
with:
1834
aws-access-key-id: ${{ secrets.TEST_AWS_ACCESS_KEY }}
1935
aws-secret-access-key: ${{ secrets.TEST_AWS_ACCESS_SECRET_KEY }}
2036
aws-region: us-east-2
2137

22-
- name: 'Terraform Format'
23-
uses: 'clouddrove/github-actions@v4.0'
24-
with:
25-
actions_subcommand: 'fmt'
26-
27-
- name: 'Terraform init private-hostedzone'
28-
uses: 'clouddrove/github-actions@v4.0'
38+
- name: 'Terraform init for private-hostedzone'
39+
uses: 'clouddrove/github-actions@v8.0'
2940
with:
3041
actions_subcommand: 'init'
3142
tf_actions_working_dir: ./_example/private-hostedzone
3243

33-
- name: 'Terraform validate private-hostedzone'
34-
uses: 'clouddrove/github-actions@v4.0'
44+
- name: 'Terraform validate for private-hostedzone'
45+
uses: 'clouddrove/github-actions@v8.0'
3546
with:
3647
actions_subcommand: 'validate'
3748
tf_actions_working_dir: ./_example/private-hostedzone
3849

39-
- name: 'Terraform init vpc-association'
40-
uses: 'clouddrove/github-actions@v4.0'
50+
- name: 'Terraform plan for private-hostedzone'
51+
uses: 'clouddrove/github-actions@v8.0'
4152
with:
42-
actions_subcommand: 'init'
43-
tf_actions_working_dir: ./_example/vpc-association
53+
actions_subcommand: 'plan'
54+
tf_actions_working_dir: ./_example/private-hostedzone
55+
56+
public-hostedzone:
57+
name: 'public-hostedzone'
58+
runs-on: ubuntu-latest
59+
steps:
60+
- name: 'Checkout'
61+
uses: actions/checkout@v2.3.4
4462

45-
- name: 'Terraform validate vpc-association'
46-
uses: 'clouddrove/github-actions@v4.0'
63+
- name: 'Configure AWS Credentials'
64+
uses: clouddrove/configure-aws-credentials@v1
4765
with:
48-
actions_subcommand: 'validate'
49-
tf_actions_working_dir: ./_example/vpc-association
66+
aws-access-key-id: ${{ secrets.TEST_AWS_ACCESS_KEY }}
67+
aws-secret-access-key: ${{ secrets.TEST_AWS_ACCESS_SECRET_KEY }}
68+
aws-region: us-east-2
5069

51-
- name: 'Terraform init public-hostedzone'
52-
uses: 'clouddrove/github-actions@v4.0'
70+
- name: 'Terraform init for public-hostedzone'
71+
uses: 'clouddrove/github-actions@v8.0'
5372
with:
5473
actions_subcommand: 'init'
5574
tf_actions_working_dir: ./_example/public-hostedzone
5675

57-
- name: 'Terraform validate public-hostedzone'
58-
uses: 'clouddrove/github-actions@v4.0'
76+
- name: 'Terraform validate for public-hostedzone'
77+
uses: 'clouddrove/github-actions@v8.0'
5978
with:
6079
actions_subcommand: 'validate'
6180
tf_actions_working_dir: ./_example/public-hostedzone
6281

82+
83+
vpc-association:
84+
name: 'vpc-association'
85+
runs-on: ubuntu-latest
86+
steps:
87+
- name: 'Checkout'
88+
uses: actions/checkout@v2.3.4
89+
90+
- name: 'Configure AWS Credentials'
91+
uses: clouddrove/configure-aws-credentials@v1
92+
with:
93+
aws-access-key-id: ${{ secrets.TEST_AWS_ACCESS_KEY }}
94+
aws-secret-access-key: ${{ secrets.TEST_AWS_ACCESS_SECRET_KEY }}
95+
aws-region: us-east-2
96+
97+
- name: 'Terraform init for vpc-association'
98+
uses: 'clouddrove/github-actions@v8.0'
99+
with:
100+
actions_subcommand: 'init'
101+
tf_actions_working_dir: ./_example/vpc-association
102+
103+
- name: 'Terraform validate for vpc-association'
104+
uses: 'clouddrove/github-actions@v8.0'
105+
with:
106+
actions_subcommand: 'validate'
107+
tf_actions_working_dir: ./_example/vpc-association
108+
109+
- name: 'Terraform plan for vpc-association'
110+
uses: 'clouddrove/github-actions@v8.0'
111+
with:
112+
actions_subcommand: 'plan'
113+
tf_actions_working_dir: ./_example/vpc-association
114+
115+
pre-commit:
116+
name: 'Pre-Commit'
117+
needs:
118+
- fmt
119+
- private-hostedzone
120+
- public-hostedzone
121+
- vpc-association
122+
runs-on: ubuntu-latest
123+
steps:
124+
- name: 'Checkout'
125+
uses: actions/checkout@v2.3.4
126+
127+
- name: 'Install Tflint'
128+
run: |
129+
curl https://raw.githubusercontent.com/terraform-linters/tflint/master/install_linux.sh | bash
130+
131+
- name: 'Pre-Commit 🔎'
132+
uses: pre-commit/action@v2.0.3
133+
continue-on-error: true
134+
63135
- name: 'Slack Notification'
64136
uses: clouddrove/action-slack@v2
65137
with:

.pre-commit-config.yaml

Lines changed: 14 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,21 @@
11
repos:
2-
- repo: git://github.com/antonbabenko/pre-commit-terraform
3-
rev: v1.43.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
8+
- id: tflint
69

7-
- repo: https://github.com/pre-commit/pre-commit-hooks
8-
rev: v3.2.0
10+
- repo: git://github.com/pre-commit/pre-commit-hooks
11+
rev: v4.0.1 # Use the ref you want to point at
912
hooks:
13+
- id: end-of-file-fixer
14+
- id: trailing-whitespace
15+
- id: mixed-line-ending
16+
- id: check-byte-order-marker
17+
- id: check-executables-have-shebangs
1018
- id: check-merge-conflict
19+
- id: debug-statements
1120
- id: check-yaml
1221
- id: check-added-large-files
13-
- id: trailing-whitespace

README.md

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
Terraform AWS Route53
88
</h1>
99

10-
<p align="center" style="font-size: 1.2rem;">
10+
<p align="center" style="font-size: 1.2rem;">
1111
Terraform module to create Route53 resource on AWS for zone and record set.
1212
</p>
1313

@@ -38,7 +38,7 @@
3838
<hr>
3939

4040

41-
We eat, drink, sleep and most importantly love **DevOps**. We are working towards strategies for standardizing architecture while ensuring security for the infrastructure. We are strong believer of the philosophy <b>Bigger problems are always solved by breaking them into smaller manageable problems</b>. Resonating with microservices architecture, it is considered best-practice to run database, cluster, storage in smaller <b>connected yet manageable pieces</b> within the infrastructure.
41+
We eat, drink, sleep and most importantly love **DevOps**. We are working towards strategies for standardizing architecture while ensuring security for the infrastructure. We are strong believer of the philosophy <b>Bigger problems are always solved by breaking them into smaller manageable problems</b>. Resonating with microservices architecture, it is considered best-practice to run database, cluster, storage in smaller <b>connected yet manageable pieces</b> within the infrastructure.
4242

4343
This module is basically combination of [Terraform open source](https://www.terraform.io/) and includes automatation tests and examples. It also helps to create and improve your infrastructure with minimalistic code instead of maintaining the whole infrastructure code yourself.
4444

@@ -49,7 +49,7 @@ We have [*fifty plus terraform modules*][terraform_modules]. A few of them are c
4949

5050
## Prerequisites
5151

52-
This module has a few dependencies:
52+
This module has a few dependencies:
5353

5454
- [Terraform 0.13](https://learn.hashicorp.com/terraform/getting-started/install.html)
5555
- [Go](https://golang.org/doc/install)
@@ -210,7 +210,7 @@ Here are some examples of how you can use this module in your inventory structur
210210

211211

212212
## Testing
213-
In this module testing is performed with [terratest](https://github.com/gruntwork-io/terratest) and it creates a small piece of infrastructure, matches the output like ARN, ID and Tags name etc and destroy infrastructure in your AWS account. This testing is written in GO, so you need a [GO environment](https://golang.org/doc/install) in your system.
213+
In this module testing is performed with [terratest](https://github.com/gruntwork-io/terratest) and it creates a small piece of infrastructure, matches the output like ARN, ID and Tags name etc and destroy infrastructure in your AWS account. This testing is written in GO, so you need a [GO environment](https://golang.org/doc/install) in your system.
214214

215215
You need to run the following command in the testing folder:
216216
```hcl
@@ -219,7 +219,7 @@ You need to run the following command in the testing folder:
219219

220220

221221

222-
## Feedback
222+
## Feedback
223223
If you come accross a bug or have any feedback, please log it in our [issue tracker](https://github.com/clouddrove/terraform-aws-route53/issues), or feel free to drop us an email at [hello@clouddrove.com](mailto:hello@clouddrove.com).
224224

225225
If you have found it worth your time, go ahead and give us a ★ on [our GitHub](https://github.com/clouddrove/terraform-aws-route53)!

README.yaml

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ github_repo: clouddrove/terraform-aws-route53
1616
# Badges to display
1717
badges:
1818
- name: "Terraform"
19-
image: "https://img.shields.io/badge/terraform-v0.13-green"
19+
image: "https://img.shields.io/badge/terraform-v0.15-green"
2020
url: "https://www.terraform.io"
2121
- name: "Licence"
2222
image: "https://img.shields.io/badge/License-MIT-blue.svg"
@@ -40,11 +40,11 @@ usage: |-
4040
```hcl
4141
module "route53" {
4242
source = "clouddrove/route53/aws"
43-
version = "0.13.0"
43+
version = "0.15.0"
4444
name = "route53"
4545
application = "clouddrove"
4646
environment = "test"
47-
label_order = ["environment", "name", "application"]
47+
label_order = ["environment", "name"]
4848
public_enabled = true
4949
record_enabled = true
5050
domain_name = "clouddrove.com"
@@ -73,11 +73,11 @@ usage: |-
7373
```hcl
7474
module "route53" {
7575
source = "clouddrove/route53/aws"
76-
version = "0.13.0"
76+
version = "0.15.0"
7777
name = "route53"
7878
application = "clouddrove"
7979
environment = "test"
80-
label_order = ["environment", "name", "application"]
80+
label_order = ["environment", "name"]
8181
private_enabled = true
8282
record_enabled = true
8383
domain_name = "clouddrove.com"
@@ -104,11 +104,11 @@ usage: |-
104104
```hcl
105105
module "route53" {
106106
source = "clouddrove/route53/aws"
107-
version = "0.13.0"
107+
version = "0.15.0"
108108
name = "route53"
109109
application = "clouddrove"
110110
environment = "test"
111-
label_order = ["environment", "name", "application"]
111+
label_order = ["environment", "name"]
112112
private_enabled = true
113113
enabled = true
114114
domain_name = "clouddrove.com"

_example/private-hostedzone/example.tf

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,9 +6,8 @@ module "route53" {
66
source = "../../"
77

88
name = "route53"
9-
application = "clouddrove"
109
environment = "test"
11-
label_order = ["environment", "name", "application"]
10+
label_order = ["environment", "name"]
1211
private_enabled = true
1312
record_enabled = true
1413

_example/public-hostedzone/example.tf

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,9 +6,8 @@ module "route53" {
66
source = "../../"
77

88
name = "route53"
9-
application = "clouddrove"
109
environment = "test"
11-
label_order = ["environment", "name", "application"]
10+
label_order = ["environment", "name"]
1211
public_enabled = true
1312
record_enabled = true
1413

_example/vpc-association/example.tf

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,9 +6,8 @@ module "route53" {
66
source = "../../"
77

88
name = "route53"
9-
application = "clouddrove"
109
environment = "test"
11-
label_order = ["environment", "name", "application"]
10+
label_order = ["environment", "name"]
1211
private_enabled = true
1312
enabled = true
1413

_test/private-hostedzone/route53_test.go

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

0 commit comments

Comments
 (0)