Overview
Follow the steps below to provision (or integrate with existing) an RDS instance with a PrivateLink endpoint in AWS for Control Plane connectivity.Create using Control Plane Terraform
Modes
- Create New Infrastructure (default)
- RDS, Secret Manager Secret and VPC infrastructure will be created along with networking resources.
- Existing Infrastructure
- Uses your preexisting RDS, Secret Manager Secret and VPC infrastructure to create networking resources.
- To use this mode, you must provide your RDS ARN and Secret Manager Secret ARN.
What’s Created
Using Create Infrastructure Mode:
Using Create Infrastructure Mode:
- VPC & Subnets
- RDS PostgreSQL Instance (multi-AZ)
- Secrets Manager (secure credential storage)
- RDS Proxy (connection pooling and failover)
- Network Load Balancer
- Lambda Function (dynamic IP updates)
- PrivateLink Endpoint Service
Using Existing Infrastructure Mode:
Using Existing Infrastructure Mode:
- RDS Proxy (connection pooling and failover)
- Network Load Balancer
- Lambda Function (dynamic IP updates)
- PrivateLink Endpoint Service
Prerequisites
Software Requirements: AWS Account Requirements:- Amazon Web Service (AWS) account with billing enabled.
- AWS IAM User/Role with appropriate permissions (VPC, RDS, Lambda, NLB, Secrets Manager, IAM, CloudWatch, etc.).
- Deploy resources in the same region as your Control Plane workload.
- VPC, subnets, and RDS infrastructure already created and available.
- Create Secrets Manager Secret with database credentials in the following JSON format.
- Your RDS instance’s security group must allow inbound PostgreSQL traffic (port 5432) from the VPC CIDR, so the RDS Proxy created by the Terraform can reach the database.
Step 1 - Clone Control Plane Terraform
- This repository contains Terraform modules for provisioning AWS infrastructure that integrates with Control Plane via PrivateLink.
Step 2 - Create Configuration File
- Create a
terraform.tfvarsfile in the root of the cloned repository. - For using Create New Infrastructure mode:
terraform.tfvars
- For using Existing Infrastructure mode:
terraform.tfvars
Step 3 - Deploy Infrastructure
- Run the Terraform with your configuration:
- The Terraform will automatically provision all necessary resources and output your PrivateLink endpoint service name.
If
terraform apply fails with Cannot find version X for postgres, AWS has retired that PostgreSQL minor version. Set the rds_engine_version variable to a currently offered version (list them with aws rds describe-db-engine-versions --engine postgres --query 'DBEngineVersions[].EngineVersion').- For more information, refer to the repository README
Next Steps
- Contact support@controlplane.com with your service name and region.
- Control Plane will use this to create the consumer-side endpoint connection.
- No manual acceptance is required: the endpoint service is created with automatic acceptance enabled and only allows connections from Control Plane’s AWS account (the
allowed_principal_arnvariable). - Proceed to follow the Native Networking Setup in Control Plane.
Connecting to the Database
- TLS is required. The RDS Proxy is configured with
require_tls, so clients must connect with SSL enabled (e.g.,sslmode=requirefor PostgreSQL clients). - Authenticate using the database username and password stored in the Secrets Manager Secret.
- Connect to the PrivateLink endpoint on port
5432.