published on Friday, May 22, 2026 by Pulumi
published on Friday, May 22, 2026 by Pulumi
The PrivateConnection resource is used to establish private connectivity between Database Migration Service and a customer’s network.
To get more information about PrivateConnection, see:
- API documentation
- How-to Guides
Example Usage
Database Migration Service Private Connection
import * as pulumi from "@pulumi/pulumi";
import * as gcp from "@pulumi/gcp";
const _default = new gcp.databasemigrationservice.PrivateConnection("default", {
displayName: "dbms_pc",
location: "us-central1",
privateConnectionId: "my-connection",
labels: {
key: "value",
},
vpcPeeringConfig: {
vpcName: googleComputeNetwork["default"].id,
subnet: "10.0.0.0/29",
},
createWithoutValidation: false,
});
const defaultNetwork = new gcp.compute.Network("default", {
name: "my-network",
autoCreateSubnetworks: false,
});
import pulumi
import pulumi_gcp as gcp
default = gcp.databasemigrationservice.PrivateConnection("default",
display_name="dbms_pc",
location="us-central1",
private_connection_id="my-connection",
labels={
"key": "value",
},
vpc_peering_config={
"vpc_name": google_compute_network["default"]["id"],
"subnet": "10.0.0.0/29",
},
create_without_validation=False)
default_network = gcp.compute.Network("default",
name="my-network",
auto_create_subnetworks=False)
package main
import (
"github.com/pulumi/pulumi-gcp/sdk/v9/go/gcp/compute"
"github.com/pulumi/pulumi-gcp/sdk/v9/go/gcp/databasemigrationservice"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
_, err := databasemigrationservice.NewPrivateConnection(ctx, "default", &databasemigrationservice.PrivateConnectionArgs{
DisplayName: pulumi.String("dbms_pc"),
Location: pulumi.String("us-central1"),
PrivateConnectionId: pulumi.String("my-connection"),
Labels: pulumi.StringMap{
"key": pulumi.String("value"),
},
VpcPeeringConfig: &databasemigrationservice.PrivateConnectionVpcPeeringConfigArgs{
VpcName: pulumi.Any(googleComputeNetwork.Default.Id),
Subnet: pulumi.String("10.0.0.0/29"),
},
CreateWithoutValidation: pulumi.Bool(false),
})
if err != nil {
return err
}
_, err = compute.NewNetwork(ctx, "default", &compute.NetworkArgs{
Name: pulumi.String("my-network"),
AutoCreateSubnetworks: pulumi.Bool(false),
})
if err != nil {
return err
}
return nil
})
}
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Gcp = Pulumi.Gcp;
return await Deployment.RunAsync(() =>
{
var @default = new Gcp.DatabaseMigrationService.PrivateConnection("default", new()
{
DisplayName = "dbms_pc",
Location = "us-central1",
PrivateConnectionId = "my-connection",
Labels =
{
{ "key", "value" },
},
VpcPeeringConfig = new Gcp.DatabaseMigrationService.Inputs.PrivateConnectionVpcPeeringConfigArgs
{
VpcName = googleComputeNetwork.Default.Id,
Subnet = "10.0.0.0/29",
},
CreateWithoutValidation = false,
});
var defaultNetwork = new Gcp.Compute.Network("default", new()
{
Name = "my-network",
AutoCreateSubnetworks = false,
});
});
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.gcp.databasemigrationservice.PrivateConnection;
import com.pulumi.gcp.databasemigrationservice.PrivateConnectionArgs;
import com.pulumi.gcp.databasemigrationservice.inputs.PrivateConnectionVpcPeeringConfigArgs;
import com.pulumi.gcp.compute.Network;
import com.pulumi.gcp.compute.NetworkArgs;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.Map;
import java.io.File;
import java.nio.file.Files;
import java.nio.file.Paths;
public class App {
public static void main(String[] args) {
Pulumi.run(App::stack);
}
public static void stack(Context ctx) {
var default_ = new PrivateConnection("default", PrivateConnectionArgs.builder()
.displayName("dbms_pc")
.location("us-central1")
.privateConnectionId("my-connection")
.labels(Map.of("key", "value"))
.vpcPeeringConfig(PrivateConnectionVpcPeeringConfigArgs.builder()
.vpcName(googleComputeNetwork.default().id())
.subnet("10.0.0.0/29")
.build())
.createWithoutValidation(false)
.build());
var defaultNetwork = new Network("defaultNetwork", NetworkArgs.builder()
.name("my-network")
.autoCreateSubnetworks(false)
.build());
}
}
resources:
default:
type: gcp:databasemigrationservice:PrivateConnection
properties:
displayName: dbms_pc
location: us-central1
privateConnectionId: my-connection
labels:
key: value
vpcPeeringConfig:
vpcName: ${googleComputeNetwork.default.id}
subnet: 10.0.0.0/29
createWithoutValidation: false
defaultNetwork:
type: gcp:compute:Network
name: default
properties:
name: my-network
autoCreateSubnetworks: false
Example coming soon!
Database Migration Service Private Connection Psc
import * as pulumi from "@pulumi/pulumi";
import * as gcp from "@pulumi/gcp";
const _default = new gcp.databasemigrationservice.PrivateConnection("default", {
displayName: "dbms_pc",
location: "us-central1",
privateConnectionId: "my-connection",
labels: {
key: "value",
},
pscInterfaceConfig: {
networkAttachment: googleComputeNetworkAttachment["default"].id,
},
createWithoutValidation: false,
});
const defaultNetworkAttachment = new gcp.compute.NetworkAttachment("default", {
name: "my-attachment",
region: "us-central1",
connectionPreference: "ACCEPT_AUTOMATIC",
subnetworks: [googleComputeSubnetwork["default"].id],
});
const defaultNetwork = new gcp.compute.Network("default", {
name: "my-network",
autoCreateSubnetworks: false,
});
const defaultSubnetwork = new gcp.compute.Subnetwork("default", {
name: "my-subnetwork",
ipCidrRange: "10.0.0.0/16",
region: "us-central1",
network: defaultNetwork.id,
});
import pulumi
import pulumi_gcp as gcp
default = gcp.databasemigrationservice.PrivateConnection("default",
display_name="dbms_pc",
location="us-central1",
private_connection_id="my-connection",
labels={
"key": "value",
},
psc_interface_config={
"network_attachment": google_compute_network_attachment["default"]["id"],
},
create_without_validation=False)
default_network_attachment = gcp.compute.NetworkAttachment("default",
name="my-attachment",
region="us-central1",
connection_preference="ACCEPT_AUTOMATIC",
subnetworks=[google_compute_subnetwork["default"]["id"]])
default_network = gcp.compute.Network("default",
name="my-network",
auto_create_subnetworks=False)
default_subnetwork = gcp.compute.Subnetwork("default",
name="my-subnetwork",
ip_cidr_range="10.0.0.0/16",
region="us-central1",
network=default_network.id)
package main
import (
"github.com/pulumi/pulumi-gcp/sdk/v9/go/gcp/compute"
"github.com/pulumi/pulumi-gcp/sdk/v9/go/gcp/databasemigrationservice"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
_, err := databasemigrationservice.NewPrivateConnection(ctx, "default", &databasemigrationservice.PrivateConnectionArgs{
DisplayName: pulumi.String("dbms_pc"),
Location: pulumi.String("us-central1"),
PrivateConnectionId: pulumi.String("my-connection"),
Labels: pulumi.StringMap{
"key": pulumi.String("value"),
},
PscInterfaceConfig: &databasemigrationservice.PrivateConnectionPscInterfaceConfigArgs{
NetworkAttachment: pulumi.Any(googleComputeNetworkAttachment.Default.Id),
},
CreateWithoutValidation: pulumi.Bool(false),
})
if err != nil {
return err
}
_, err = compute.NewNetworkAttachment(ctx, "default", &compute.NetworkAttachmentArgs{
Name: pulumi.String("my-attachment"),
Region: pulumi.String("us-central1"),
ConnectionPreference: pulumi.String("ACCEPT_AUTOMATIC"),
Subnetworks: pulumi.StringArray{
googleComputeSubnetwork.Default.Id,
},
})
if err != nil {
return err
}
defaultNetwork, err := compute.NewNetwork(ctx, "default", &compute.NetworkArgs{
Name: pulumi.String("my-network"),
AutoCreateSubnetworks: pulumi.Bool(false),
})
if err != nil {
return err
}
_, err = compute.NewSubnetwork(ctx, "default", &compute.SubnetworkArgs{
Name: pulumi.String("my-subnetwork"),
IpCidrRange: pulumi.String("10.0.0.0/16"),
Region: pulumi.String("us-central1"),
Network: defaultNetwork.ID(),
})
if err != nil {
return err
}
return nil
})
}
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Gcp = Pulumi.Gcp;
return await Deployment.RunAsync(() =>
{
var @default = new Gcp.DatabaseMigrationService.PrivateConnection("default", new()
{
DisplayName = "dbms_pc",
Location = "us-central1",
PrivateConnectionId = "my-connection",
Labels =
{
{ "key", "value" },
},
PscInterfaceConfig = new Gcp.DatabaseMigrationService.Inputs.PrivateConnectionPscInterfaceConfigArgs
{
NetworkAttachment = googleComputeNetworkAttachment.Default.Id,
},
CreateWithoutValidation = false,
});
var defaultNetworkAttachment = new Gcp.Compute.NetworkAttachment("default", new()
{
Name = "my-attachment",
Region = "us-central1",
ConnectionPreference = "ACCEPT_AUTOMATIC",
Subnetworks = new[]
{
googleComputeSubnetwork.Default.Id,
},
});
var defaultNetwork = new Gcp.Compute.Network("default", new()
{
Name = "my-network",
AutoCreateSubnetworks = false,
});
var defaultSubnetwork = new Gcp.Compute.Subnetwork("default", new()
{
Name = "my-subnetwork",
IpCidrRange = "10.0.0.0/16",
Region = "us-central1",
Network = defaultNetwork.Id,
});
});
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.gcp.databasemigrationservice.PrivateConnection;
import com.pulumi.gcp.databasemigrationservice.PrivateConnectionArgs;
import com.pulumi.gcp.databasemigrationservice.inputs.PrivateConnectionPscInterfaceConfigArgs;
import com.pulumi.gcp.compute.NetworkAttachment;
import com.pulumi.gcp.compute.NetworkAttachmentArgs;
import com.pulumi.gcp.compute.Network;
import com.pulumi.gcp.compute.NetworkArgs;
import com.pulumi.gcp.compute.Subnetwork;
import com.pulumi.gcp.compute.SubnetworkArgs;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.Map;
import java.io.File;
import java.nio.file.Files;
import java.nio.file.Paths;
public class App {
public static void main(String[] args) {
Pulumi.run(App::stack);
}
public static void stack(Context ctx) {
var default_ = new PrivateConnection("default", PrivateConnectionArgs.builder()
.displayName("dbms_pc")
.location("us-central1")
.privateConnectionId("my-connection")
.labels(Map.of("key", "value"))
.pscInterfaceConfig(PrivateConnectionPscInterfaceConfigArgs.builder()
.networkAttachment(googleComputeNetworkAttachment.default().id())
.build())
.createWithoutValidation(false)
.build());
var defaultNetworkAttachment = new NetworkAttachment("defaultNetworkAttachment", NetworkAttachmentArgs.builder()
.name("my-attachment")
.region("us-central1")
.connectionPreference("ACCEPT_AUTOMATIC")
.subnetworks(googleComputeSubnetwork.default().id())
.build());
var defaultNetwork = new Network("defaultNetwork", NetworkArgs.builder()
.name("my-network")
.autoCreateSubnetworks(false)
.build());
var defaultSubnetwork = new Subnetwork("defaultSubnetwork", SubnetworkArgs.builder()
.name("my-subnetwork")
.ipCidrRange("10.0.0.0/16")
.region("us-central1")
.network(defaultNetwork.id())
.build());
}
}
resources:
default:
type: gcp:databasemigrationservice:PrivateConnection
properties:
displayName: dbms_pc
location: us-central1
privateConnectionId: my-connection
labels:
key: value
pscInterfaceConfig:
networkAttachment: ${googleComputeNetworkAttachment.default.id}
createWithoutValidation: false
defaultNetworkAttachment:
type: gcp:compute:NetworkAttachment
name: default
properties:
name: my-attachment
region: us-central1
connectionPreference: ACCEPT_AUTOMATIC
subnetworks:
- ${googleComputeSubnetwork.default.id}
defaultNetwork:
type: gcp:compute:Network
name: default
properties:
name: my-network
autoCreateSubnetworks: false
defaultSubnetwork:
type: gcp:compute:Subnetwork
name: default
properties:
name: my-subnetwork
ipCidrRange: 10.0.0.0/16
region: us-central1
network: ${defaultNetwork.id}
Example coming soon!
Create PrivateConnection Resource
Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.
Constructor syntax
new PrivateConnection(name: string, args: PrivateConnectionArgs, opts?: CustomResourceOptions);@overload
def PrivateConnection(resource_name: str,
args: PrivateConnectionArgs,
opts: Optional[ResourceOptions] = None)
@overload
def PrivateConnection(resource_name: str,
opts: Optional[ResourceOptions] = None,
location: Optional[str] = None,
private_connection_id: Optional[str] = None,
create_without_validation: Optional[bool] = None,
deletion_policy: Optional[str] = None,
display_name: Optional[str] = None,
labels: Optional[Mapping[str, str]] = None,
project: Optional[str] = None,
psc_interface_config: Optional[PrivateConnectionPscInterfaceConfigArgs] = None,
vpc_peering_config: Optional[PrivateConnectionVpcPeeringConfigArgs] = None)func NewPrivateConnection(ctx *Context, name string, args PrivateConnectionArgs, opts ...ResourceOption) (*PrivateConnection, error)public PrivateConnection(string name, PrivateConnectionArgs args, CustomResourceOptions? opts = null)
public PrivateConnection(String name, PrivateConnectionArgs args)
public PrivateConnection(String name, PrivateConnectionArgs args, CustomResourceOptions options)
type: gcp:databasemigrationservice:PrivateConnection
properties: # The arguments to resource properties.
options: # Bag of options to control resource's behavior.
resource "gcp_databasemigrationservice_privateconnection" "name" {
# resource properties
}Parameters
- name string
- The unique name of the resource.
- args PrivateConnectionArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- resource_name str
- The unique name of the resource.
- args PrivateConnectionArgs
- The arguments to resource properties.
- opts ResourceOptions
- Bag of options to control resource's behavior.
- ctx Context
- Context object for the current deployment.
- name string
- The unique name of the resource.
- args PrivateConnectionArgs
- The arguments to resource properties.
- opts ResourceOption
- Bag of options to control resource's behavior.
- name string
- The unique name of the resource.
- args PrivateConnectionArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- name String
- The unique name of the resource.
- args PrivateConnectionArgs
- The arguments to resource properties.
- options CustomResourceOptions
- Bag of options to control resource's behavior.
Constructor example
The following reference example uses placeholder values for all input properties.
var privateConnectionResource = new Gcp.DatabaseMigrationService.PrivateConnection("privateConnectionResource", new()
{
Location = "string",
PrivateConnectionId = "string",
CreateWithoutValidation = false,
DeletionPolicy = "string",
DisplayName = "string",
Labels =
{
{ "string", "string" },
},
Project = "string",
PscInterfaceConfig = new Gcp.DatabaseMigrationService.Inputs.PrivateConnectionPscInterfaceConfigArgs
{
NetworkAttachment = "string",
},
VpcPeeringConfig = new Gcp.DatabaseMigrationService.Inputs.PrivateConnectionVpcPeeringConfigArgs
{
Subnet = "string",
VpcName = "string",
},
});
example, err := databasemigrationservice.NewPrivateConnection(ctx, "privateConnectionResource", &databasemigrationservice.PrivateConnectionArgs{
Location: pulumi.String("string"),
PrivateConnectionId: pulumi.String("string"),
CreateWithoutValidation: pulumi.Bool(false),
DeletionPolicy: pulumi.String("string"),
DisplayName: pulumi.String("string"),
Labels: pulumi.StringMap{
"string": pulumi.String("string"),
},
Project: pulumi.String("string"),
PscInterfaceConfig: &databasemigrationservice.PrivateConnectionPscInterfaceConfigArgs{
NetworkAttachment: pulumi.String("string"),
},
VpcPeeringConfig: &databasemigrationservice.PrivateConnectionVpcPeeringConfigArgs{
Subnet: pulumi.String("string"),
VpcName: pulumi.String("string"),
},
})
resource "gcp_databasemigrationservice_privateconnection" "privateConnectionResource" {
location = "string"
private_connection_id = "string"
create_without_validation = false
deletion_policy = "string"
display_name = "string"
labels = {
"string" = "string"
}
project = "string"
psc_interface_config = {
network_attachment = "string"
}
vpc_peering_config = {
subnet = "string"
vpc_name = "string"
}
}
var privateConnectionResource = new com.pulumi.gcp.databasemigrationservice.PrivateConnection("privateConnectionResource", com.pulumi.gcp.databasemigrationservice.PrivateConnectionArgs.builder()
.location("string")
.privateConnectionId("string")
.createWithoutValidation(false)
.deletionPolicy("string")
.displayName("string")
.labels(Map.of("string", "string"))
.project("string")
.pscInterfaceConfig(PrivateConnectionPscInterfaceConfigArgs.builder()
.networkAttachment("string")
.build())
.vpcPeeringConfig(PrivateConnectionVpcPeeringConfigArgs.builder()
.subnet("string")
.vpcName("string")
.build())
.build());
private_connection_resource = gcp.databasemigrationservice.PrivateConnection("privateConnectionResource",
location="string",
private_connection_id="string",
create_without_validation=False,
deletion_policy="string",
display_name="string",
labels={
"string": "string",
},
project="string",
psc_interface_config={
"network_attachment": "string",
},
vpc_peering_config={
"subnet": "string",
"vpc_name": "string",
})
const privateConnectionResource = new gcp.databasemigrationservice.PrivateConnection("privateConnectionResource", {
location: "string",
privateConnectionId: "string",
createWithoutValidation: false,
deletionPolicy: "string",
displayName: "string",
labels: {
string: "string",
},
project: "string",
pscInterfaceConfig: {
networkAttachment: "string",
},
vpcPeeringConfig: {
subnet: "string",
vpcName: "string",
},
});
type: gcp:databasemigrationservice:PrivateConnection
properties:
createWithoutValidation: false
deletionPolicy: string
displayName: string
labels:
string: string
location: string
privateConnectionId: string
project: string
pscInterfaceConfig:
networkAttachment: string
vpcPeeringConfig:
subnet: string
vpcName: string
PrivateConnection Resource Properties
To learn more about resource properties and how to use them, see Inputs and Outputs in the Architecture and Concepts docs.
Inputs
In Python, inputs that are objects can be passed either as argument classes or as dictionary literals.
The PrivateConnection resource accepts the following input properties:
- Location string
- The name of the location this private connection is located in.
- Private
Connection stringId - The private connectivity identifier.
- Create
Without boolValidation - If set to true, will skip validations.
- Deletion
Policy string - Whether Terraform will be prevented from destroying the resource. Defaults to DELETE. When a 'terraform destroy' or 'pulumi up' would delete the resource, the command will fail if this field is set to "PREVENT" in Terraform state. When set to "ABANDON", the command will remove the resource from Terraform management without updating or deleting the resource in the API. When set to "DELETE", deleting the resource is allowed.
- Display
Name string - Display name.
- Labels Dictionary<string, string>
- Labels.
Note: This field is non-authoritative, and will only manage the labels present in your configuration.
Please refer to the field
effectiveLabelsfor all of the labels present on the resource. - Project string
- The ID of the project in which the resource belongs. If it is not provided, the provider project is used.
- Psc
Interface PrivateConfig Connection Psc Interface Config - The PSC Interface configuration is used to create PSC Interface between DMS's internal VPC and the consumer's PSC. Structure is documented below.
- Vpc
Peering PrivateConfig Connection Vpc Peering Config - The VPC Peering configuration is used to create VPC peering between databasemigrationservice and the consumer's VPC. Structure is documented below.
- Location string
- The name of the location this private connection is located in.
- Private
Connection stringId - The private connectivity identifier.
- Create
Without boolValidation - If set to true, will skip validations.
- Deletion
Policy string - Whether Terraform will be prevented from destroying the resource. Defaults to DELETE. When a 'terraform destroy' or 'pulumi up' would delete the resource, the command will fail if this field is set to "PREVENT" in Terraform state. When set to "ABANDON", the command will remove the resource from Terraform management without updating or deleting the resource in the API. When set to "DELETE", deleting the resource is allowed.
- Display
Name string - Display name.
- Labels map[string]string
- Labels.
Note: This field is non-authoritative, and will only manage the labels present in your configuration.
Please refer to the field
effectiveLabelsfor all of the labels present on the resource. - Project string
- The ID of the project in which the resource belongs. If it is not provided, the provider project is used.
- Psc
Interface PrivateConfig Connection Psc Interface Config Args - The PSC Interface configuration is used to create PSC Interface between DMS's internal VPC and the consumer's PSC. Structure is documented below.
- Vpc
Peering PrivateConfig Connection Vpc Peering Config Args - The VPC Peering configuration is used to create VPC peering between databasemigrationservice and the consumer's VPC. Structure is documented below.
- location string
- The name of the location this private connection is located in.
- private_
connection_ stringid - The private connectivity identifier.
- create_
without_ boolvalidation - If set to true, will skip validations.
- deletion_
policy string - Whether Terraform will be prevented from destroying the resource. Defaults to DELETE. When a 'terraform destroy' or 'pulumi up' would delete the resource, the command will fail if this field is set to "PREVENT" in Terraform state. When set to "ABANDON", the command will remove the resource from Terraform management without updating or deleting the resource in the API. When set to "DELETE", deleting the resource is allowed.
- display_
name string - Display name.
- labels map(string)
- Labels.
Note: This field is non-authoritative, and will only manage the labels present in your configuration.
Please refer to the field
effectiveLabelsfor all of the labels present on the resource. - project string
- The ID of the project in which the resource belongs. If it is not provided, the provider project is used.
- psc_
interface_ objectconfig - The PSC Interface configuration is used to create PSC Interface between DMS's internal VPC and the consumer's PSC. Structure is documented below.
- vpc_
peering_ objectconfig - The VPC Peering configuration is used to create VPC peering between databasemigrationservice and the consumer's VPC. Structure is documented below.
- location String
- The name of the location this private connection is located in.
- private
Connection StringId - The private connectivity identifier.
- create
Without BooleanValidation - If set to true, will skip validations.
- deletion
Policy String - Whether Terraform will be prevented from destroying the resource. Defaults to DELETE. When a 'terraform destroy' or 'pulumi up' would delete the resource, the command will fail if this field is set to "PREVENT" in Terraform state. When set to "ABANDON", the command will remove the resource from Terraform management without updating or deleting the resource in the API. When set to "DELETE", deleting the resource is allowed.
- display
Name String - Display name.
- labels Map<String,String>
- Labels.
Note: This field is non-authoritative, and will only manage the labels present in your configuration.
Please refer to the field
effectiveLabelsfor all of the labels present on the resource. - project String
- The ID of the project in which the resource belongs. If it is not provided, the provider project is used.
- psc
Interface PrivateConfig Connection Psc Interface Config - The PSC Interface configuration is used to create PSC Interface between DMS's internal VPC and the consumer's PSC. Structure is documented below.
- vpc
Peering PrivateConfig Connection Vpc Peering Config - The VPC Peering configuration is used to create VPC peering between databasemigrationservice and the consumer's VPC. Structure is documented below.
- location string
- The name of the location this private connection is located in.
- private
Connection stringId - The private connectivity identifier.
- create
Without booleanValidation - If set to true, will skip validations.
- deletion
Policy string - Whether Terraform will be prevented from destroying the resource. Defaults to DELETE. When a 'terraform destroy' or 'pulumi up' would delete the resource, the command will fail if this field is set to "PREVENT" in Terraform state. When set to "ABANDON", the command will remove the resource from Terraform management without updating or deleting the resource in the API. When set to "DELETE", deleting the resource is allowed.
- display
Name string - Display name.
- labels {[key: string]: string}
- Labels.
Note: This field is non-authoritative, and will only manage the labels present in your configuration.
Please refer to the field
effectiveLabelsfor all of the labels present on the resource. - project string
- The ID of the project in which the resource belongs. If it is not provided, the provider project is used.
- psc
Interface PrivateConfig Connection Psc Interface Config - The PSC Interface configuration is used to create PSC Interface between DMS's internal VPC and the consumer's PSC. Structure is documented below.
- vpc
Peering PrivateConfig Connection Vpc Peering Config - The VPC Peering configuration is used to create VPC peering between databasemigrationservice and the consumer's VPC. Structure is documented below.
- location str
- The name of the location this private connection is located in.
- private_
connection_ strid - The private connectivity identifier.
- create_
without_ boolvalidation - If set to true, will skip validations.
- deletion_
policy str - Whether Terraform will be prevented from destroying the resource. Defaults to DELETE. When a 'terraform destroy' or 'pulumi up' would delete the resource, the command will fail if this field is set to "PREVENT" in Terraform state. When set to "ABANDON", the command will remove the resource from Terraform management without updating or deleting the resource in the API. When set to "DELETE", deleting the resource is allowed.
- display_
name str - Display name.
- labels Mapping[str, str]
- Labels.
Note: This field is non-authoritative, and will only manage the labels present in your configuration.
Please refer to the field
effectiveLabelsfor all of the labels present on the resource. - project str
- The ID of the project in which the resource belongs. If it is not provided, the provider project is used.
- psc_
interface_ Privateconfig Connection Psc Interface Config Args - The PSC Interface configuration is used to create PSC Interface between DMS's internal VPC and the consumer's PSC. Structure is documented below.
- vpc_
peering_ Privateconfig Connection Vpc Peering Config Args - The VPC Peering configuration is used to create VPC peering between databasemigrationservice and the consumer's VPC. Structure is documented below.
- location String
- The name of the location this private connection is located in.
- private
Connection StringId - The private connectivity identifier.
- create
Without BooleanValidation - If set to true, will skip validations.
- deletion
Policy String - Whether Terraform will be prevented from destroying the resource. Defaults to DELETE. When a 'terraform destroy' or 'pulumi up' would delete the resource, the command will fail if this field is set to "PREVENT" in Terraform state. When set to "ABANDON", the command will remove the resource from Terraform management without updating or deleting the resource in the API. When set to "DELETE", deleting the resource is allowed.
- display
Name String - Display name.
- labels Map<String>
- Labels.
Note: This field is non-authoritative, and will only manage the labels present in your configuration.
Please refer to the field
effectiveLabelsfor all of the labels present on the resource. - project String
- The ID of the project in which the resource belongs. If it is not provided, the provider project is used.
- psc
Interface Property MapConfig - The PSC Interface configuration is used to create PSC Interface between DMS's internal VPC and the consumer's PSC. Structure is documented below.
- vpc
Peering Property MapConfig - The VPC Peering configuration is used to create VPC peering between databasemigrationservice and the consumer's VPC. Structure is documented below.
Outputs
All input properties are implicitly available as output properties. Additionally, the PrivateConnection resource produces the following output properties:
- Effective
Labels Dictionary<string, string> - All of labels (key/value pairs) present on the resource in GCP, including the labels configured through Pulumi, other clients and services.
- Errors
List<Private
Connection Error> - The PrivateConnection error in case of failure. Structure is documented below.
- Id string
- The provider-assigned unique ID for this managed resource.
- Name string
- The resource's name.
- Pulumi
Labels Dictionary<string, string> - The combination of labels configured directly on the resource and default labels configured on the provider.
- State string
- State of the PrivateConnection.
- Effective
Labels map[string]string - All of labels (key/value pairs) present on the resource in GCP, including the labels configured through Pulumi, other clients and services.
- Errors
[]Private
Connection Error - The PrivateConnection error in case of failure. Structure is documented below.
- Id string
- The provider-assigned unique ID for this managed resource.
- Name string
- The resource's name.
- Pulumi
Labels map[string]string - The combination of labels configured directly on the resource and default labels configured on the provider.
- State string
- State of the PrivateConnection.
- effective_
labels map(string) - All of labels (key/value pairs) present on the resource in GCP, including the labels configured through Pulumi, other clients and services.
- errors list(object)
- The PrivateConnection error in case of failure. Structure is documented below.
- id string
- The provider-assigned unique ID for this managed resource.
- name string
- The resource's name.
- pulumi_
labels map(string) - The combination of labels configured directly on the resource and default labels configured on the provider.
- state string
- State of the PrivateConnection.
- effective
Labels Map<String,String> - All of labels (key/value pairs) present on the resource in GCP, including the labels configured through Pulumi, other clients and services.
- errors
List<Private
Connection Error> - The PrivateConnection error in case of failure. Structure is documented below.
- id String
- The provider-assigned unique ID for this managed resource.
- name String
- The resource's name.
- pulumi
Labels Map<String,String> - The combination of labels configured directly on the resource and default labels configured on the provider.
- state String
- State of the PrivateConnection.
- effective
Labels {[key: string]: string} - All of labels (key/value pairs) present on the resource in GCP, including the labels configured through Pulumi, other clients and services.
- errors
Private
Connection Error[] - The PrivateConnection error in case of failure. Structure is documented below.
- id string
- The provider-assigned unique ID for this managed resource.
- name string
- The resource's name.
- pulumi
Labels {[key: string]: string} - The combination of labels configured directly on the resource and default labels configured on the provider.
- state string
- State of the PrivateConnection.
- effective_
labels Mapping[str, str] - All of labels (key/value pairs) present on the resource in GCP, including the labels configured through Pulumi, other clients and services.
- errors
Sequence[Private
Connection Error] - The PrivateConnection error in case of failure. Structure is documented below.
- id str
- The provider-assigned unique ID for this managed resource.
- name str
- The resource's name.
- pulumi_
labels Mapping[str, str] - The combination of labels configured directly on the resource and default labels configured on the provider.
- state str
- State of the PrivateConnection.
- effective
Labels Map<String> - All of labels (key/value pairs) present on the resource in GCP, including the labels configured through Pulumi, other clients and services.
- errors List<Property Map>
- The PrivateConnection error in case of failure. Structure is documented below.
- id String
- The provider-assigned unique ID for this managed resource.
- name String
- The resource's name.
- pulumi
Labels Map<String> - The combination of labels configured directly on the resource and default labels configured on the provider.
- state String
- State of the PrivateConnection.
Look up Existing PrivateConnection Resource
Get an existing PrivateConnection resource’s state with the given name, ID, and optional extra properties used to qualify the lookup.
public static get(name: string, id: Input<ID>, state?: PrivateConnectionState, opts?: CustomResourceOptions): PrivateConnection@staticmethod
def get(resource_name: str,
id: str,
opts: Optional[ResourceOptions] = None,
create_without_validation: Optional[bool] = None,
deletion_policy: Optional[str] = None,
display_name: Optional[str] = None,
effective_labels: Optional[Mapping[str, str]] = None,
errors: Optional[Sequence[PrivateConnectionErrorArgs]] = None,
labels: Optional[Mapping[str, str]] = None,
location: Optional[str] = None,
name: Optional[str] = None,
private_connection_id: Optional[str] = None,
project: Optional[str] = None,
psc_interface_config: Optional[PrivateConnectionPscInterfaceConfigArgs] = None,
pulumi_labels: Optional[Mapping[str, str]] = None,
state: Optional[str] = None,
vpc_peering_config: Optional[PrivateConnectionVpcPeeringConfigArgs] = None) -> PrivateConnectionfunc GetPrivateConnection(ctx *Context, name string, id IDInput, state *PrivateConnectionState, opts ...ResourceOption) (*PrivateConnection, error)public static PrivateConnection Get(string name, Input<string> id, PrivateConnectionState? state, CustomResourceOptions? opts = null)public static PrivateConnection get(String name, Output<String> id, PrivateConnectionState state, CustomResourceOptions options)resources: _: type: gcp:databasemigrationservice:PrivateConnection get: id: ${id}import {
to = gcp_databasemigrationservice_privateconnection.example
id = "${id}"
}
- name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- state
- Any extra arguments used during the lookup.
- opts
- A bag of options that control this resource's behavior.
- resource_name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- state
- Any extra arguments used during the lookup.
- opts
- A bag of options that control this resource's behavior.
- name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- state
- Any extra arguments used during the lookup.
- opts
- A bag of options that control this resource's behavior.
- name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- state
- Any extra arguments used during the lookup.
- opts
- A bag of options that control this resource's behavior.
- Create
Without boolValidation - If set to true, will skip validations.
- Deletion
Policy string - Whether Terraform will be prevented from destroying the resource. Defaults to DELETE. When a 'terraform destroy' or 'pulumi up' would delete the resource, the command will fail if this field is set to "PREVENT" in Terraform state. When set to "ABANDON", the command will remove the resource from Terraform management without updating or deleting the resource in the API. When set to "DELETE", deleting the resource is allowed.
- Display
Name string - Display name.
- Effective
Labels Dictionary<string, string> - All of labels (key/value pairs) present on the resource in GCP, including the labels configured through Pulumi, other clients and services.
- Errors
List<Private
Connection Error> - The PrivateConnection error in case of failure. Structure is documented below.
- Labels Dictionary<string, string>
- Labels.
Note: This field is non-authoritative, and will only manage the labels present in your configuration.
Please refer to the field
effectiveLabelsfor all of the labels present on the resource. - Location string
- The name of the location this private connection is located in.
- Name string
- The resource's name.
- Private
Connection stringId - The private connectivity identifier.
- Project string
- The ID of the project in which the resource belongs. If it is not provided, the provider project is used.
- Psc
Interface PrivateConfig Connection Psc Interface Config - The PSC Interface configuration is used to create PSC Interface between DMS's internal VPC and the consumer's PSC. Structure is documented below.
- Pulumi
Labels Dictionary<string, string> - The combination of labels configured directly on the resource and default labels configured on the provider.
- State string
- State of the PrivateConnection.
- Vpc
Peering PrivateConfig Connection Vpc Peering Config - The VPC Peering configuration is used to create VPC peering between databasemigrationservice and the consumer's VPC. Structure is documented below.
- Create
Without boolValidation - If set to true, will skip validations.
- Deletion
Policy string - Whether Terraform will be prevented from destroying the resource. Defaults to DELETE. When a 'terraform destroy' or 'pulumi up' would delete the resource, the command will fail if this field is set to "PREVENT" in Terraform state. When set to "ABANDON", the command will remove the resource from Terraform management without updating or deleting the resource in the API. When set to "DELETE", deleting the resource is allowed.
- Display
Name string - Display name.
- Effective
Labels map[string]string - All of labels (key/value pairs) present on the resource in GCP, including the labels configured through Pulumi, other clients and services.
- Errors
[]Private
Connection Error Args - The PrivateConnection error in case of failure. Structure is documented below.
- Labels map[string]string
- Labels.
Note: This field is non-authoritative, and will only manage the labels present in your configuration.
Please refer to the field
effectiveLabelsfor all of the labels present on the resource. - Location string
- The name of the location this private connection is located in.
- Name string
- The resource's name.
- Private
Connection stringId - The private connectivity identifier.
- Project string
- The ID of the project in which the resource belongs. If it is not provided, the provider project is used.
- Psc
Interface PrivateConfig Connection Psc Interface Config Args - The PSC Interface configuration is used to create PSC Interface between DMS's internal VPC and the consumer's PSC. Structure is documented below.
- Pulumi
Labels map[string]string - The combination of labels configured directly on the resource and default labels configured on the provider.
- State string
- State of the PrivateConnection.
- Vpc
Peering PrivateConfig Connection Vpc Peering Config Args - The VPC Peering configuration is used to create VPC peering between databasemigrationservice and the consumer's VPC. Structure is documented below.
- create_
without_ boolvalidation - If set to true, will skip validations.
- deletion_
policy string - Whether Terraform will be prevented from destroying the resource. Defaults to DELETE. When a 'terraform destroy' or 'pulumi up' would delete the resource, the command will fail if this field is set to "PREVENT" in Terraform state. When set to "ABANDON", the command will remove the resource from Terraform management without updating or deleting the resource in the API. When set to "DELETE", deleting the resource is allowed.
- display_
name string - Display name.
- effective_
labels map(string) - All of labels (key/value pairs) present on the resource in GCP, including the labels configured through Pulumi, other clients and services.
- errors list(object)
- The PrivateConnection error in case of failure. Structure is documented below.
- labels map(string)
- Labels.
Note: This field is non-authoritative, and will only manage the labels present in your configuration.
Please refer to the field
effectiveLabelsfor all of the labels present on the resource. - location string
- The name of the location this private connection is located in.
- name string
- The resource's name.
- private_
connection_ stringid - The private connectivity identifier.
- project string
- The ID of the project in which the resource belongs. If it is not provided, the provider project is used.
- psc_
interface_ objectconfig - The PSC Interface configuration is used to create PSC Interface between DMS's internal VPC and the consumer's PSC. Structure is documented below.
- pulumi_
labels map(string) - The combination of labels configured directly on the resource and default labels configured on the provider.
- state string
- State of the PrivateConnection.
- vpc_
peering_ objectconfig - The VPC Peering configuration is used to create VPC peering between databasemigrationservice and the consumer's VPC. Structure is documented below.
- create
Without BooleanValidation - If set to true, will skip validations.
- deletion
Policy String - Whether Terraform will be prevented from destroying the resource. Defaults to DELETE. When a 'terraform destroy' or 'pulumi up' would delete the resource, the command will fail if this field is set to "PREVENT" in Terraform state. When set to "ABANDON", the command will remove the resource from Terraform management without updating or deleting the resource in the API. When set to "DELETE", deleting the resource is allowed.
- display
Name String - Display name.
- effective
Labels Map<String,String> - All of labels (key/value pairs) present on the resource in GCP, including the labels configured through Pulumi, other clients and services.
- errors
List<Private
Connection Error> - The PrivateConnection error in case of failure. Structure is documented below.
- labels Map<String,String>
- Labels.
Note: This field is non-authoritative, and will only manage the labels present in your configuration.
Please refer to the field
effectiveLabelsfor all of the labels present on the resource. - location String
- The name of the location this private connection is located in.
- name String
- The resource's name.
- private
Connection StringId - The private connectivity identifier.
- project String
- The ID of the project in which the resource belongs. If it is not provided, the provider project is used.
- psc
Interface PrivateConfig Connection Psc Interface Config - The PSC Interface configuration is used to create PSC Interface between DMS's internal VPC and the consumer's PSC. Structure is documented below.
- pulumi
Labels Map<String,String> - The combination of labels configured directly on the resource and default labels configured on the provider.
- state String
- State of the PrivateConnection.
- vpc
Peering PrivateConfig Connection Vpc Peering Config - The VPC Peering configuration is used to create VPC peering between databasemigrationservice and the consumer's VPC. Structure is documented below.
- create
Without booleanValidation - If set to true, will skip validations.
- deletion
Policy string - Whether Terraform will be prevented from destroying the resource. Defaults to DELETE. When a 'terraform destroy' or 'pulumi up' would delete the resource, the command will fail if this field is set to "PREVENT" in Terraform state. When set to "ABANDON", the command will remove the resource from Terraform management without updating or deleting the resource in the API. When set to "DELETE", deleting the resource is allowed.
- display
Name string - Display name.
- effective
Labels {[key: string]: string} - All of labels (key/value pairs) present on the resource in GCP, including the labels configured through Pulumi, other clients and services.
- errors
Private
Connection Error[] - The PrivateConnection error in case of failure. Structure is documented below.
- labels {[key: string]: string}
- Labels.
Note: This field is non-authoritative, and will only manage the labels present in your configuration.
Please refer to the field
effectiveLabelsfor all of the labels present on the resource. - location string
- The name of the location this private connection is located in.
- name string
- The resource's name.
- private
Connection stringId - The private connectivity identifier.
- project string
- The ID of the project in which the resource belongs. If it is not provided, the provider project is used.
- psc
Interface PrivateConfig Connection Psc Interface Config - The PSC Interface configuration is used to create PSC Interface between DMS's internal VPC and the consumer's PSC. Structure is documented below.
- pulumi
Labels {[key: string]: string} - The combination of labels configured directly on the resource and default labels configured on the provider.
- state string
- State of the PrivateConnection.
- vpc
Peering PrivateConfig Connection Vpc Peering Config - The VPC Peering configuration is used to create VPC peering between databasemigrationservice and the consumer's VPC. Structure is documented below.
- create_
without_ boolvalidation - If set to true, will skip validations.
- deletion_
policy str - Whether Terraform will be prevented from destroying the resource. Defaults to DELETE. When a 'terraform destroy' or 'pulumi up' would delete the resource, the command will fail if this field is set to "PREVENT" in Terraform state. When set to "ABANDON", the command will remove the resource from Terraform management without updating or deleting the resource in the API. When set to "DELETE", deleting the resource is allowed.
- display_
name str - Display name.
- effective_
labels Mapping[str, str] - All of labels (key/value pairs) present on the resource in GCP, including the labels configured through Pulumi, other clients and services.
- errors
Sequence[Private
Connection Error Args] - The PrivateConnection error in case of failure. Structure is documented below.
- labels Mapping[str, str]
- Labels.
Note: This field is non-authoritative, and will only manage the labels present in your configuration.
Please refer to the field
effectiveLabelsfor all of the labels present on the resource. - location str
- The name of the location this private connection is located in.
- name str
- The resource's name.
- private_
connection_ strid - The private connectivity identifier.
- project str
- The ID of the project in which the resource belongs. If it is not provided, the provider project is used.
- psc_
interface_ Privateconfig Connection Psc Interface Config Args - The PSC Interface configuration is used to create PSC Interface between DMS's internal VPC and the consumer's PSC. Structure is documented below.
- pulumi_
labels Mapping[str, str] - The combination of labels configured directly on the resource and default labels configured on the provider.
- state str
- State of the PrivateConnection.
- vpc_
peering_ Privateconfig Connection Vpc Peering Config Args - The VPC Peering configuration is used to create VPC peering between databasemigrationservice and the consumer's VPC. Structure is documented below.
- create
Without BooleanValidation - If set to true, will skip validations.
- deletion
Policy String - Whether Terraform will be prevented from destroying the resource. Defaults to DELETE. When a 'terraform destroy' or 'pulumi up' would delete the resource, the command will fail if this field is set to "PREVENT" in Terraform state. When set to "ABANDON", the command will remove the resource from Terraform management without updating or deleting the resource in the API. When set to "DELETE", deleting the resource is allowed.
- display
Name String - Display name.
- effective
Labels Map<String> - All of labels (key/value pairs) present on the resource in GCP, including the labels configured through Pulumi, other clients and services.
- errors List<Property Map>
- The PrivateConnection error in case of failure. Structure is documented below.
- labels Map<String>
- Labels.
Note: This field is non-authoritative, and will only manage the labels present in your configuration.
Please refer to the field
effectiveLabelsfor all of the labels present on the resource. - location String
- The name of the location this private connection is located in.
- name String
- The resource's name.
- private
Connection StringId - The private connectivity identifier.
- project String
- The ID of the project in which the resource belongs. If it is not provided, the provider project is used.
- psc
Interface Property MapConfig - The PSC Interface configuration is used to create PSC Interface between DMS's internal VPC and the consumer's PSC. Structure is documented below.
- pulumi
Labels Map<String> - The combination of labels configured directly on the resource and default labels configured on the provider.
- state String
- State of the PrivateConnection.
- vpc
Peering Property MapConfig - The VPC Peering configuration is used to create VPC peering between databasemigrationservice and the consumer's VPC. Structure is documented below.
Supporting Types
PrivateConnectionError, PrivateConnectionErrorArgs
PrivateConnectionPscInterfaceConfig, PrivateConnectionPscInterfaceConfigArgs
- Network
Attachment string - Fully qualified name of the Network Attachment that DMS will connect to. Format: projects/{project}/regions/{region}/networkAttachments/{name}
- Network
Attachment string - Fully qualified name of the Network Attachment that DMS will connect to. Format: projects/{project}/regions/{region}/networkAttachments/{name}
- network_
attachment string - Fully qualified name of the Network Attachment that DMS will connect to. Format: projects/{project}/regions/{region}/networkAttachments/{name}
- network
Attachment String - Fully qualified name of the Network Attachment that DMS will connect to. Format: projects/{project}/regions/{region}/networkAttachments/{name}
- network
Attachment string - Fully qualified name of the Network Attachment that DMS will connect to. Format: projects/{project}/regions/{region}/networkAttachments/{name}
- network_
attachment str - Fully qualified name of the Network Attachment that DMS will connect to. Format: projects/{project}/regions/{region}/networkAttachments/{name}
- network
Attachment String - Fully qualified name of the Network Attachment that DMS will connect to. Format: projects/{project}/regions/{region}/networkAttachments/{name}
PrivateConnectionVpcPeeringConfig, PrivateConnectionVpcPeeringConfigArgs
Import
PrivateConnection can be imported using any of these accepted formats:
projects/{{project}}/locations/{{location}}/privateConnections/{{private_connection_id}}{{project}}/{{location}}/{{private_connection_id}}{{location}}/{{private_connection_id}}
When using the pulumi import command, PrivateConnection can be imported using one of the formats above. For example:
$ pulumi import gcp:databasemigrationservice/privateConnection:PrivateConnection default projects/{{project}}/locations/{{location}}/privateConnections/{{private_connection_id}}
$ pulumi import gcp:databasemigrationservice/privateConnection:PrivateConnection default {{project}}/{{location}}/{{private_connection_id}}
$ pulumi import gcp:databasemigrationservice/privateConnection:PrivateConnection default {{location}}/{{private_connection_id}}
To learn more about importing existing cloud resources, see Importing resources.
Package Details
- Repository
- Google Cloud (GCP) Classic pulumi/pulumi-gcp
- License
- Apache-2.0
- Notes
- This Pulumi package is based on the
google-betaTerraform Provider.
published on Friday, May 22, 2026 by Pulumi