Configure a hybrid bridge
You can create a hybrid bridge to connect a managed service to your VPC (Virtual Private Cloud) using Terraform.
Before you begin
To carry out the actions presented below, you must have:
- A Numspot account
- Terraform ↗ installed
The managed service must be created with visibility = "INTERNAL" to be compatible with a hybrid bridge.
Create and deploy Numspot resources using Terraform
To get started, first create the configuration file ↗.
You must then create the following resources:
- VPC;
- PostgreSQL cluster;
hybrid bridge.
Add the following blocks:
resource "numspot_vpc" "vpc" {
ip_range = "10.0.0.0/16"
}
resource "numspot_postgres_cluster" "postgres" {
name = "my-postgres"
user = "admin"
visibility = "INTERNAL"
node_configuration = {
vcpu_count = 2
memory_size_gi_b = 2
}
volume = {
type = "PERFORMANCE"
size_gi_b = 10
}
}
resource "numspot_hybrid_bridge" "hybrid-bridge" {
managed_service_id = numspot_postgres_cluster.postgres.id
vpc_id = numspot_vpc.vpc.id
}
The accepted values for volume.type (ENTERPRISE, PERFORMANCE, MAGNETIC) and the range of memory_size_gi_b (1 to 15 GiB) are defined by the Numspot API. If the Numspot Terraform provider you are using rejects these values at plan time, update it to the latest version available on the HashiCorp registry ↗.
Your configuration is now ready to be deployed on the Numspot infrastructure ↗.
Permissions
This action requires the following IAM (Identity and Access Management) permissions:
- connectivity.bridge.create