From 19847020da6da51478baace657ff5852b34f1711 Mon Sep 17 00:00:00 2001 From: daniosim Date: Tue, 22 Sep 2020 10:50:29 -0400 Subject: [PATCH 1/2] DEV-14276 Make READMEs consistent. --- README.md | 30 +++++++++++++++++------------- modules/rds-postgres-sg/README.md | 27 ++++++++++++++------------- versions.tf | 1 - 3 files changed, 31 insertions(+), 27 deletions(-) diff --git a/README.md b/README.md index a5ed4de..4c351ea 100644 --- a/README.md +++ b/README.md @@ -7,26 +7,29 @@ This repo follows the [terraform standard module structure](https://www.terrafor Inline example implementation of the module. This is the most basic example of what it would look like to use this module. ``` module "rds_postgres" { - source = "git::https://github.com/Datatamer/terraform-aws-rds-postgres.git?ref=0.3.0" - postgres_name = "example_rds_postgres" - parameter_group_name = "example-rds-postgres-pg" - identifier_prefix = "example-rds-" - username = "exampleUsername" - password = "examplePassword" + source = "git::https://github.com/Datatamer/terraform-aws-rds-postgres.git?ref=0.3.0" + postgres_name = "example_rds_postgres" + parameter_group_name = "example-rds-postgres-pg" + identifier_prefix = "example-rds-" + username = "exampleUsername" + password = "examplePassword" - subnet_group_name = "example_subnet" - rds_subnet_ids = ["example-subnet-1", "example-subnet-2"] - spark_cluster_sg_ids = ["sg-examplesecuritygroup1", "sg-examplesecuritygroup2"] - tamr_vm_sg_id = "sg-exampletamrsecuritygroup" - vpc_id = "vpc-examplevpcnetworkid" + subnet_group_name = "example_subnet" + rds_subnet_ids = ["example-subnet-1", "example-subnet-2"] + spark_cluster_sg_ids = ["sg-examplesecuritygroup1", "sg-examplesecuritygroup2"] + tamr_vm_sg_id = "sg-exampletamrsecuritygroup" + vpc_id = "vpc-examplevpcnetworkid" } ``` +## Minimal +Smallest complete fully working example. This example might require extra resources to run the example. +- [Minimal](https://github.com/Datatamer/terraform-aws-rds-postgres/tree/master/examples/minimal) # Resources Created This terraform module will create: * an AWS RDS Postgres instance -* database parameter group -* A security group for the rds instance +* a database parameter group +* a security group for the rds instance ## Requirements @@ -90,6 +93,7 @@ This terraform module will create: ## Releasing new versions * Updated version contained in `VERSION` * Documented changes in `CHANGELOG.md` +* Create a tag in github for the commit associated with the version # License Apache 2 Licensed. See LICENSE for full details. diff --git a/modules/rds-postgres-sg/README.md b/modules/rds-postgres-sg/README.md index 337ead8..f0ea4dc 100644 --- a/modules/rds-postgres-sg/README.md +++ b/modules/rds-postgres-sg/README.md @@ -4,19 +4,26 @@ This terraform module creates the security group and the security group rules fo # Example ``` module "rds_sg" { - source = "./modules/rds-postgres-sg" - spark_cluster_sg_ids = ["sg-examplesparksecuritygroup1", "sg-examplesparksecuritygroup2"] - tamr_vm_sg_id = "sg-exampletamrvmsecuritygroup" - vpc_id = "vpc-examplevpcid" - security_group_name = "examplerdssecuritygroup" - additional_cidrs = ["1.2.3.4/32"] + source = "git::https://github.com/Datatamer/terraform-aws-rds-postgres.git//modules/rds-postgres-sg?ref=0.3.0" + spark_cluster_sg_ids = ["sg-examplesparksecuritygroup1", "sg-examplesparksecuritygroup2"] + tamr_vm_sg_id = "sg-exampletamrvmsecuritygroup" + vpc_id = "vpc-examplevpcid" + security_group_name = "examplerdssecuritygroup" + additional_cidrs = ["1.2.3.4/32"] } ``` +# Resources Created +This terraform module will create: +* a security group for the RDS instance +* security group rules if additional CIDRs are provided + ## Requirements -No requirements. +| Name | Version | +|------|---------| +| terraform | >= 0.12 | ## Providers @@ -42,9 +49,3 @@ No requirements. | rds\_sg\_id | n/a | - -# AWS Resources created -This terraform module creates 1 Security Group: -* A security group for the RDS instance - -This terraform module also creates Security Group Rules. The number of Security Group rules vary depending on the additional CIDRs provided. diff --git a/versions.tf b/versions.tf index ac97c6a..d9b6f79 100644 --- a/versions.tf +++ b/versions.tf @@ -1,4 +1,3 @@ - terraform { required_version = ">= 0.12" } From a16afd1d425566e7598e4d2e240ea52e35f9ed1f Mon Sep 17 00:00:00 2001 From: daniosim Date: Tue, 22 Sep 2020 16:19:49 -0400 Subject: [PATCH 2/2] DEV-14294 Add required_providers. --- README.md | 7 ++++--- modules/rds-postgres-sg/README.md | 3 ++- modules/rds-postgres-sg/versions.tf | 6 ++++++ versions.tf | 3 +++ 4 files changed, 15 insertions(+), 4 deletions(-) create mode 100644 modules/rds-postgres-sg/versions.tf diff --git a/README.md b/README.md index 4c351ea..13ce6e5 100644 --- a/README.md +++ b/README.md @@ -37,23 +37,24 @@ This terraform module will create: | Name | Version | |------|---------| | terraform | >= 0.12 | +| aws | >= 2.45.0 | ## Providers | Name | Version | |------|---------| -| aws | n/a | +| aws | >= 2.45.0 | ## Inputs | Name | Description | Type | Default | Required | |------|-------------|------|---------|:--------:| | password | The postgres password | `string` | n/a | yes | +| rds\_subnet\_ids | VPC subnet IDs in subnet group | `list(string)` | n/a | yes | | spark\_cluster\_sg\_ids | Security group is attached to the ec2 instances of EMR Spark | `list(string)` | n/a | yes | +| subnet\_group\_name | The name of the subnet group to add the RDS instance to | `string` | n/a | yes | | tamr\_vm\_sg\_id | Security group id attached to the tamr vm | `string` | n/a | yes | | vpc\_id | VPC ID for the rds security group | `string` | n/a | yes | -| subnet\_group\_name | The name of the subnet group to add the RDS instance to | `string` | n/a | yes | -| rds\_subnet\_ids | List of subnet IDs to add to subnet group | `list(string)` | n/a | yes | | additional\_cidrs | Additional CIDR to connect to RDS Postgres instance | `list(string)` | `[]` | no | | additional\_tags | Additional tags to set on the RDS instance | `map` | `{}` | no | | allocated\_storage | Allocate storage | `number` | `20` | no | diff --git a/modules/rds-postgres-sg/README.md b/modules/rds-postgres-sg/README.md index f0ea4dc..96247d7 100644 --- a/modules/rds-postgres-sg/README.md +++ b/modules/rds-postgres-sg/README.md @@ -24,12 +24,13 @@ This terraform module will create: | Name | Version | |------|---------| | terraform | >= 0.12 | +| aws | >= 2.45.0 | ## Providers | Name | Version | |------|---------| -| aws | n/a | +| aws | >= 2.45.0 | ## Inputs diff --git a/modules/rds-postgres-sg/versions.tf b/modules/rds-postgres-sg/versions.tf new file mode 100644 index 0000000..86921ea --- /dev/null +++ b/modules/rds-postgres-sg/versions.tf @@ -0,0 +1,6 @@ +terraform { + required_version = ">= 0.12" + required_providers { + aws = ">= 2.45.0" + } +} diff --git a/versions.tf b/versions.tf index d9b6f79..86921ea 100644 --- a/versions.tf +++ b/versions.tf @@ -1,3 +1,6 @@ terraform { required_version = ">= 0.12" + required_providers { + aws = ">= 2.45.0" + } }