Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -86,6 +86,8 @@ aws ssm put-parameter --name "/rds/POSTGRES_DB_NAME" --value "value" --type "Sec
| <a name="input_multi_az"></a> [multi\_az](#input\_multi\_az) | Specifies if the RDS instance is multi-AZ | `bool` | `false` | no |
| <a name="input_performance_insights_enabled"></a> [performance\_insights\_enabled](#input\_performance\_insights\_enabled) | Whether to enable performance insights | `bool` | `true` | no |
| <a name="input_performance_insights_retention_period"></a> [performance\_insights\_retention\_period](#input\_performance\_insights\_retention\_period) | The retention period for performance insights | `number` | `7` | no |
| <a name="input_postgres_engine_version"></a> [postgres\_engine\_version](#input\_postgres\_engine\_version) | PostgreSQL engine version for the RDS instance (e.g., 15.4, 16.3). Defaults to latest supported. | `number` | `16.3` | no |
| <a name="input_postgres_major_engine_version"></a> [postgres\_major\_engine\_version](#input\_postgres\_major\_engine\_version) | Major PostgreSQL engine version (e.g., 15, 16). Used for parameter group family naming. | `number` | `16` | no |
| <a name="input_private_subnet_ids"></a> [private\_subnet\_ids](#input\_private\_subnet\_ids) | List of private subnet IDs for database and Kong ECS deployment | `list(string)` | n/a | yes |
| <a name="input_public_subnet_ids"></a> [public\_subnet\_ids](#input\_public\_subnet\_ids) | List of public subnet IDs for public-facing load balancers | `list(string)` | n/a | yes |
| <a name="input_rds_db_tags"></a> [rds\_db\_tags](#input\_rds\_db\_tags) | List of tags | `map(string)` | `{}` | no |
Expand Down
2 changes: 2 additions & 0 deletions examples/complete/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -88,6 +88,8 @@ No resources.
| <a name="input_multi_az"></a> [multi\_az](#input\_multi\_az) | Specifies if the RDS instance is multi-AZ | `bool` | n/a | yes |
| <a name="input_performance_insights_enabled"></a> [performance\_insights\_enabled](#input\_performance\_insights\_enabled) | Whether to enable performance insights | `bool` | n/a | yes |
| <a name="input_performance_insights_retention_period"></a> [performance\_insights\_retention\_period](#input\_performance\_insights\_retention\_period) | The retention period for performance insights | `number` | n/a | yes |
| <a name="input_postgres_engine_version"></a> [postgres\_engine\_version](#input\_postgres\_engine\_version) | The version of the Postgres engine | `number` | n/a | yes |
| <a name="input_postgres_major_engine_version"></a> [postgres\_major\_engine\_version](#input\_postgres\_major\_engine\_version) | The major version of the Postgres engine | `number` | n/a | yes |
| <a name="input_private_subnet_ids"></a> [private\_subnet\_ids](#input\_private\_subnet\_ids) | List of private subnet IDs | `list(string)` | n/a | yes |
| <a name="input_public_subnet_ids"></a> [public\_subnet\_ids](#input\_public\_subnet\_ids) | List of public subnet IDs | `list(string)` | n/a | yes |
| <a name="input_rds_db_tags"></a> [rds\_db\_tags](#input\_rds\_db\_tags) | List of tags | `map(string)` | n/a | yes |
Expand Down
2 changes: 2 additions & 0 deletions examples/complete/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -28,4 +28,6 @@ module "kong" {
memory_for_kong_task = var.memory_for_kong_task
desired_count_for_kong_service = var.desired_count_for_kong_service
force_new_deployment = var.force_new_deployment
postgres_engine_version = var.postgres_engine_version
postgres_major_engine_version = var.postgres_major_engine_version
}
10 changes: 10 additions & 0 deletions examples/complete/variables.tf
Original file line number Diff line number Diff line change
Expand Up @@ -122,3 +122,13 @@ variable "force_new_deployment" {
description = "Whether to force new deployment"
type = bool
}

variable "postgres_engine_version" {
description = "The version of the Postgres engine"
type = number
}

variable "postgres_major_engine_version" {
description = "The major version of the Postgres engine"
type = number
}
19 changes: 10 additions & 9 deletions locals.tf
Original file line number Diff line number Diff line change
Expand Up @@ -14,15 +14,16 @@ locals {
engine = "postgres"
storage_encrypted = true
storage_type = "gp3"
engine_version = 16.3
engine_family = "postgres16"
major_engine_version = 16
port = 5432
sg_name = "kong-postgres"
sg_description = "Allow all traffic within vpc"
postgres_username = data.aws_ssm_parameter.rds["POSTGRES_USERNAME"].value
postgres_password = data.aws_ssm_parameter.rds["POSTGRES_PASSWORD"].value
postgres_db_name = data.aws_ssm_parameter.rds["POSTGRES_DB_NAME"].value
engine_version = var.postgres_engine_version
engine_family = "postgres${var.postgres_major_engine_version}"
major_engine_version = var.postgres_major_engine_version

port = 5432
sg_name = "kong-postgres"
sg_description = "Allow all traffic within vpc"
postgres_username = data.aws_ssm_parameter.rds["POSTGRES_USERNAME"].value
postgres_password = data.aws_ssm_parameter.rds["POSTGRES_PASSWORD"].value
postgres_db_name = data.aws_ssm_parameter.rds["POSTGRES_DB_NAME"].value
}

ecs = {
Expand Down
20 changes: 20 additions & 0 deletions variables.tf
Original file line number Diff line number Diff line change
Expand Up @@ -161,3 +161,23 @@ variable "force_new_deployment" {
type = bool
default = true
}

variable "postgres_engine_version" {
description = "PostgreSQL engine version for the RDS instance (e.g., 15.4, 16.3). Defaults to latest supported."
type = number
default = 16.3
validation {
condition = var.postgres_engine_version >= 16
error_message = "The PostgreSQL engine version must be 16 or higher."
}
}

variable "postgres_major_engine_version" {
description = "Major PostgreSQL engine version (e.g., 15, 16). Used for parameter group family naming."
type = number
default = 16
validation {
condition = var.postgres_major_engine_version >= 16
error_message = "The major PostgreSQL engine version must be 16 or higher."
}
}