Skip to content

Commit

Permalink
add exmaple for rds-postgres
Browse files Browse the repository at this point in the history
  • Loading branch information
badra001 committed Dec 16, 2024
1 parent 49625ac commit d94bf7d
Show file tree
Hide file tree
Showing 3 changed files with 19 additions and 8 deletions.
11 changes: 11 additions & 0 deletions examples/rds-postgres/rds-postgres-security-group.tf
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
module "postgres" {
source = "git@github.e.it.census.gov:terraform-modules/aws-common-security-groups.git//rds-postgres?ref=tf-upgrade"

vpc_id = var.vpc_id
name = "my-rds-sg"
description = "My RDS Postgres SG"
ingress_prefix_list_names = ["rds-postgres.edl.project", "tableau.dev.adsd.project"]
ingress_networks = []
ingress_security_groups = []
tags = {}
}
14 changes: 7 additions & 7 deletions rds-postgres/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ Default and auxilliary ports are included in this. They are opened to everything

```hcl
module "postgres" {
source = "git@github.e.it.census.gov:terraform-modules/aws-common-security-groups.git//rds-postgres"
source = "git@github.e.it.census.gov:terraform-modules/aws-common-security-groups.git//rds-postgres?ref=tf-ugprade"
vpc_id = var.vpc_id
## optional
Expand Down Expand Up @@ -41,14 +41,14 @@ Postgres. This will fail if the prefix list does not exist.

| Name | Version |
|------|---------|
| <a name="requirement_terraform"></a> [terraform](#requirement\_terraform) | >= 0.13 |
| <a name="requirement_aws"></a> [aws](#requirement\_aws) | >= 3.66.0 |
| <a name="requirement_terraform"></a> [terraform](#requirement\_terraform) | >= 1.0.0 |
| <a name="requirement_aws"></a> [aws](#requirement\_aws) | >= 5.0 |

## Providers

| Name | Version |
|------|---------|
| <a name="provider_aws"></a> [aws](#provider\_aws) | >= 3.66.0 |
| <a name="provider_aws"></a> [aws](#provider\_aws) | >= 5.0 |

## Modules

Expand All @@ -70,16 +70,16 @@ No modules.
| Name | Description | Type | Default | Required |
|------|-------------|------|---------|:--------:|
| <a name="input_description"></a> [description](#input\_description) | Security Group Description | `string` | `"RDS PostgreSQL Security Group"` | no |
| <a name="input_egress_networks"></a> [egress\_networks](#input\_egress\_networks) | List of egress networks (all ports) | `list(string)` | <pre>[<br> "0.0.0.0/0"<br>]</pre> | no |
| <a name="input_egress_networks"></a> [egress\_networks](#input\_egress\_networks) | List of egress networks (all ports) | `list(string)` | <pre>[<br/> "0.0.0.0/0"<br/>]</pre> | no |
| <a name="input_egress_prefix_list_names"></a> [egress\_prefix\_list\_names](#input\_egress\_prefix\_list\_names) | List of prefix list names for eggress access | `list(string)` | `[]` | no |
| <a name="input_egress_security_groups"></a> [egress\_security\_groups](#input\_egress\_security\_groups) | List of egress security groups (all ports) | `list(string)` | `[]` | no |
| <a name="input_enable_self"></a> [enable\_self](#input\_enable\_self) | Enable\|Disable self full access | `bool` | `false` | no |
| <a name="input_ingress_networks"></a> [ingress\_networks](#input\_ingress\_networks) | List of ingress networks for external access (not all ports). Use null to disable built-in settings | `list(string)` | <pre>[<br> "0.0.0.0/0"<br>]</pre> | no |
| <a name="input_ingress_networks"></a> [ingress\_networks](#input\_ingress\_networks) | List of ingress networks for external access (not all ports). Use null to disable built-in settings | `list(string)` | <pre>[<br/> "0.0.0.0/0"<br/>]</pre> | no |
| <a name="input_ingress_prefix_list_names"></a> [ingress\_prefix\_list\_names](#input\_ingress\_prefix\_list\_names) | List of prefix list names for ingress access | `list(string)` | `[]` | no |
| <a name="input_ingress_security_groups"></a> [ingress\_security\_groups](#input\_ingress\_security\_groups) | List of ingress security groups for all ports | `list(string)` | `[]` | no |
| <a name="input_name"></a> [name](#input\_name) | Security Group Name | `string` | `"m-postgres-db"` | no |
| <a name="input_short_description"></a> [short\_description](#input\_short\_description) | Security Group Short Description | `string` | `"PostgreSQL"` | no |
| <a name="input_tags"></a> [tags](#input\_tags) | Extra security group tags | `map` | <pre>{<br> "CostAllocation": "csvd:infrastructure",<br> "Environment": "csvd-infrastructure"<br>}</pre> | no |
| <a name="input_tags"></a> [tags](#input\_tags) | Extra security group tags | `map` | <pre>{<br/> "CostAllocation": "csvd:infrastructure",<br/> "Environment": "csvd-infrastructure"<br/>}</pre> | no |
| <a name="input_use_vpc_cidr"></a> [use\_vpc\_cidr](#input\_use\_vpc\_cidr) | Enable\|Disable use of VPC CIDR block in the ingress\_networks | `bool` | `false` | no |
| <a name="input_vpc_full_name"></a> [vpc\_full\_name](#input\_vpc\_full\_name) | VPC Name | `string` | `""` | no |
| <a name="input_vpc_id"></a> [vpc\_id](#input\_vpc\_id) | VPC ID Number | `string` | n/a | yes |
Expand Down
2 changes: 1 addition & 1 deletion rds-postgres/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
*
* ```hcl
* module "postgres" {
* source = "git@github.e.it.census.gov:terraform-modules/aws-common-security-groups.git//rds-postgres"
* source = "git@github.e.it.census.gov:terraform-modules/aws-common-security-groups.git//rds-postgres?ref=tf-ugprade"
*
* vpc_id = var.vpc_id
* ## optional
Expand Down

0 comments on commit d94bf7d

Please sign in to comment.