output "publicly_accessible" {
  value       = var.publicly_accessible
  description = "Indicates if the RDS instance is publicly accessible"
}

output "full_name" {
  value       = var.name
  description = "The full name of the RDS instance"
}

output "azs" {
  value       = local.azs
  description = "The availability zones used for the RDS instance"
}

output "password_secret_arn" {
  value       = local.password_secret_arn
  description = "The ARN of the RDS password secret arn"
}
output "password_secret_name" {
  value       = local.password_secret_name
  description = "The ARN of the RDS password secret name"
}

output "endpoint" {
  value       = local.db_instance.endpoint
  description = "The endpoint of the RDS instance"
}

output "rcfg_arn" {
  value       = local.use_vpc_resource_gateway ? aws_vpclattice_resource_configuration.this[0].arn : null
  description = "The ARN of the VPC Lattice resource configuration"
}

output "proxy_name" {
  value       = local.use_rds_proxy ? aws_db_proxy.this[0].name : null
  description = "The rds proxy name"
}
output "proxy_service" {
  value       = local.use_rds_proxy ? aws_vpc_endpoint_service.rds_proxy[0].service_name : null
  description = "The service name of the RDS Proxy VPC Endpoint Service"
}
