Skip to content

Commit de69a5b

Browse files
author
Nikita Dugar
authored
Merge pull request #13 from clouddrove/0.15
upgrade in 0.15
2 parents 7024244 + 2f7b3b9 commit de69a5b

File tree

14 files changed

+108
-69
lines changed

14 files changed

+108
-69
lines changed

.github/workflows/terraform.yml

Lines changed: 27 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ jobs:
1313
uses: actions/checkout@master
1414

1515
- name: 'Terraform Format'
16-
uses: 'clouddrove/github-actions@v6.0'
16+
uses: 'clouddrove/github-actions@v7.0'
1717
with:
1818
actions_subcommand: 'fmt'
1919

@@ -34,19 +34,19 @@ jobs:
3434
aws-region: us-east-2
3535

3636
- name: 'Terraform init multi-node'
37-
uses: 'clouddrove/github-actions@v6.0'
37+
uses: 'clouddrove/github-actions@v7.0'
3838
with:
3939
actions_subcommand: 'init'
4040
tf_actions_working_dir: ./_example/multi-node
4141

4242
- name: 'Terraform validate multi-node'
43-
uses: 'clouddrove/github-actions@v6.0'
43+
uses: 'clouddrove/github-actions@v7.0'
4444
with:
4545
actions_subcommand: 'validate'
4646
tf_actions_working_dir: ./_example/multi-node
4747

4848
- name: 'Terraform plan multi-node'
49-
uses: 'clouddrove/github-actions@v6.0'
49+
uses: 'clouddrove/github-actions@v7.0'
5050
with:
5151
actions_subcommand: 'plan'
5252
tf_actions_working_dir: ./_example/multi-node
@@ -67,23 +67,42 @@ jobs:
6767
aws-region: us-east-2
6868

6969
- name: 'Terraform init single-node'
70-
uses: 'clouddrove/github-actions@v6.0'
70+
uses: 'clouddrove/github-actions@v7.0'
7171
with:
7272
actions_subcommand: 'init'
7373
tf_actions_working_dir: ./_example/single-node
7474

7575
- name: 'Terraform validate single-node'
76-
uses: 'clouddrove/github-actions@v6.0'
76+
uses: 'clouddrove/github-actions@v7.0'
7777
with:
7878
actions_subcommand: 'validate'
7979
tf_actions_working_dir: ./_example/single-node
8080

8181
- name: 'Terraform plan single-node'
82-
uses: 'clouddrove/github-actions@v6.0'
82+
uses: 'clouddrove/github-actions@v7.0'
8383
with:
8484
actions_subcommand: 'plan'
8585
tf_actions_working_dir: ./_example/single-node
8686

87+
pre-commit:
88+
name: 'Pre-Commit'
89+
needs:
90+
- fmt
91+
- multi-node
92+
- single-node
93+
runs-on: ubuntu-latest
94+
steps:
95+
- name: 'Checkout'
96+
uses: actions/checkout@v2.3.4
97+
98+
- name: 'Install Tflint'
99+
run: |
100+
curl https://raw.githubusercontent.com/terraform-linters/tflint/master/install_linux.sh | bash
101+
102+
- name: 'Pre-Commit 🔎'
103+
uses: pre-commit/action@v2.0.3
104+
continue-on-error: true
105+
87106
- name: 'Slack Notification'
88107
uses: clouddrove/action-slack@v2
89108
with:
@@ -93,4 +112,4 @@ jobs:
93112
env:
94113
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} # required
95114
SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK_TERRAFORM }} # required
96-
if: always()
115+
if: always()

.github/workflows/terratest.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ jobs:
2323

2424
- name: 'Terratest single'
2525
if: ${{ github.event.label.name == 'terratest' }}
26-
uses: 'clouddrove/github-actions@v4.0'
26+
uses: 'clouddrove/github-actions@v7.0'
2727
with:
2828
actions_subcommand: 'terratest'
2929
tf_actions_working_dir: '_test/single-node'
@@ -32,7 +32,7 @@ jobs:
3232

3333
- name: 'Terratest multi'
3434
if: ${{ github.event.label.name == 'terratest' }}
35-
uses: 'clouddrove/github-actions@v4.0'
35+
uses: 'clouddrove/github-actions@v7.0'
3636
with:
3737
actions_subcommand: 'terratest'
3838
tf_actions_working_dir: '_test/multi-node'
@@ -48,4 +48,4 @@ jobs:
4848
env:
4949
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} # required
5050
SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK_TERRAFORM }} # required
51-
if: always()
51+
if: always()

.gitignore

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,3 +6,5 @@
66
*.iml
77
.terraform.tfstate.lock.info
88
go.sum
9+
*.terrafrom.lock.hcl
10+
*.crash

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

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 Elasticsearch
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 an Elasticsearch resource on AWS.
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)
@@ -206,7 +206,7 @@ Note: There are some type of instances which not support encryption and EBS opti
206206

