Skip to content

Commit c87f444

Browse files
authored
Merge pull request #27 from souza-dan/remove-unused-references
DEV-15187 - Remove unused references
2 parents 30781a1 + 226308e commit c87f444

File tree

13 files changed

+25
-83
lines changed

13 files changed

+25
-83
lines changed

CHANGELOG.md

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,14 @@
11
# Tamr Terraform AWS OpenSearch Repo
22

3+
## v6.0.0 August 23rd 2022
4+
* Removes the following input variables from the main module:
5+
* `vpc_id`
6+
* Removes the following input variables from the `cloudwatch-logs` module:
7+
* `domain_name`
8+
* `log_retention_in_days`
9+
* `tags`
10+
* Removes unused variables from examples
11+
312
## v5.0.0 July 29th 2022
413
* Removes the following input variables from the main module:
514
* `aws_region`

README.md

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,6 @@ No provider.
5050
|------|-------------|------|---------|:--------:|
5151
| domain\_name | The name to give to the OpenSearch domain | `string` | n/a | yes |
5252
| subnet\_ids | List of subnet IDs for the OpenSearch domain to be created in | `list(string)` | n/a | yes |
53-
| vpc\_id | The ID of the VPC in which to attach the security group | `string` | n/a | yes |
5453
| arn\_partition | The partition in which the resource is located. A partition is a group of AWS Regions.<br> Each AWS account is scoped to one partition.<br> The following are the supported partitions:<br> aws -AWS Regions<br> aws-cn - China Regions<br> aws-us-gov - AWS GovCloud (US) Regions | `string` | `"aws"` | no |
5554
| ebs\_enabled | Whether EBS volumes are attached to data nodes | `bool` | `true` | no |
5655
| ebs\_iops | The baseline I/O performance of EBS volumes attached to nodes.<br> Iops is only valid when volume type is io1 | `number` | `null` | no |

VERSION

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
5.0.0
1+
6.0.0

examples/logs/README.md

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,6 @@ No requirements.
1818
| subnet\_cidr | n/a | `string` | n/a | yes |
1919
| vpc\_cidr | n/a | `string` | n/a | yes |
2020
| create\_new\_service\_role | Whether to create a new IAM service linked role for ES. This only needs to happen once per account. If false, linked\_service\_role is required | `bool` | `false` | no |
21-
| log\_retention\_in\_days | Specifies the number of days you want to retain log events.<br> Possible values are: 1, 3, 5, 7, 14, 30, 60, 90, 120, 150, 180, 365, 400, 545, 731, 1827, 3653, and 0.<br> If you select 0, the events in the log group are always retained and never expire. | `number` | `0` | no |
2221
| log\_types | A list of log types that will be published to CloudWatch. Valid values are SEARCH\_SLOW\_LOGS, INDEX\_SLOW\_LOGS, ES\_APPLICATION\_LOGS and AUDIT\_LOGS. | `list(string)` | <pre>[<br> "ES_APPLICATION_LOGS",<br> "SEARCH_SLOW_LOGS",<br> "INDEX_SLOW_LOGS"<br>]</pre> | no |
2322
| tags | A map of tags to add to all resources created by this example. | `map(string)` | <pre>{<br> "Author": "Tamr",<br> "Environment": "Example"<br>}</pre> | no |
2423

examples/logs/main.tf

Lines changed: 7 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -10,20 +10,22 @@ resource "aws_subnet" "es_subnet" {
1010
}
1111

1212
module "sg-ports" {
13-
#source = "git::https://github.com/Datatamer/terraform-aws-es.git//modules/es-ports?ref=2.0.0"
13+
#source = "git::https://github.com/Datatamer/terraform-aws-opensearch.git//modules/es-ports?ref=6.0.0"
1414
source = "../../modules/es-ports"
1515
}
1616

1717
module "aws-sg" {
18-
source = "git::[email protected]:Datatamer/terraform-aws-security-groups.git?ref=0.1.0"
18+
source = "git::[email protected]:Datatamer/terraform-aws-security-groups.git?ref=1.0.1"
1919
vpc_id = aws_vpc.es_vpc.id
2020
ingress_cidr_blocks = var.ingress_cidr_blocks
2121
egress_cidr_blocks = [
2222
"0.0.0.0/0"
2323
]
24-
ingress_ports = module.sg-ports.ingress_ports
25-
sg_name_prefix = var.name-prefix
26-
tags = var.tags
24+
ingress_ports = module.sg-ports.ingress_ports
25+
sg_name_prefix = var.name-prefix
26+
ingress_protocol = "tcp"
27+
egress_protocol = "all"
28+
tags = var.tags
2729
}
2830

