diff --git a/rds-oracle/README.md b/rds-oracle/README.md index 166ad83..fa356e6 100644 --- a/rds-oracle/README.md +++ b/rds-oracle/README.md @@ -45,10 +45,11 @@ No modules. | Name | Description | Type | Default | Required | |------|-------------|------|---------|:--------:| -| [description](#input\_description) | Security group description | `string` | `"module: Oracle common ports"` | no | +| [description](#input\_description) | Security Group Description | `string` | `"module: Oracle common ports"` | no | | [egress\_networks](#input\_egress\_networks) | List of egress networks (all ports) | `list(string)` |
[
"0.0.0.0/0"
]
| no | | [name](#input\_name) | Security group Name | `string` | `"m-oracle-db"` | no | | [networks](#input\_networks) | List of ingress networks (applies to all ports) | `list(string)` |
[
"0.0.0.0/0"
]
| no | +| [short\_description](#input\_short\_description) | Security Group Short Description | `string` | `"Oracle"` | no | | [tags](#input\_tags) | Extra security group tags | `map` |
{
"CostAllocation": "csvd:infrastructure",
"Environment": "csvd-infrastructure"
}
| no | | [vpc\_full\_name](#input\_vpc\_full\_name) | VPC Name | `string` | `""` | no | | [vpc\_id](#input\_vpc\_id) | VPC ID Number | `string` | n/a | yes | diff --git a/rds-oracle/main.tf b/rds-oracle/main.tf index 39944cb..cb80bf5 100644 --- a/rds-oracle/main.tf +++ b/rds-oracle/main.tf @@ -22,16 +22,17 @@ */ resource "aws_security_group" "this_security_group" { - name = local.name - description = local.description - vpc_id = var.vpc_id + name = local.name + description = local.description + short_description = var.short_description == "" ? var.description : var.short_description + vpc_id = var.vpc_id # portlist dynamic "ingress" { for_each = local.ports_map 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"] @@ -40,7 +41,7 @@ resource "aws_security_group" "this_security_group" { } egress { - description = "${local.description}: All" + description = "${local.short_description}: All" from_port = 0 to_port = 0 protocol = -1 diff --git a/rds-oracle/variables.tf b/rds-oracle/variables.tf index 2f63f01..d17440a 100644 --- a/rds-oracle/variables.tf +++ b/rds-oracle/variables.tf @@ -17,11 +17,17 @@ variable "name" { } variable "description" { - description = "Security group description" + description = "Security Group Description" type = string default = "module: Oracle common ports" } +variable "short_description" { + description = "Security Group Short Description" + type = string + default = "Oracle" +} + variable "networks" { description = "List of ingress networks (applies to all ports)" type = list(string) @@ -42,3 +48,4 @@ variable "tags" { "Environment" = "csvd-infrastructure" } } +