Skip to content

Commit 7f64e0d

Browse files
authored
domain_endpoint_options_enforce_https enabled by default (#95)
* domain_endpoint_options_enforce_https enabled by default, tests fixed for TF 0.14 * formatting for TF 0.13 applied
1 parent feaaefc commit 7f64e0d

File tree

7 files changed

+14
-12
lines changed

7 files changed

+14
-12
lines changed

.gitignore

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,8 @@
66
.terraform
77
.idea
88
*.iml
9+
**/.terraform.lock.hcl
10+
test.log
911

1012
**/.build-harness
1113
**/build-harness

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -185,7 +185,7 @@ Available targets:
185185
| dedicated\_master\_type | Instance type of the dedicated master nodes in the cluster | `string` | `"t2.small.elasticsearch"` | no |
186186
| delimiter | Delimiter to be used between `namespace`, `environment`, `stage`, `name` and `attributes`.<br>Defaults to `-` (hyphen). Set to `""` to use no delimiter at all. | `string` | `null` | no |
187187
| dns\_zone\_id | Route53 DNS Zone ID to add hostname records for Elasticsearch domain and Kibana | `string` | `""` | no |
188-
| domain\_endpoint\_options\_enforce\_https | Whether or not to require HTTPS | `bool` | `false` | no |
188+
| domain\_endpoint\_options\_enforce\_https | Whether or not to require HTTPS | `bool` | `true` | no |
189189
| domain\_endpoint\_options\_tls\_security\_policy | The name of the TLS security policy that needs to be applied to the HTTPS endpoint | `string` | `"Policy-Min-TLS-1-0-2019-07"` | no |
190190
| domain\_hostname\_enabled | Explicit flag to enable creating a DNS hostname for ES. If `true`, then `var.dns_zone_id` is required. | `bool` | `false` | no |
191191
| ebs\_iops | The baseline input/output (I/O) performance of EBS volumes attached to data nodes. Applicable only for the Provisioned IOPS EBS volume type | `number` | `0` | no |

docs/terraform.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@
4141
| dedicated\_master\_type | Instance type of the dedicated master nodes in the cluster | `string` | `"t2.small.elasticsearch"` | no |
4242
| delimiter | Delimiter to be used between `namespace`, `environment`, `stage`, `name` and `attributes`.<br>Defaults to `-` (hyphen). Set to `""` to use no delimiter at all. | `string` | `null` | no |
4343
| dns\_zone\_id | Route53 DNS Zone ID to add hostname records for Elasticsearch domain and Kibana | `string` | `""` | no |
44-
| domain\_endpoint\_options\_enforce\_https | Whether or not to require HTTPS | `bool` | `false` | no |
44+
| domain\_endpoint\_options\_enforce\_https | Whether or not to require HTTPS | `bool` | `true` | no |
4545
| domain\_endpoint\_options\_tls\_security\_policy | The name of the TLS security policy that needs to be applied to the HTTPS endpoint | `string` | `"Policy-Min-TLS-1-0-2019-07"` | no |
4646
| domain\_hostname\_enabled | Explicit flag to enable creating a DNS hostname for ES. If `true`, then `var.dns_zone_id` is required. | `bool` | `false` | no |
4747
| ebs\_iops | The baseline input/output (I/O) performance of EBS volumes attached to data nodes. Applicable only for the Provisioned IOPS EBS volume type | `number` | `0` | no |

examples/complete/main.tf

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

55
module "vpc" {
66
source = "cloudposse/vpc/aws"
7-
version = "0.17.0"
7+
version = "0.18.2"
88

99
cidr_block = "172.16.0.0/16"
1010

@@ -13,7 +13,7 @@ module "vpc" {
1313

1414
module "subnets" {
1515
source = "cloudposse/dynamic-subnets/aws"
16-
version = "0.30.0"
16+
version = "0.34.0"
1717

1818
availability_zones = var.availability_zones
1919
vpc_id = module.vpc.vpc_id

main.tf

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,17 @@
11
module "user_label" {
22
source = "cloudposse/label/null"
3-
version = "0.22.0"
3+
version = "0.22.1"
44

5-
attributes = compact(concat(module.this.attributes, ["user"]))
5+
attributes = ["user"]
66

77
context = module.this.context
88
}
99

1010
module "kibana_label" {
1111
source = "cloudposse/label/null"
12-
version = "0.22.0"
12+
version = "0.22.1"
1313

14-
attributes = compact(concat(module.this.attributes, ["kibana"]))
14+
attributes = ["kibana"]
1515

1616
context = module.this.context
1717
}
@@ -262,7 +262,7 @@ resource "aws_elasticsearch_domain_policy" "default" {
262262

263263
module "domain_hostname" {
264264
source = "cloudposse/route53-cluster-hostname/aws"
265-
version = "0.8.0"
265+
version = "0.10.0"
266266

267267
enabled = module.this.enabled && var.domain_hostname_enabled
268268
dns_name = var.elasticsearch_subdomain_name == "" ? module.this.id : var.elasticsearch_subdomain_name
@@ -275,7 +275,7 @@ module "domain_hostname" {
275275

276276
module "kibana_hostname" {
277277
source = "cloudposse/route53-cluster-hostname/aws"
278-
version = "0.8.0"
278+
version = "0.10.0"
279279

280280
enabled = module.this.enabled && var.kibana_hostname_enabled
281281
dns_name = var.kibana_subdomain_name == "" ? module.kibana_label.id : var.kibana_subdomain_name

test/src/go.mod

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,6 @@ module github.com/cloudposse/terraform-aws-elasticsearch
33
go 1.14
44

55
require (
6-
github.com/gruntwork-io/terratest v0.30.0
6+
github.com/gruntwork-io/terratest v0.31.4
77
github.com/stretchr/testify v1.6.1
88
)

variables.tf

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -144,7 +144,7 @@ variable "encrypt_at_rest_kms_key_id" {
144144

145145
variable "domain_endpoint_options_enforce_https" {
146146
type = bool
147-
default = false
147+
default = true
148148
description = "Whether or not to require HTTPS"
149149
}
150150

0 commit comments

Comments
 (0)