I’m trying to create RDS with terraform, but how to enable the RDS proxy creation? There is an option in AWS console. But I don’t see any example about the option in terraform. Can anyone show me how?
Some examples:
module "final_snapshot_label" {
source = "cloudposse/label/null"
version = "0.25.0"
attributes = ["final", "snapshot"]
context = module.this.context
}
locals {
computed_major_engine_version = var.engine == "postgres" ? join(".", slice(split(".", var.engine_version), 0, 1)) : join(".", slice(split(".", var.engine_version), 0, 2))
major_engine_version = var.major_engine_version == "" ? local.computed_major_engine_version : var.major_engine_version
subnet_ids_provided = var.subnet_ids != null && length(var.subnet_ids) > 0
db_subnet_group_name_provided = var.db_subnet_group_name != null && var.db_subnet_group_name != ""
is_replica = try(length(var.replicate_source_db), 0) > 0
# Db Subnet group name should equal the name if provided
# we then check if this is a replica, if it is, and no name is provided, this should be null, see https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/db_instance#db_subnet_group_name
# finally, if no name is provided, and it is not a replica, we check if subnets were provided.
db_subnet_group_name = local.db_subnet_group_name_provided ? var.db_subnet_group_name : (
local.is_replica ? null : (
This file has been truncated. show original
But I could not find any option for RDS Proxy in these kind of code.