google_database_migration_service_private_connection

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:

Open in Cloud Shell

Example Usage - Database Migration Service Private Connection

resource "google_database_migration_service_private_connection" "default" {
    display_name          = "dbms_pc"
    location              = "us-central1"
    private_connection_id = "my-connection"

    labels = {
        key = "value"
    }

    vpc_peering_config {
        vpc_name = data.google_compute_network.default.id
        subnet = "10.0.0.0/29"
    }
}

data "google_compute_network" "default" {
  name = "my-network"
}

Argument Reference

The following arguments are supported:

The vpc_peering_config block supports:


Attributes Reference

In addition to the arguments listed above, the following computed attributes are exported:

The error block contains:

Timeouts

This resource provides the following Timeouts configuration options:

Import

PrivateConnection can be imported using any of these accepted formats:

In Terraform v1.5.0 and later, use an import block to import PrivateConnection using one of the formats above. For example:

import {
  id = "projects/{{project}}/locations/{{location}}/privateConnections/{{private_connection_id}}"
  to = google_database_migration_service_private_connection.default
}

When using the terraform import command, PrivateConnection can be imported using one of the formats above. For example:

$ terraform import google_database_migration_service_private_connection.default projects/{{project}}/locations/{{location}}/privateConnections/{{private_connection_id}}
$ terraform import google_database_migration_service_private_connection.default {{project}}/{{location}}/{{private_connection_id}}
$ terraform import google_database_migration_service_private_connection.default {{location}}/{{private_connection_id}}

User Project Overrides

This resource supports User Project Overrides.