Skip to content

Commit fc5a98b

Browse files
author
Nikita Dugar
authored
Merge pull request #24 from clouddrove/0.15
upgrade terraform version 0.15
2 parents bd46ff2 + 9d3aea3 commit fc5a98b

File tree

19 files changed

+78
-79
lines changed

19 files changed

+78
-79
lines changed

.github/workflows/readme.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ jobs:
1818
python-version: '3.x'
1919

2020
- name: 'create readme'
21-
uses: 'clouddrove/github-actions@v6.0'
21+
uses: 'clouddrove/github-actions@v7.0'
2222
with:
2323
actions_subcommand: 'readme'
2424
github_token: '${{ secrets.GITHUB}}'
@@ -35,7 +35,7 @@ jobs:
3535
continue-on-error: true
3636

3737
- name: 'push readme'
38-
uses: 'clouddrove/github-actions@v6.0'
38+
uses: 'clouddrove/github-actions@v7.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: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -20,60 +20,60 @@ jobs:
2020
aws-region: us-east-2
2121

2222
- name: 'Terraform Format'
23-
uses: 'clouddrove/github-actions@v6.0'
23+
uses: 'clouddrove/github-actions@v7.0'
2424
with:
2525
actions_subcommand: 'fmt'
2626

2727
- name: 'Terraform init for memcached'
28-
uses: 'clouddrove/github-actions@v6.0'
28+
uses: 'clouddrove/github-actions@v7.0'
2929
with:
3030
actions_subcommand: 'init'
3131
tf_actions_working_dir: ./_example/memcached
3232

3333
- name: 'Terraform validate for memcached'
34-
uses: 'clouddrove/github-actions@v6.0'
34+
uses: 'clouddrove/github-actions@v7.0'
3535
with:
3636
actions_subcommand: 'validate'
3737
tf_actions_working_dir: ./_example/memcached
3838

3939
- name: 'Terraform plan for memcached'
40-
uses: 'clouddrove/github-actions@v6.0'
40+
uses: 'clouddrove/github-actions@v7.0'
4141
with:
4242
actions_subcommand: 'plan'
4343
tf_actions_working_dir: ./_example/memcached
4444

4545
- name: 'Terraform init for redis'
46-
uses: 'clouddrove/github-actions@v6.0'
46+
uses: 'clouddrove/github-actions@v7.0'
4747
with:
4848
actions_subcommand: 'init'
4949
tf_actions_working_dir: ./_example/redis
5050

5151
- name: 'Terraform validate for redis'
52-
uses: 'clouddrove/github-actions@v6.0'
52+
uses: 'clouddrove/github-actions@v7.0'
5353
with:
5454
actions_subcommand: 'validate'
5555
tf_actions_working_dir: ./_example/redis
5656

5757
- name: 'Terraform plan for redis'
58-
uses: 'clouddrove/github-actions@v6.0'
58+
uses: 'clouddrove/github-actions@v7.0'
5959
with:
6060
actions_subcommand: 'plan'
6161
tf_actions_working_dir: ./_example/redis
6262

6363
- name: 'Terraform init for redis-cluster'
64-
uses: 'clouddrove/github-actions@v6.0'
64+
uses: 'clouddrove/github-actions@v7.0'
6565
with:
6666
actions_subcommand: 'init'
6767
tf_actions_working_dir: ./_example/redis-cluster
6868

6969
- name: 'Terraform validate for redis-cluster'
70-
uses: 'clouddrove/github-actions@v6.0'
70+
uses: 'clouddrove/github-actions@v7.0'
7171
with:
7272
actions_subcommand: 'validate'
7373
tf_actions_working_dir: ./_example/redis-cluster
7474

