From 9e471164629bf25e1bcfea67ef2df97697adeaf4 Mon Sep 17 00:00:00 2001 From: ashle001 Date: Tue, 20 Apr 2021 15:15:55 -0400 Subject: [PATCH 1/5] rds-postgres --- rds-postgres/CHANGELOG.md | 3 +++ rds-postgres/README.md | 57 +++++++++++++++++++++++++++++++++++++++ rds-postgres/main.tf | 52 +++++++++++++++++++++++++++++++++++ rds-postgres/output.tf | 9 +++++++ rds-postgres/ports.tf | 11 ++++++++ rds-postgres/variables.tf | 38 ++++++++++++++++++++++++++ rds-postgres/version.tf | 5 ++++ rds-postgres/versions.tf | 4 +++ 8 files changed, 179 insertions(+) create mode 100644 rds-postgres/CHANGELOG.md create mode 100644 rds-postgres/README.md create mode 100644 rds-postgres/main.tf create mode 100644 rds-postgres/output.tf create mode 100644 rds-postgres/ports.tf create mode 100644 rds-postgres/variables.tf create mode 100644 rds-postgres/version.tf create mode 100644 rds-postgres/versions.tf diff --git a/rds-postgres/CHANGELOG.md b/rds-postgres/CHANGELOG.md new file mode 100644 index 0000000..239a373 --- /dev/null +++ b/rds-postgres/CHANGELOG.md @@ -0,0 +1,3 @@ +# v1.3 -- 20200604 + +* add module version, update tags diff --git a/rds-postgres/README.md b/rds-postgres/README.md new file mode 100644 index 0000000..3ebe3d2 --- /dev/null +++ b/rds-postgres/README.md @@ -0,0 +1,57 @@ +# About + +This describes how to use the aws-common-security-groups submodule for rds-postgres + +# Usage + +```code +module "rds-postgres" { + source = "git::https://vc1.csvd.census.gov/terraform-modules/aws-common-security-groups.git//rds-postgres" + + # name = "m-rds-postgres" + vpc_id = var.vpc_id + # Name, CostAllocation, and Environment are pre-set + # tags = { } +} +``` + +## Requirements + +| Name | Version | +|------|---------| +| terraform | >= 0.12 | + +## Providers + +| Name | Version | +|------|---------| +| aws | n/a | + +## Modules + +No Modules. + +## Resources + +| Name | +|------| +| [aws_security_group](https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/security_group) | + +## Inputs + +| Name | Description | Type | Default | Required | +|------|-------------|------|---------|:--------:| +| \_module\_version | Module version number | `string` | `"1.3"` | no | +| egress\_networks | List of egress networks (all ports) | `list(string)` |
[
"0.0.0.0/0"
]
| no | +| name | Security group Name | `string` | `"m-postgres-db"` | no | +| networks | List of ingress networks (applies to all ports) | `list(string)` |
[
"0.0.0.0/0"
]
| no | +| tags | Extra security group tags | `map` |
{
"CostAllocation": "csvd:infrastructure",
"Environment": "csvd-infrastructure"
}
| no | +| vpc\_full\_name | VPC Name | `string` | `""` | no | +| vpc\_id | VPC ID Number | `string` | n/a | yes | + +## Outputs + +| Name | Description | +|------|-------------| +| this\_security\_group\_arn | Created security group ARN | +| this\_security\_group\_id | Created security group ID | diff --git a/rds-postgres/main.tf b/rds-postgres/main.tf new file mode 100644 index 0000000..84b5dae --- /dev/null +++ b/rds-postgres/main.tf @@ -0,0 +1,52 @@ +/** +* # About +* +* This describes how to use the aws-common-security-groups submodule for rds-oracle +* +* # Usage +* +* ```code +* module "rds-postgres" { +* source = "git::https://vc1.csvd.census.gov/terraform-modules/aws-common-security-groups.git//rds-postgres" +* +* # name = "m-rds-postgres" +* vpc_id = var.vpc_id +* # Name, CostAllocation, and Environment are pre-set +* # tags = { } +* } +* ``` +*/ + +resource "aws_security_group" "this_security_group" { + name = local.name + description = local.description + vpc_id = var.vpc_id + + # portlist + dynamic "ingress" { + for_each = local.ports_map + iterator = p + content { + description = "${local.description}: ${p.value["description"]}" + from_port = p.value["from"] + to_port = p.value["to"] + protocol = p.value["proto"] + cidr_blocks = length(p.value["cidr"]) == 0 ? local.ingress_networks : p.value["cidr"] + } + } + + egress { + description = "${local.description}: All" + from_port = 0 + to_port = 0 + protocol = -1 + cidr_blocks = local.egress_networks + } + + tags = merge( + map("Name", "sg-${local.name}"), + var.tags, + map("boc:tf_module_version", var._module_version), + map("boc:vpc:info", join(" ", compact(list(var.vpc_id, var.vpc_full_name)))), + ) +} diff --git a/rds-postgres/output.tf b/rds-postgres/output.tf new file mode 100644 index 0000000..fbdd35a --- /dev/null +++ b/rds-postgres/output.tf @@ -0,0 +1,9 @@ +output "this_security_group_id" { + description = "Created security group ID" + value = aws_security_group.this_security_group.id +} + +output "this_security_group_arn" { + description = "Created security group ARN" + value = aws_security_group.this_security_group.arn +} diff --git a/rds-postgres/ports.tf b/rds-postgres/ports.tf new file mode 100644 index 0000000..75527b3 --- /dev/null +++ b/rds-postgres/ports.tf @@ -0,0 +1,11 @@ +locals { + description = "module: PostGres common ports" + name = var.name + ports = [ + [5482, 5482, "tcp", "postgres-db", []], + ] + ingress_networks = var.networks + egress_networks = var.egress_networks + ports_fields = ["from", "to", "proto", "description", "cidr"] + ports_map = [for p in local.ports : zipmap(local.ports_fields, p)] +} diff --git a/rds-postgres/variables.tf b/rds-postgres/variables.tf new file mode 100644 index 0000000..d7c1cde --- /dev/null +++ b/rds-postgres/variables.tf @@ -0,0 +1,38 @@ +variable "vpc_id" { + description = "VPC ID Number" + type = string +} + +variable "vpc_full_name" { + description = "VPC Name" + type = string + default = "" +} + +variable "name" { + description = "Security group Name" + type = string + # default = "m-rds-postgres" + default = "m-postgres-db" +} + +variable "networks" { + description = "List of ingress networks (applies to all ports)" + type = list(string) + default = ["0.0.0.0/0"] +} + +variable "egress_networks" { + description = "List of egress networks (all ports)" + type = list(string) + default = ["0.0.0.0/0"] +} + +variable "tags" { + description = "Extra security group tags" + type = map + default = { + "CostAllocation" = "csvd:infrastructure" + "Environment" = "csvd-infrastructure" + } +} diff --git a/rds-postgres/version.tf b/rds-postgres/version.tf new file mode 100644 index 0000000..38fadfd --- /dev/null +++ b/rds-postgres/version.tf @@ -0,0 +1,5 @@ +variable "_module_version" { + description = "Module version number" + type = string + default = "1.3" +} diff --git a/rds-postgres/versions.tf b/rds-postgres/versions.tf new file mode 100644 index 0000000..ac97c6a --- /dev/null +++ b/rds-postgres/versions.tf @@ -0,0 +1,4 @@ + +terraform { + required_version = ">= 0.12" +} From c720128afcb3227c07c116ec872198a253a54efe Mon Sep 17 00:00:00 2001 From: ashle001 Date: Tue, 20 Apr 2021 15:31:27 -0400 Subject: [PATCH 2/5] update version.tf and CHANGELOG.md --- rds-postgres/CHANGELOG.md | 2 +- rds-postgres/version.tf | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/rds-postgres/CHANGELOG.md b/rds-postgres/CHANGELOG.md index 239a373..284dbd4 100644 --- a/rds-postgres/CHANGELOG.md +++ b/rds-postgres/CHANGELOG.md @@ -1,3 +1,3 @@ -# v1.3 -- 20200604 +# v1.0 -- 20210421 * add module version, update tags diff --git a/rds-postgres/version.tf b/rds-postgres/version.tf index 38fadfd..84fd21a 100644 --- a/rds-postgres/version.tf +++ b/rds-postgres/version.tf @@ -1,5 +1,5 @@ variable "_module_version" { description = "Module version number" type = string - default = "1.3" + default = "1.0" } From 032a6fa3a3b3c05cfddac97724b8f55b6f34af9f Mon Sep 17 00:00:00 2001 From: ashle001 Date: Thu, 22 Apr 2021 08:50:10 -0400 Subject: [PATCH 3/5] add required variables --- rds-postgres/variables.tf | 63 +++++++++++++++++++++++++++++++++------ 1 file changed, 54 insertions(+), 9 deletions(-) diff --git a/rds-postgres/variables.tf b/rds-postgres/variables.tf index d7c1cde..3240eb8 100644 --- a/rds-postgres/variables.tf +++ b/rds-postgres/variables.tf @@ -1,23 +1,56 @@ +#--- +# change between different modules as needed +#--- +variable "name" { + description = "Security Group Name" + type = string + default = "rds-postgres" +} + +variable "description" { + description = "Security Group Description" + type = string + default = "RDS Postgres Security Group" +} + +variable "short_description" { + description = "Security Group Short Description" + type = string + default = "Postgres" +} + +variable "enable_self" { + description = "Enable|Disable self full access" + type = bool + default = false +} + +variable "use_vpc_cidr" { + description = "Enable|Disable use of VPC CIDR block in the ingress_networks" + type = bool + default = false +} + +#--- +# others with defaults +#--- variable "vpc_id" { description = "VPC ID Number" type = string } +data "aws_vpc" "selected" { + id = "${var.vpc_id}" +} + variable "vpc_full_name" { description = "VPC Name" type = string default = "" } -variable "name" { - description = "Security group Name" - type = string - # default = "m-rds-postgres" - default = "m-postgres-db" -} - -variable "networks" { - description = "List of ingress networks (applies to all ports)" +variable "ingress_networks" { + description = "List of ingress networks for external access (not all ports)" type = list(string) default = ["0.0.0.0/0"] } @@ -28,6 +61,18 @@ variable "egress_networks" { default = ["0.0.0.0/0"] } +variable "ingress_security_groups" { + description = "List of ingress security groups for all ports" + type = list(string) + default = [] +} + +variable "egress_security_groups" { + description = "List of egress security groups (all ports)" + type = list(string) + default = [] +} + variable "tags" { description = "Extra security group tags" type = map From 80f3e2ec2730b7795aa87b91e49c8a2ed7937a22 Mon Sep 17 00:00:00 2001 From: badra001 Date: Thu, 22 Apr 2021 15:09:29 -0400 Subject: [PATCH 4/5] refine, copy from it-windows-base --- rds-postgres/CHANGELOG.md | 5 +- rds-postgres/README.md | 56 +++++++++++--------- rds-postgres/main.tf | 105 +++++++++++++++++++++++++++++++------- rds-postgres/ports.tf | 34 +++++++++--- rds-postgres/variables.tf | 8 +-- rds-postgres/version.tf | 6 +-- 6 files changed, 153 insertions(+), 61 deletions(-) diff --git a/rds-postgres/CHANGELOG.md b/rds-postgres/CHANGELOG.md index 284dbd4..bc7fc37 100644 --- a/rds-postgres/CHANGELOG.md +++ b/rds-postgres/CHANGELOG.md @@ -1,3 +1,2 @@ -# v1.0 -- 20210421 - -* add module version, update tags +# v1.0.0 -- 20210421 + - add module version, update tags diff --git a/rds-postgres/README.md b/rds-postgres/README.md index 3ebe3d2..db3f8c0 100644 --- a/rds-postgres/README.md +++ b/rds-postgres/README.md @@ -1,16 +1,18 @@ -# About +# About rds-postgres -This describes how to use the aws-common-security-groups submodule for rds-postgres +This describes how to use the aws-common-security-groups submodule for rds-postgres. -# Usage +Default and auxilliary ports are included in this. They are opened to everything. -```code -module "rds-postgres" { - source = "git::https://vc1.csvd.census.gov/terraform-modules/aws-common-security-groups.git//rds-postgres" +## Usage - # name = "m-rds-postgres" +```hcl +module "postgres" { + source = "git@github.e.it.census.gov:terraform-modules/aws-common-security-groups.git//rds-postgres" + + # name = "rds-postgres" vpc_id = var.vpc_id - # Name, CostAllocation, and Environment are pre-set + # Name, CostAllocation, and Environment are pre-set, but they can be overriden # tags = { } } ``` @@ -19,39 +21,47 @@ module "rds-postgres" { | Name | Version | |------|---------| -| terraform | >= 0.12 | +| [terraform](#requirement\_terraform) | >= 0.12 | ## Providers | Name | Version | |------|---------| -| aws | n/a | +| [aws](#provider\_aws) | n/a | ## Modules -No Modules. +No modules. ## Resources -| Name | -|------| -| [aws_security_group](https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/security_group) | +| Name | Type | +|------|------| +| [aws_security_group.this_security_group](https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/security_group) | resource | +| [aws_security_group.egress_security_groups](https://registry.terraform.io/providers/hashicorp/aws/latest/docs/data-sources/security_group) | data source | +| [aws_security_group.ingress_security_groups](https://registry.terraform.io/providers/hashicorp/aws/latest/docs/data-sources/security_group) | data source | +| [aws_vpc.this_vpc](https://registry.terraform.io/providers/hashicorp/aws/latest/docs/data-sources/vpc) | data source | ## Inputs | Name | Description | Type | Default | Required | |------|-------------|------|---------|:--------:| -| \_module\_version | Module version number | `string` | `"1.3"` | no | -| egress\_networks | List of egress networks (all ports) | `list(string)` |
[
"0.0.0.0/0"
]
| no | -| name | Security group Name | `string` | `"m-postgres-db"` | no | -| networks | List of ingress networks (applies to all ports) | `list(string)` |
[
"0.0.0.0/0"
]
| no | -| tags | Extra security group tags | `map` |
{
"CostAllocation": "csvd:infrastructure",
"Environment": "csvd-infrastructure"
}
| no | -| vpc\_full\_name | VPC Name | `string` | `""` | no | -| vpc\_id | VPC ID Number | `string` | n/a | yes | +| [description](#input\_description) | Security Group Description | `string` | `"RDS PostgreSQL Security Group"` | no | +| [egress\_networks](#input\_egress\_networks) | List of egress networks (all ports) | `list(string)` |
[
"0.0.0.0/0"
]
| no | +| [egress\_security\_groups](#input\_egress\_security\_groups) | List of egress security groups (all ports) | `list(string)` | `[]` | no | +| [enable\_self](#input\_enable\_self) | Enable\|Disable self full access | `bool` | `false` | no | +| [ingress\_networks](#input\_ingress\_networks) | List of ingress networks for external access (not all ports) | `list(string)` |
[
"0.0.0.0/0"
]
| no | +| [ingress\_security\_groups](#input\_ingress\_security\_groups) | List of ingress security groups for all ports | `list(string)` | `[]` | no | +| [name](#input\_name) | Security Group Name | `string` | `"rds-postgres"` | no | +| [short\_description](#input\_short\_description) | Security Group Short Description | `string` | `"PostgreSQL"` | no | +| [tags](#input\_tags) | Extra security group tags | `map` |
{
"CostAllocation": "csvd:infrastructure",
"Environment": "csvd-infrastructure"
}
| no | +| [use\_vpc\_cidr](#input\_use\_vpc\_cidr) | Enable\|Disable use of VPC CIDR block in the ingress\_networks | `bool` | `false` | no | +| [vpc\_full\_name](#input\_vpc\_full\_name) | VPC Name | `string` | `""` | no | +| [vpc\_id](#input\_vpc\_id) | VPC ID Number | `string` | n/a | yes | ## Outputs | Name | Description | |------|-------------| -| this\_security\_group\_arn | Created security group ARN | -| this\_security\_group\_id | Created security group ID | +| [this\_security\_group\_arn](#output\_this\_security\_group\_arn) | Created security group ARN | +| [this\_security\_group\_id](#output\_this\_security\_group\_id) | Created security group ID | diff --git a/rds-postgres/main.tf b/rds-postgres/main.tf index 84b5dae..ff82f12 100644 --- a/rds-postgres/main.tf +++ b/rds-postgres/main.tf @@ -1,52 +1,119 @@ /** -* # About -* -* This describes how to use the aws-common-security-groups submodule for rds-oracle -* -* # Usage -* -* ```code -* module "rds-postgres" { -* source = "git::https://vc1.csvd.census.gov/terraform-modules/aws-common-security-groups.git//rds-postgres" -* -* # name = "m-rds-postgres" +* # About rds-postgres +* +* This describes how to use the aws-common-security-groups submodule for rds-postgres. +* +* Default and auxilliary ports are included in this. They are opened to everything. +* +* ## Usage +* +* ```hcl +* module "postgres" { +* source = "git@github.e.it.census.gov:terraform-modules/aws-common-security-groups.git//rds-postgres" +* +* # name = "rds-postgres" * vpc_id = var.vpc_id -* # Name, CostAllocation, and Environment are pre-set +* # Name, CostAllocation, and Environment are pre-set, but they can be overriden * # tags = { } * } * ``` */ +data "aws_vpc" "this_vpc" { + count = var.use_vpc_cidr ? 1 : 0 + id = var.vpc_id +} + +data "aws_security_group" "ingress_security_groups" { + count = length(var.ingress_security_groups) + id = element(var.ingress_security_groups, count.index) +} + +data "aws_security_group" "egress_security_groups" { + count = length(var.egress_security_groups) + id = element(var.egress_security_groups, count.index) +} + +locals { + vpc_networks = var.use_vpc_cidr ? [data.aws_vpc.this_vpc[0].cidr_block] : [] + external_ingress_networks = compact(concat(local.vpc_networks, local.ingress_networks)) + ingress_sg_names = zipmap(var.ingress_security_groups, data.aws_security_group.ingress_security_groups[*].name) + egress_sg_names = zipmap(var.egress_security_groups, data.aws_security_group.egress_security_groups[*].name) + self = var.enable_self ? [1] : [] + short_description = var.short_description == "" ? var.description : var.short_description +} + resource "aws_security_group" "this_security_group" { name = local.name - description = local.description + description = var.description vpc_id = var.vpc_id - # portlist + # ingresss external port list (list + vpc if enabaled) dynamic "ingress" { - for_each = local.ports_map + for_each = local.port_map["external"] iterator = p content { - description = "${local.description}: ${p.value["description"]}" + description = "${local.short_description}: ${p.value["description"]}" from_port = p.value["from"] to_port = p.value["to"] protocol = p.value["proto"] - cidr_blocks = length(p.value["cidr"]) == 0 ? local.ingress_networks : p.value["cidr"] + cidr_blocks = length(p.value["cidr"]) == 0 ? local.external_ingress_networks : p.value["cidr"] + } + } + + # ingress security group ids (all) + dynamic "ingress" { + for_each = local.ingress_sg + iterator = sg + content { + description = "${local.short_description}: ${local.ingress_sg_names[sg.value]}" + from_port = 0 + to_port = 0 + protocol = -1 + security_groups = [sg.value] } } + # ingress self (list with one or zero items) + dynamic "ingress" { + for_each = local.self + iterator = sg + content { + description = "${local.short_description}: from self" + from_port = 0 + to_port = 0 + protocol = -1 + self = true + } + } + + # egress all egress { - description = "${local.description}: All" + description = "${local.short_description}: All" from_port = 0 to_port = 0 protocol = -1 cidr_blocks = local.egress_networks } + # egress security group ids (all) + dynamic "egress" { + for_each = local.egress_sg + iterator = sg + content { + description = "${local.short_description}: ${local.egress_sg_names[sg]}" + from_port = 0 + to_port = 0 + protocol = -1 + security_groups = [sg] + } + } + tags = merge( map("Name", "sg-${local.name}"), var.tags, - map("boc:tf_module_version", var._module_version), + map("boc:created_by", "terraform"), + map("boc:tf_module_version", local._module_version), map("boc:vpc:info", join(" ", compact(list(var.vpc_id, var.vpc_full_name)))), ) } diff --git a/rds-postgres/ports.tf b/rds-postgres/ports.tf index 75527b3..a8d2a8e 100644 --- a/rds-postgres/ports.tf +++ b/rds-postgres/ports.tf @@ -1,11 +1,33 @@ +# ports = list of list of +# from_port +# to_port +# proto +# description +# cidr_block +# list of: all, external (more added as needed) + locals { - description = "module: PostGres common ports" - name = var.name + description = "module: PostgreSQL common ports" + n_all = ["0.0.0.0/0"] + n_census = ["148.129.0.0/16", "192.168.0.0/16", "172.16.0.0/12", "10.0.0.0/8"] + source_groups = ["all", "external"] + + name = var.name ports = [ - [5482, 5482, "tcp", "postgres-db", []], + [5482, 5482, "tcp", "postgres-db", local.n_all, ["external"]], ] - ingress_networks = var.networks + + # these are ignored + ingress_networks = var.ingress_networks egress_networks = var.egress_networks - ports_fields = ["from", "to", "proto", "description", "cidr"] - ports_map = [for p in local.ports : zipmap(local.ports_fields, p)] + + # these are ignored + ingress_sg = var.ingress_security_groups + egress_sg = var.egress_security_groups + + p_fields = ["from", "to", "proto", "description", "cidr", "source_group"] + p_map = [for p in local.ports : zipmap(local.p_fields, p)] + port_map = { for s in local.source_groups : + s => [for p in local.p_map : p if contains(p["source_group"], s)] + } } diff --git a/rds-postgres/variables.tf b/rds-postgres/variables.tf index 3240eb8..a28c2af 100644 --- a/rds-postgres/variables.tf +++ b/rds-postgres/variables.tf @@ -10,13 +10,13 @@ variable "name" { variable "description" { description = "Security Group Description" type = string - default = "RDS Postgres Security Group" + default = "RDS PostgreSQL Security Group" } variable "short_description" { description = "Security Group Short Description" type = string - default = "Postgres" + default = "PostgreSQL" } variable "enable_self" { @@ -39,10 +39,6 @@ variable "vpc_id" { type = string } -data "aws_vpc" "selected" { - id = "${var.vpc_id}" -} - variable "vpc_full_name" { description = "VPC Name" type = string diff --git a/rds-postgres/version.tf b/rds-postgres/version.tf index 84fd21a..fa2705b 100644 --- a/rds-postgres/version.tf +++ b/rds-postgres/version.tf @@ -1,5 +1,3 @@ -variable "_module_version" { - description = "Module version number" - type = string - default = "1.0" +locals { + _module_version = "1.0.0" } From 00e31f7240c9689ed995fefe54f723213245cdeb Mon Sep 17 00:00:00 2001 From: badra001 Date: Thu, 22 Apr 2021 15:26:27 -0400 Subject: [PATCH 5/5] change default name --- rds-postgres/README.md | 8 +++++--- rds-postgres/main.tf | 6 ++++-- rds-postgres/variables.tf | 2 +- 3 files changed, 10 insertions(+), 6 deletions(-) diff --git a/rds-postgres/README.md b/rds-postgres/README.md index db3f8c0..9cc7a1d 100644 --- a/rds-postgres/README.md +++ b/rds-postgres/README.md @@ -10,9 +10,11 @@ Default and auxilliary ports are included in this. They are opened to everything module "postgres" { source = "git@github.e.it.census.gov:terraform-modules/aws-common-security-groups.git//rds-postgres" - # name = "rds-postgres" vpc_id = var.vpc_id - # Name, CostAllocation, and Environment are pre-set, but they can be overriden + ## optional + # name = "m-postgres-db" + + ## tags for Name, CostAllocation, and Environment are pre-set, but they can be overriden # tags = { } } ``` @@ -52,7 +54,7 @@ No modules. | [enable\_self](#input\_enable\_self) | Enable\|Disable self full access | `bool` | `false` | no | | [ingress\_networks](#input\_ingress\_networks) | List of ingress networks for external access (not all ports) | `list(string)` |
[
"0.0.0.0/0"
]
| no | | [ingress\_security\_groups](#input\_ingress\_security\_groups) | List of ingress security groups for all ports | `list(string)` | `[]` | no | -| [name](#input\_name) | Security Group Name | `string` | `"rds-postgres"` | no | +| [name](#input\_name) | Security Group Name | `string` | `"m-postgres-db"` | no | | [short\_description](#input\_short\_description) | Security Group Short Description | `string` | `"PostgreSQL"` | no | | [tags](#input\_tags) | Extra security group tags | `map` |
{
"CostAllocation": "csvd:infrastructure",
"Environment": "csvd-infrastructure"
}
| no | | [use\_vpc\_cidr](#input\_use\_vpc\_cidr) | Enable\|Disable use of VPC CIDR block in the ingress\_networks | `bool` | `false` | no | diff --git a/rds-postgres/main.tf b/rds-postgres/main.tf index ff82f12..0e1cf60 100644 --- a/rds-postgres/main.tf +++ b/rds-postgres/main.tf @@ -11,9 +11,11 @@ * module "postgres" { * source = "git@github.e.it.census.gov:terraform-modules/aws-common-security-groups.git//rds-postgres" * -* # name = "rds-postgres" * vpc_id = var.vpc_id -* # Name, CostAllocation, and Environment are pre-set, but they can be overriden +* ## optional +* # name = "m-postgres-db" +* +* ## tags for Name, CostAllocation, and Environment are pre-set, but they can be overriden * # tags = { } * } * ``` diff --git a/rds-postgres/variables.tf b/rds-postgres/variables.tf index a28c2af..e216ce3 100644 --- a/rds-postgres/variables.tf +++ b/rds-postgres/variables.tf @@ -4,7 +4,7 @@ variable "name" { description = "Security Group Name" type = string - default = "rds-postgres" + default = "m-postgres-db" } variable "description" {