207207

208208
## Testing
209-
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.
209+
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.
210210

211211
You need to run the following command in the testing folder:
212212
```hcl
@@ -215,7 +215,7 @@ You need to run the following command in the testing folder:
215215

216216

217217

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

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

README.yaml

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ github_repo: clouddrove/terraform-aws-elasticsearch
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"
@@ -38,9 +38,8 @@ usage: |-
3838
```hcl
3939
module "elasticsearch" {
4040
source = "clouddrove/elasticsearch/aws"
41-
version = "0.14.0"
41+
version = "0.15.0"
4242
name = "es"
43-
repository = "https://registry.terraform.io/modules/clouddrove/elasticsearch/aws/0.14.0"
4443
environment = "test"
4544
label_order = ["name", "environment"]
4645
enable_iam_service_linked_role = true
@@ -70,9 +69,8 @@ usage: |-
7069
```hcl
7170
module "elasticsearch" {
7271
source = "clouddrove/elasticsearch/aws"
73-
version = "0.14.0"
72+
version = "0.15.0"
7473
name = "es"
75-
repository = "https://registry.terraform.io/modules/clouddrove/elasticsearch/aws/0.14.0"
7674
environment = "test"
7775
label_order = ["name", "environment"]
7876
domain_name = "clouddrove"

_example/multi-node/example.tf

Lines changed: 5 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -4,21 +4,19 @@ 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
cidr_block = "172.16.0.0/16"
1413
}
1514

1615
module "public_subnets" {
1716
source = "clouddrove/subnet/aws"
18-
version = "0.14.0"
17+
version = "0.15.0"
1918

2019
name = "public-subnet"
21-
repository = "https://registry.terraform.io/modules/clouddrove/subnet/aws/0.14.0"
2220
environment = "test"
2321
label_order = ["name", "environment"]
2422

@@ -32,10 +30,9 @@ module "public_subnets" {
3230

3331
module "security_group" {
3432
source = "clouddrove/security-group/aws"
35-
version = "0.14.0"
33+
version = "0.15.0"
3634

3735
name = "ingress_security_groups"
38-
repository = "https://registry.terraform.io/modules/clouddrove/security-group/aws/0.14.0"
3936
environment = "test"
4037
label_order = ["name", "environment"]
4138

@@ -47,16 +44,15 @@ module "security_group" {
4744
module "elasticsearch" {
4845
source = "../../"
4946
name = "es"
50-
repository = "https://registry.terraform.io/modules/clouddrove/elasticsearch/aws/0.14.0"
51-
environment = "test"
47+
environment = "test1"
5248
label_order = ["name", "environment"]
5349
domain_name = "clouddrove"
5450
enable_iam_service_linked_role = true
5551
security_group_ids = [module.security_group.security_group_ids]
5652
subnet_ids = tolist(module.public_subnets.public_subnet_id)
5753
zone_awareness_enabled = true
5854
availability_zone_count = 2
59-
elasticsearch_version = "7.1"
55+
elasticsearch_version = "7.8"
6056
instance_type = "t2.small.elasticsearch"
6157
instance_count = 2
6258
iam_actions = ["es:ESHttpGet", "es:ESHttpPut", "es:ESHttpPost"]

_example/multi-node/outputs.tf

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

_example/single-node/example.tf

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

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

99

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

@@ -17,10 +16,9 @@ module "vpc" {
1716

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

2221
name = "public-subnet"
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 "public_subnets" {
3432

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

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

@@ -49,13 +46,12 @@ module "security_group" {
4946
module "elasticsearch" {
5047
source = "../../"
5148
name = "es"
52-
repository = "https://registry.terraform.io/modules/clouddrove/elasticsearch/aws/0.14.0"
5349
environment = "test"
5450
label_order = ["name", "environment"]
5551
enable_iam_service_linked_role = true
5652
security_group_ids = [module.security_group.security_group_ids]
5753
subnet_ids = tolist(module.public_subnets.public_subnet_id)
58-
elasticsearch_version = "7.1"
54+
elasticsearch_version = "7.8"
5955
instance_type = "t2.small.elasticsearch"
6056
instance_count = 1
6157
iam_actions = ["es:ESHttpGet", "es:ESHttpPut", "es:ESHttpPost"]
@@ -66,6 +62,7 @@ module "elasticsearch" {
6662
log_publishing_index_cloudwatch_log_group_arn = true
6763

6864
enforce_https = true
65+
cognito_enabled = false
6966
tls_security_policy = "Policy-Min-TLS-1-0-2019-07"
7067
public_enabled = false
7168
dns_enabled = false
@@ -76,4 +73,4 @@ module "elasticsearch" {
7673
advanced_options = {
7774
"rest.action.multi.allow_explicit_index" = "true"
7875
}
79-
}
76+
}

0 commit comments

Comments
 (0)