7575
- name: 'Terraform plan for redis-cluster'
76-
uses: 'clouddrove/github-actions@v6.0'
76+
uses: 'clouddrove/github-actions@v7.0'
7777
with:
7878
actions_subcommand: 'plan'
7979
tf_actions_working_dir: ./_example/redis-cluster
@@ -88,4 +88,4 @@ jobs:
8888
env:
8989
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} # required
9090
SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK_TERRAFORM }} # required
91-
if: always()
91+
if: always()

.github/workflows/terratest.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -57,4 +57,4 @@ jobs:
5757
env:
5858
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} # required
5959
SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK_TERRAFORM }} # required
60-
if: always()
60+
if: always()

.pre-commit-config.yaml

Lines changed: 15 additions & 7 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.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
8+
- id: tflint
69

7-
- repo: https://github.com/pre-commit/pre-commit-hooks
8-
rev: v3.4.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:
10-
- id: check-merge-conflict
13+
- id: end-of-file-fixer
1114
- id: trailing-whitespace
15+
- id: mixed-line-ending
16+
- id: check-byte-order-marker
17+
- id: check-executables-have-shebangs
18+
- id: check-merge-conflict
19+
- id: debug-statements
1220
- id: check-yaml
13-
- id: check-added-large-files
21+
- id: check-added-large-files

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.md

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
Terraform AWS Elasticache
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 Elasticache Cluster and replica for Redis and Memcache.
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)
@@ -203,7 +203,7 @@ Here are some examples of how you can use this module in your inventory structur
203203

204204

205205
## Testing
206-
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.
206+
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.
207207

