Skip to content

Commit 5b06fb4

Browse files
committed
DEV-14279 Fix up example.
1 parent d950ad3 commit 5b06fb4

File tree

4 files changed

+31
-31
lines changed

4 files changed

+31
-31
lines changed

examples/minimal/README.md

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -11,11 +11,10 @@ No provider.
1111

1212
| Name | Description | Type | Default | Required |
1313
|------|-------------|------|---------|:--------:|
14-
| identifier\_prefix | Identifier prefix for the resources | `string` | n/a | yes |
15-
| parameter\_group\_name | Name of the parameter group | `string` | n/a | yes |
16-
| pg\_password | Password for postgres | `string` | n/a | yes |
17-
| pg\_username | Username for postgres | `string` | n/a | yes |
18-
| postgres\_db\_name | Name of the postgres db | `string` | n/a | yes |
14+
| spark\_service\_access\_sg\_ids | List of Spark service access security group IDs to allow ingress from | `list(string)` | n/a | yes |
15+
| 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 |
17+
| vpc\_id | VPC ID of network. | `string` | n/a | yes |
1918

2019
## Outputs
2120

examples/minimal/local.tfvars

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1,4 @@
1-
postgres_db_name = "example_postgres_db"
1+
vpc_id = "vpc-example"
2+
subnet_ids = ["subnet-az1", "subnet-az2"]
3+
spark_service_access_sg_ids = ["example-spark-service-access-sg"]
4+
tamr_vm_sg_id = "example-tamr-vm-sg"

examples/minimal/main.tf

Lines changed: 13 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,18 @@
11
module "rds_postgres" {
2-
source = "git::https://github.com/Datatamer/terraform-aws-rds-postgres.git?ref=0.3.0"
3-
postgres_name = "example_rds_postgres"
2+
# source = "git::https://github.com/Datatamer/terraform-aws-rds-postgres.git?ref=0.3.0"
3+
source = "../.."
4+
5+
identifier_prefix = "example-rds-pg-"
6+
postgres_name = "example0"
47
parameter_group_name = "example-rds-postgres-pg"
5-
identifier_prefix = "example-rds-"
8+
username = "example-tamr-master"
9+
password = "foo" #tfsec:ignore:GEN003
610

7-
username = "exampleUsername"
8-
password = "examplePassword"
11+
vpc_id = var.vpc_id
12+
subnet_group_name = "example_subnet_group"
13+
# Network requirement: DB subnet group needs a subnet in at least two Availability Zones
14+
rds_subnet_ids = var.subnet_ids
915

10-
subnet_group_name = "example_subnet"
11-
rds_subnet_ids = ["example-subnet-1", "example-subnet-2"]
12-
spark_cluster_sg_ids = ["sg-examplesecuritygroup1", "sg-examplesecuritygroup2"]
13-
tamr_vm_sg_id = "sg-exampletamrsecuritygroup"
14-
vpc_id = "vpc-examplevpcnetworkid"
16+
spark_cluster_sg_ids = var.spark_service_access_sg_ids
17+
tamr_vm_sg_id = var.tamr_vm_sg_id
1518
}

examples/minimal/variables.tf

Lines changed: 10 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -1,24 +1,19 @@
1-
variable "postgres_db_name" {
1+
variable "vpc_id" {
22
type = string
3-
description = "Name of the postgres db"
3+
description = "VPC ID of network."
44
}
55

6-
variable "parameter_group_name" {
7-
type = string
8-
description = "Name of the parameter group"
6+
variable "subnet_ids" {
7+
type = list(string)
8+
description = "List of at least 2 subnets in different AZs for DB subnet group"
99
}
1010

11-
variable "identifier_prefix" {
12-
type = string
13-
description = "Identifier prefix for the resources"
14-
}
15-
16-
variable "pg_username" {
17-
type = string
18-
description = "Username for postgres"
11+
variable "spark_service_access_sg_ids" {
12+
type = list(string)
13+
description = "List of Spark service access security group IDs to allow ingress from"
1914
}
2015

21-
variable "pg_password" {
16+
variable "tamr_vm_sg_id" {
2217
type = string
23-
description = "Password for postgres"
18+
description = "Security group ID of Tamr VM to allow ingress from"
2419
}

0 commit comments

Comments
 (0)