2931
resource "aws_iam_service_linked_role" "es" {
@@ -37,7 +39,6 @@ module "tamr-es-cluster" {
3739
aws_cloudwatch_log_group.es-logs
3840
]
3941
source = "../../"
40-
vpc_id = aws_vpc.es_vpc.id
4142
domain_name = format("%s-opensearch", var.name-prefix)
4243
subnet_ids = [aws_subnet.es_subnet.id]
4344
security_group_ids = module.aws-sg.security_group_ids
@@ -49,7 +50,4 @@ module "tamr-es-cluster" {
4950
#tfsec:ignore:aws-cloudwatch-log-group-customer-key
5051
resource "aws_cloudwatch_log_group" "es-logs" {
5152
name = format("%s-%s", var.name-prefix, "example-logs")
52-
53-
retention_in_days = var.log_retention_in_days
54-
tags = var.tags
5553
}

examples/logs/variables.tf

Lines changed: 0 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -23,16 +23,6 @@ variable "log_types" {
2323
default = ["ES_APPLICATION_LOGS", "SEARCH_SLOW_LOGS", "INDEX_SLOW_LOGS"]
2424
}
2525

26-
variable "log_retention_in_days" {
27-
type = number
28-
description = <<EOF
29-
Specifies the number of days you want to retain log events.
30-
Possible values are: 1, 3, 5, 7, 14, 30, 60, 90, 120, 150, 180, 365, 400, 545, 731, 1827, 3653, and 0.
31-
If you select 0, the events in the log group are always retained and never expire.
32-
EOF
33-
default = 0
34-
}
35-
3626
variable "vpc_cidr" {
3727
type = string
3828
}

examples/minimal/main.tf

Lines changed: 7 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -10,20 +10,22 @@ resource "aws_subnet" "es_subnet" {
1010
}
1111

1212
module "sg-ports" {
13-
#source = "git::https://github.com/Datatamer/terraform-aws-opensearch.git//modules/es-ports?ref=3.0.0"
13+
#source = "git::https://github.com/Datatamer/terraform-aws-opensearch.git//modules/es-ports?ref=6.0.0"
1414
source = "../../modules/es-ports"
1515
}
1616

1717
module "aws-sg" {
18-
source = "git::[email protected]:Datatamer/terraform-aws-security-groups.git?ref=0.1.0"
18+
source = "git::[email protected]:Datatamer/terraform-aws-security-groups.git?ref=1.0.1"
1919
vpc_id = aws_vpc.es_vpc.id
2020
ingress_cidr_blocks = var.ingress_cidr_blocks
2121
egress_cidr_blocks = [
2222
"0.0.0.0/0"
2323
]
24-
ingress_ports = module.sg-ports.ingress_ports
25-
sg_name_prefix = var.name-prefix
26-
tags = var.tags
24+
ingress_ports = module.sg-ports.ingress_ports
25+
sg_name_prefix = var.name-prefix
26+
ingress_protocol = "tcp"
27+
egress_protocol = "all"
28+
tags = var.tags
2729
}
2830

2931
resource "aws_iam_service_linked_role" "es" {
@@ -35,11 +37,8 @@ module "tamr-es-cluster" {
3537
source = "../../"
3638
depends_on = [aws_iam_service_linked_role.es]
3739

38-
vpc_id = aws_vpc.es_vpc.id
3940
domain_name = format("%s-opensearch", var.name-prefix)
4041
subnet_ids = [aws_subnet.es_subnet.id]
4142
security_group_ids = module.aws-sg.security_group_ids
4243
tags = var.tags
4344
}
44-
45-
data "aws_region" "current" {}

main.tf

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -31,8 +31,6 @@ module "tamr-es-cluster" {
3131
module "tamr-es-cloudwatch-log-groups" {
3232
source = "./modules/cloudwatch-logs"
3333

34-
domain_name = var.domain_name
35-
tags = local.effective_tags
3634
log_types = var.log_types
3735
log_group_name = var.log_group_name
3836
}

modules/aws-es/README.md

Lines changed: 1 addition & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,7 @@
11
# AWS OpenSearch Module
2-
This is a terraform module for a new OpenSearch domain on AWS.
2+
This is a Terraform module for a new OpenSearch domain on AWS.
33
This repo is laid out following the [terraform standard module structure](https://www.terraform.io/docs/modules/index.html#standard-module-structure).
44

5-
# Examples
6-
An inline example implementation of the module is implemented in the examples folder.
7-
This is the most basic example of what it would look like to use this module.
8-
9-
```
10-
module "tamr-es-cluster" {
11-
source = "git::https://github.com/Datatamer/terraform-aws-opensearch//modules/aws-es?ref=3.0.1"
12-
subnet_ids = ["subnet-id"]
13-
}
14-
```
15-
165
# Resources Created
176
This modules creates:
187
* a new security group with one or two attached rules (HTTP and/or HTTPS enabled)

modules/cloudwatch-logs/README.md

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -14,11 +14,8 @@ No requirements.
1414

1515
| Name | Description | Type | Default | Required |
1616
|------|-------------|------|---------|:--------:|
17-
| domain\_name | The name to give to the ES domain | `string` | `"tamr-es-cluster"` | no |
1817
| log\_group\_name | The name of an existent CloudWatch Log Group that ElasticSearch will publish logs to | `string` | `""` | no |
19-
| log\_retention\_in\_days | Specifies the number of days you want to retain log events.<br> Possible values are: 1, 3, 5, 7, 14, 30, 60, 90, 120, 150, 180, 365, 400, 545, 731, 1827, 3653, and 0.<br> If you select 0, the events in the log group are always retained and never expire. | `number` | `0` | no |
2018
| log\_types | A list of log types that will be published to CloudWatch. Valid values are SEARCH\_SLOW\_LOGS, INDEX\_SLOW\_LOGS, ES\_APPLICATION\_LOGS and AUDIT\_LOGS. | `list(string)` | <pre>[<br> "ES_APPLICATION_LOGS",<br> "SEARCH_SLOW_LOGS",<br> "INDEX_SLOW_LOGS"<br>]</pre> | no |
21-
| tags | A map of tags to add to CloudWatch resources. | `map(string)` | `{}` | no |
2219

2320
## Outputs
2421

0 commit comments

Comments
 (0)