Skip to content

Commit 43c6b87

Browse files
author
Sohan Yadav
authored
Merge pull request #11 from clouddrove/0.14
Upgrade module with Terraform 0.14
2 parents 1424e09 + a221564 commit 43c6b87

File tree

19 files changed

+166
-157
lines changed

19 files changed

+166
-157
lines changed

.github/workflows/readme.yml

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -10,22 +10,21 @@ jobs:
1010
runs-on: ubuntu-latest
1111
steps:
1212
- name: 'Checkout'
13-
uses: actions/checkout@master
13+
uses: actions/checkout@v2.3.4
1414

1515
- 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

28-
2928
- name: pre-commit check errors
3029
uses: pre-commit/action@v2.0.0
3130
continue-on-error: true
@@ -35,7 +34,7 @@ jobs:
3534
continue-on-error: true
3635

3736
- name: 'push readme'
38-
uses: 'clouddrove/github-actions@v4.0'
37+
uses: 'clouddrove/github-actions@v6.0'
3938
continue-on-error: true
4039
with:
4140
actions_subcommand: 'push'

.github/workflows/terraform.yml

Lines changed: 21 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -5,50 +5,48 @@ 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@v6.0'
17+
with:
18+
actions_subcommand: 'fmt'
19+
20+
Basic:
21+
name: 'Init,Validate,PLan of Basic example'
22+
needs: fmt
23+
runs-on: ubuntu-latest
24+
steps:
25+
26+
- name: 'Checkout'
27+
uses: actions/checkout@v2.3.4
28+
29+
- name: 'Configure AWS Credentials'
1630
uses: clouddrove/configure-aws-credentials@v1
1731
with:
1832
aws-access-key-id: ${{ secrets.TEST_AWS_ACCESS_KEY }}
1933
aws-secret-access-key: ${{ secrets.TEST_AWS_ACCESS_SECRET_KEY }}
2034
aws-region: us-east-2
2135

22-
- name: 'Terraform Format'
23-
uses: 'clouddrove/github-actions@v4.0'
24-
with:
25-
actions_subcommand: 'fmt'
26-
2736
- name: 'Terraform init'
28-
uses: 'clouddrove/github-actions@v4.0'
37+
uses: 'clouddrove/github-actions@v6.0'
2938
with:
3039
actions_subcommand: 'init'
3140
tf_actions_working_dir: ./_example/basic
3241

3342
- name: 'Terraform validate'
34-
uses: 'clouddrove/github-actions@v4.0'
43+
uses: 'clouddrove/github-actions@v6.0'
3544
with:
3645
actions_subcommand: 'validate'
3746
tf_actions_working_dir: ./_example/basic
3847

3948
- name: 'Terraform plan'
40-
uses: 'clouddrove/github-actions@v4.0'
49+
uses: 'clouddrove/github-actions@v6.0'
4150
with:
4251
actions_subcommand: 'plan'
4352
tf_actions_working_dir: ./_example/basic
44-
45-
- name: 'Slack Notification'
46-
uses: clouddrove/action-slack@v2
47-
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()

.github/workflows/terratest.yml

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -6,13 +6,13 @@ on:
66
types: [labeled]
77

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

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

1717
- name: Configure AWS Credentials
1818
uses: clouddrove/configure-aws-credentials@v1
@@ -23,7 +23,7 @@ jobs:
2323

2424
- name: 'Terratest'
2525
if: ${{ github.event.label.name == 'terratest' }}
26-
uses: 'clouddrove/github-actions@v4.0'
26+
uses: 'clouddrove/github-actions@v6.0'
2727
with:
2828
actions_subcommand: 'terratest'
2929
tf_actions_working_dir: '_test/basic'
@@ -39,4 +39,4 @@ jobs:
3939
env:
4040
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} # required
4141
SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK_TERRAFORM }} # required
42-
if: always()
42+
if: always()

.gitignore

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,4 +4,5 @@
44
.terraform
55
.idea
66
*.iml
7-
go.sum
7+
go.sum
8+
*.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.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
68

7-
- repo: https://github.com/pre-commit/pre-commit-hooks
8-
rev: v3.2.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

LICENSE

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
MIT License
22

3-
Copyright (c) 2020 Cloud Drove
3+
Copyright (c) 2021 Cloud Drove
44

55
Permission is hereby granted, free of charge, to any person obtaining a copy
66
of this software and associated documentation files (the "Software"), to deal

Makefile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
export GENIE_PATH ?= $(shell 'pwd')/../../../genie
22

3-
include $(GENIE_PATH)/Makefile
3+
include $(GENIE_PATH)/Makefile

README.yaml

Lines changed: 9 additions & 10 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.13-green"
19+
image: "https://img.shields.io/badge/Terraform-v0.14-green"
2020
url: "https://www.terraform.io"
2121
- name: "Licence"
2222
image: "https://img.shields.io/badge/License-MIT-blue.svg"
@@ -40,12 +40,11 @@ usage: |-
4040
```hcl
4141
module "api-gateway" {
4242
source = "clouddrove/api-gateway/aws"
43-
version = "0.13.0"
44-
name = "api-gateway"
45-
application = "clouddrove"
46-
environment = "test"
47-
label_order = ["environment", "name", "application"]
48-
enabled = true
43+
version = "0.14.0"
44+
name = "api-gateway"
45+
environment = "test"
46+
label_order = ["name", "environment"]
47+
enabled = true
4948
5049
# Api Gateway Resource
5150
path_parts = ["mytestresource", "mytestresource1"]
@@ -99,11 +98,11 @@ usage: |-
9998
```hcl
10099
module "api-gateway" {
101100
source = "clouddrove/api-gateway/aws"
102-
version = "0.13.0"
101+
version = "0.14.0"
102+
103103
name = "api-gateway"
104-
application = "clouddrove"
105104
environment = "test"
106-
label_order = ["environment", "name", "application"]
105+
label_order = ["name", "environment"]
107106
enabled = true
108107
109108
# Api Gateway Resource

_example/basic/example.tf

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -3,11 +3,12 @@ provider "aws" {
33
}
44

55
module "api-gateway" {
6-
source = "../../"
7-
name = "api-gateway"
8-
application = "clouddrove"
6+
source = "../../"
7+
name = "api-gateway"
8+
9+
repository = "https://registry.terraform.io/modules/clouddrove/api-gateway/aws/0.14.0"
910
environment = "test"
10-
label_order = ["environment", "name", "application"]
11+
label_order = ["name", "environment"]
1112
enabled = true
1213

1314
# Api Gateway Resource
@@ -56,4 +57,4 @@ EOF
5657
# Api Gateway Stage
5758
stage_enabled = true
5859
stage_names = ["qa"]
59-
}
60+
}

_example/basic/outputs.tf

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,4 +3,4 @@
33
output "arn" {
44
value = module.api-gateway.*.execution_arn
55
description = "The Execution ARN of the REST API."
6-
}
6+
}

0 commit comments

Comments
 (0)