Skip to content

Commit c0e203a

Browse files
author
Om Sharma
authored
Merge pull request #15 from clouddrove/0.15
update github-action, module tags and update in 0.15
2 parents ac5ad11 + 4835694 commit c0e203a

File tree

10 files changed

+88
-70
lines changed

10 files changed

+88
-70
lines changed

.github/workflows/readme.yml

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -12,29 +12,30 @@ jobs:
1212
- name: 'Checkout'
1313
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@v6.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

28-
- name: pre-commit check errors
28+
29+
- name: 'pre-commit check errors'
2930
uses: pre-commit/action@v2.0.0
3031
continue-on-error: true
3132

32-
- name: pre-commit fix erros
33+
- name: 'pre-commit fix errors'
3334
uses: pre-commit/action@v2.0.0
3435
continue-on-error: true
3536

3637
- name: 'push readme'
37-
uses: 'clouddrove/github-actions@v6.0'
38+
uses: 'clouddrove/github-actions@v8.0'
3839
continue-on-error: true
3940
with:
4041
actions_subcommand: 'push'

.github/workflows/terraform.yml

Lines changed: 70 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -13,16 +13,18 @@ jobs:
1313
uses: actions/checkout@v2.3.4
1414

1515
- name: 'Terraform Format'
16-
uses: 'clouddrove/github-actions@v6.0'
16+
uses: 'clouddrove/github-actions@v8.0'
17+
with:
18+
actions_subcommand: 'fmt'
19+
- name: 'Terraform Format'
20+
uses: 'clouddrove/github-actions@v8.0'
1721
with:
1822
actions_subcommand: 'fmt'
1923

20-
Basic:
21-
name: 'Init,Validate,PLan of Basic example'
22-
needs: fmt
24+
basic:
25+
name: 'basic'
2326
runs-on: ubuntu-latest
2427
steps:
25-
2628
- name: 'Checkout'
2729
uses: actions/checkout@v2.3.4
2830

@@ -33,20 +35,77 @@ jobs:
3335
aws-secret-access-key: ${{ secrets.TEST_AWS_ACCESS_SECRET_KEY }}
3436
aws-region: us-east-2
3537

36-
- name: 'Terraform init'
37-
uses: 'clouddrove/github-actions@v6.0'
38+
- name: 'Terraform init for basic'
39+
uses: 'clouddrove/github-actions@v8.0'
3840
with:
3941
actions_subcommand: 'init'
4042
tf_actions_working_dir: ./_example/basic
4143

42-
- name: 'Terraform validate'
43-
uses: 'clouddrove/github-actions@v6.0'
44+
- name: 'Terraform validate for basic'
45+
uses: 'clouddrove/github-actions@v8.0'
4446
with:
4547
actions_subcommand: 'validate'
4648
tf_actions_working_dir: ./_example/basic
4749

48-
- name: 'Terraform plan'
49-
uses: 'clouddrove/github-actions@v6.0'
50+
- name: 'Terraform plan for basic'
51+
uses: 'clouddrove/github-actions@v8.0'
5052
with:
5153
actions_subcommand: 'plan'
5254
tf_actions_working_dir: ./_example/basic
55+
56+
complete:
57+
name: 'complete'
58+
runs-on: ubuntu-latest
59+
steps:
60+
- name: 'Checkout'
61+
uses: actions/checkout@v2.3.4
62+
63+
- name: 'Configure AWS Credentials'
64+
uses: clouddrove/configure-aws-credentials@v1
65+
with:
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
69+
70+
- name: 'Terraform init for complete'
71+
uses: 'clouddrove/github-actions@v8.0'
72+
with:
73+
actions_subcommand: 'init'
74+
tf_actions_working_dir: ./_example/complete
75+
76+
- name: 'Terraform validate complete'
77+
uses: 'clouddrove/github-actions@v8.0'
78+
with:
79+
actions_subcommand: 'validate'
80+
tf_actions_working_dir: ./_example/complete
81+
82+
83+
pre-commit:
84+
name: 'Pre-Commit'
85+
needs:
86+
- fmt
87+
- basic
88+
- complete
89+
runs-on: ubuntu-latest
90+
steps:
91+
- name: 'Checkout'
92+
uses: actions/checkout@v2.3.4
93+
94+
- name: 'Install Tflint'
95+
run: |
96+
curl https://raw.githubusercontent.com/terraform-linters/tflint/master/install_linux.sh | bash
97+
98+
- name: 'Pre-Commit 🔎'
99+
uses: pre-commit/action@v2.0.3
100+
continue-on-error: true
101+
102+
- name: 'Slack Notification'
103+
uses: clouddrove/action-slack@v2
104+
with:
105+
status: ${{ job.status }}
106+
fields: repo,author
107+
author_name: 'CloudDrove'
108+
env:
109+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} # required
110+
SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK_TERRAFORM }} # required
111+
if: always()

.github/workflows/terratest.yml

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

.pre-commit-config.yaml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,9 +5,10 @@ repos:
55
hooks:
66
- id: terraform-fmt
77
- id: shellcheck
8+
- id: tflint
89

910
- repo: git://github.com/pre-commit/pre-commit-hooks
10-
rev: v3.4.0 # Use the ref you want to point at
11+
rev: v4.0.1 # Use the ref you want to point at
1112
hooks:
1213
- id: end-of-file-fixer
1314
- 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 Api Gateway
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 create api gateway with it's basic elements.
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)
@@ -327,7 +327,7 @@ Here are examples of how you can use this module in your inventory structure:
327327

328328

329329
## Testing
330-
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.
330+
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.
331331

332332
You need to run the following command in the testing folder:
333333
```hcl
@@ -336,7 +336,7 @@ You need to run the following command in the testing folder:
336336

337337

338338

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

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

README.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ github_repo: clouddrove/terraform-aws-api-gateway
1616
# Badges to display
1717
badges:
1818
- name: "Terraform"
19-
image: "https://img.shields.io/badge/Terraform-v0.14-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,7 +40,7 @@ usage: |-
4040
```hcl
4141
module "api-gateway" {
4242
source = "clouddrove/api-gateway/aws"
43-
version = "0.14.0"
43+
version = "0.15.0"
4444
name = "api-gateway"
4545
environment = "test"
4646
label_order = ["name", "environment"]

_example/basic/example.tf

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,6 @@ provider "aws" {
55
module "api-gateway" {
66
source = "../../"
77
name = "api-gateway"
8-
repository = "https://registry.terraform.io/modules/clouddrove/api-gateway/aws/0.14.0"
98
environment = "test"
109
label_order = ["name", "environment"]
1110
enabled = true

_example/complete/example.tf

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,6 @@ module "api-gateway" {
66
source = "../../"
77

88
name = "api-gateway"
9-
repository = "https://registry.terraform.io/modules/clouddrove/api-gateway/aws/0.14.0"
109
environment = "test"
1110
label_order = ["name", "environment"]
1211
enabled = true

main.tf

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,8 @@
66
# for resources. You can use terraform-labels to implement a strict naming
77
# convention.
88
module "labels" {
9-
source = "git::https://github.com/clouddrove/terraform-labels.git?ref=tags/0.14.0"
9+
source = "clouddrove/labels/aws"
10+
version = "0.15.0"
1011

1112
enabled = var.enabled
1213
name = var.name

variables.tf

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ variable "name" {
88

99
variable "repository" {
1010
type = string
11-
default = ""
11+
default = "https://github.com/clouddrove/terraform-aws-api-gateway"
1212
description = "Terraform current module repo"
1313

1414
validation {

0 commit comments

Comments
 (0)