Skip to content

Commit 3c4edef

Browse files
authored
Merge pull request #14 from Datatamer/DEV-14396.p2
DEV-14396 Make DB port configurable
2 parents 4469a13 + 81c77ec commit 3c4edef

File tree

8 files changed

+21
-10
lines changed

8 files changed

+21
-10
lines changed

CHANGELOG.md

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

3+
## v0.4.1 - Nov 6th 2020
4+
* Adds input `db_port` to configure port that postgres database accepts connections on
5+
* Fixes example so it accepts `ingress_sg_ids` as input
6+
37
## v0.4.0 - Oct 27th 2020
48
* Consolidates inputs `tamr_vm_sg_id` and `spark_cluster_sg_ids` into one input, `ingress_sg_ids`
59

README.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -61,6 +61,7 @@ This terraform module will create:
6161
| backup\_retention\_period | Backup retention period in days | `number` | `14` | no |
6262
| backup\_window | Backup window | `string` | `"03:29-03:59"` | no |
6363
| copy\_tags\_to\_snapshot | Copy tags to snapshots | `bool` | `true` | no |
64+
| db\_port | The port on which the database accepts connections. | `number` | `5432` | no |
6465
| engine\_version | Version of RDS Postgres | `string` | `"12.3"` | no |
6566
| identifier\_prefix | Identifier prefix for the RDS instance | `string` | `"tamr-rds-"` | no |
6667
| instance\_class | Instance class | `string` | `"db.m4.large"` | no |
@@ -78,6 +79,7 @@ This terraform module will create:
7879

7980
| Name | Description |
8081
|------|-------------|
82+
| rds\_db\_port | n/a |
8183
| rds\_dbname | n/a |
8284
| rds\_hostname | n/a |
8385
| rds\_postgres\_id | ID of the of the RDS instance |

VERSION

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
0.4.0
1+
0.4.1

examples/minimal/README.md

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,9 +11,8 @@ No provider.
1111

1212
| Name | Description | Type | Default | Required |
1313
|------|-------------|------|---------|:--------:|
14-
| spark\_service\_access\_sg\_ids | List of Spark service access security group IDs to allow ingress from | `list(string)` | n/a | yes |
14+
| ingress\_sg\_ids | List of security group IDs to allow ingress from (i.e. Spark cluster SG IDs, Tamr VM SG ID) | `list(string)` | n/a | yes |
1515
| subnet\_ids | List of at least 2 subnets in different AZs for DB subnet group | `list(string)` | n/a | yes |
16-
| tamr\_vm\_sg\_id | Security group ID of Tamr VM to allow ingress from | `string` | n/a | yes |
1716
| vpc\_id | VPC ID of network. | `string` | n/a | yes |
1817

1918
## Outputs

examples/minimal/variables.tf

Lines changed: 2 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -8,12 +8,7 @@ variable "subnet_ids" {
88
description = "List of at least 2 subnets in different AZs for DB subnet group"
99
}
1010

11-
variable "spark_service_access_sg_ids" {
11+
variable "ingress_sg_ids" {
12+
description = "List of security group IDs to allow ingress from (i.e. Spark cluster SG IDs, Tamr VM SG ID)"
1213
type = list(string)
13-
description = "List of Spark service access security group IDs to allow ingress from"
14-
}
15-
16-
variable "tamr_vm_sg_id" {
17-
type = string
18-
description = "Security group ID of Tamr VM to allow ingress from"
1914
}

main.tf

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,7 @@ resource "aws_db_instance" "rds_postgres" {
3434

3535
username = var.username
3636
password = var.password
37+
port = var.db_port
3738

3839
db_subnet_group_name = aws_db_subnet_group.rds_postgres_subnet_group.name
3940
multi_az = true

outputs.tf

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,10 @@ output "rds_hostname" {
1717
value = aws_db_instance.rds_postgres.address
1818
}
1919

20+
output "rds_db_port" {
21+
value = aws_db_instance.rds_postgres.port
22+
}
23+
2024
output "rds_username" {
2125
value = aws_db_instance.rds_postgres.username
2226
}

variables.tf

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,12 @@ variable "username" {
99
default = "tamr"
1010
}
1111

12+
variable "db_port" {
13+
description = "The port on which the database accepts connections."
14+
type = number
15+
default = 5432
16+
}
17+
1218
variable "postgres_name" {
1319
description = "The name of the postgres database to create on the DB instance"
1420
type = string

0 commit comments

Comments
 (0)