208208
You need to run the following command in the testing folder:
209209
```hcl
@@ -212,7 +212,7 @@ You need to run the following command in the testing folder:
212212

213213

214214

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

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

README.yaml

Lines changed: 8 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ github_repo: clouddrove/terraform-aws-elasticache
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"
@@ -39,11 +39,10 @@ usage : |-
3939
```hcl
4040
module "redis" {
4141
source = "clouddrove/elasticache/aws
42-
version = "0.14.0"
42+
version = "0.15.0"
4343
name = "redis"
44-
repository = "https://registry.terraform.io/modules/clouddrove/elasticache/aws/0.14.0"
4544
environment = "test"
46-
label_order = ["environment", "application", "name"]
45+
label_order = ["environment", "name"]
4746
engine = "redis"
4847
engine_version = "5.0.0"
4948
family = "redis5.0"
@@ -61,11 +60,10 @@ usage : |-
6160
```hcl
6261
module "redis-cluster" {
6362
source = "clouddrove/elasticache/aws
64-
version = "0.14.0"
63+
version = "0.15.0"
6564
name = "cluster"
66-
repository = "https://registry.terraform.io/modules/clouddrove/elasticache/aws/0.14.0"
6765
environment = "test"
68-
label_order = ["environment", "application", "name"]
66+
label_order = ["environment","name"]
6967
cluster_replication_enabled = true
7068
engine = "redis"
7169
engine_version = "5.0.0"
@@ -85,11 +83,10 @@ usage : |-
8583
```hcl
8684
module "memcached" {
8785
source = "clouddrove/elasticache/aws
88-
version = "0.14.0"
86+
version = "0.15.0"
8987
name = "memcached"
90-
repository = "https://registry.terraform.io/modules/clouddrove/elasticache/aws/0.14.0"
9188
environment = "test"
92-
label_order = ["environment", "application", "name"]
89+
label_order = ["environment", "name"]
9390
cluster_enabled = true
9491
engine = "memcached"
9592
engine_version = "1.5.10"
@@ -102,4 +99,4 @@ usage : |-
10299
security_group_ids = ["sg-xxxxxxxxx"]
103100
availability_zones = ["eu-west-1a","eu-west-1b" ]
104101
}
105-
```
102+
```

_example/memcached/example.tf

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -4,10 +4,9 @@ provider "aws" {
44

55
module "vpc" {
66
source = "clouddrove/vpc/aws"
7-
version = "0.14.0"
7+
version = "0.15.0"
88

99
name = "vpc"
10-
repository = "https://registry.terraform.io/modules/clouddrove/vpc/aws/0.14.0"
1110
environment = "test"
1211
label_order = [
1312
"name", "environment"]
@@ -17,10 +16,9 @@ module "vpc" {
1716

1817
module "subnets" {
1918
source = "clouddrove/subnet/aws"
20-
version = "0.14.0"
19+
version = "0.15.0"
2120

2221
name = "subnets"
23-
repository = "https://registry.terraform.io/modules/clouddrove/subnet/aws/0.14.0"
2422
environment = "test"
2523
label_order = ["name", "environment"]
2624

@@ -34,10 +32,9 @@ module "subnets" {
3432

3533
module "memcached-sg" {
3634
source = "clouddrove/security-group/aws"
37-
version = "0.14.0"
35+
version = "0.15.0"
3836

3937
name = "memcached-sg"
40-
repository = "https://registry.terraform.io/modules/clouddrove/security-group/aws/0.14.0"
4138
environment = "test"
4239
label_order = ["name", "environment"]
4340

_example/memcached/outputs.tf

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
output "tags" {
22
value = module.memcached.tags
33
description = "A mapping of tags to assign to the resource."
4-
}
4+
}

_example/redis-cluster/example.tf

Lines changed: 7 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -4,10 +4,9 @@ provider "aws" {
44

55
module "vpc" {
66
source = "clouddrove/vpc/aws"
7-
version = "0.14.0"
7+
version = "0.15.0"
88

99
name = "vpc"
10-
repository = "https://registry.terraform.io/modules/clouddrove/vpc/aws/0.14.0"
1110
environment = "test"
1211
label_order = ["name", "environment"]
1312

@@ -16,10 +15,9 @@ module "vpc" {
1615

1716
module "subnets" {
1817
source = "clouddrove/subnet/aws"
19-
version = "0.14.0"
18+
version = "0.15.0"
2019

2120
name = "subnets"
22-
repository = "https://registry.terraform.io/modules/clouddrove/subnet/aws/0.14.0"
2321
environment = "test"
2422
label_order = ["name", "environment"]
2523
availability_zones = ["eu-west-1a", "eu-west-1b", "eu-west-1c"]
@@ -31,10 +29,10 @@ module "subnets" {
3129
}
3230

3331
module "redis-sg" {
34-
source = "git::https://github.com/clouddrove/terraform-aws-security-group.git"
32+
source = "clouddrove/security-group/aws"
33+
version = "0.15.0"
3534

3635
name = "redis-sg"
37-
repository = "https://registry.terraform.io/modules/clouddrove/security-group/aws/0.14.0"
3836
environment = "test"
3937
label_order = ["name", "environment"]
4038

@@ -47,14 +45,13 @@ module "redis-cluster" {
4745
source = "./../../"
4846

4947
name = "cluster"
50-
repository = "https://registry.terraform.io/modules/clouddrove/vpc/aws/0.14.0"
5148
environment = "test"
5249
label_order = ["name", "environment"]
5350

5451
cluster_replication_enabled = true
5552
engine = "redis"
56-
engine_version = "5.0.0"
57-
family = "redis5.0"
53+
engine_version = "6.x"
54+
parameter_group_name = "default.redis6.x.cluster.on"
5855
port = 6379
5956
node_type = "cache.t2.micro"
6057
subnet_ids = module.subnets.public_subnet_id
@@ -64,4 +61,4 @@ module "redis-cluster" {
6461
replicas_per_node_group = 2
6562
num_node_groups = 1
6663
automatic_failover_enabled = true
67-
}
64+
}

_example/redis-cluster/outputs.tf

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,4 +6,4 @@ output "id" {
66
output "tags" {
77
value = module.redis-cluster.tags
88
description = "A mapping of tags to assign to the resource."
9-
}
9+
}

0 commit comments

Comments
 (0)