1. Packages
  2. Google Cloud (GCP) Classic
  3. API Docs
  4. vpcaccess
  5. Connector
Google Cloud v8.26.0 published on Thursday, Apr 10, 2025 by Pulumi

gcp.vpcaccess.Connector

Explore with Pulumi AI

Serverless VPC Access connector resource.

To get more information about Connector, see:

Example Usage

Vpc Access Connector

import * as pulumi from "@pulumi/pulumi";
import * as gcp from "@pulumi/gcp";

const connector = new gcp.vpcaccess.Connector("connector", {
    name: "vpc-con",
    ipCidrRange: "10.8.0.0/28",
    network: "default",
    minInstances: 2,
    maxInstances: 3,
});
Copy
import pulumi
import pulumi_gcp as gcp

connector = gcp.vpcaccess.Connector("connector",
    name="vpc-con",
    ip_cidr_range="10.8.0.0/28",
    network="default",
    min_instances=2,
    max_instances=3)
Copy
package main

import (
	"github.com/pulumi/pulumi-gcp/sdk/v8/go/gcp/vpcaccess"
	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)

func main() {
	pulumi.Run(func(ctx *pulumi.Context) error {
		_, err := vpcaccess.NewConnector(ctx, "connector", &vpcaccess.ConnectorArgs{
			Name:         pulumi.String("vpc-con"),
			IpCidrRange:  pulumi.String("10.8.0.0/28"),
			Network:      pulumi.String("default"),
			MinInstances: pulumi.Int(2),
			MaxInstances: pulumi.Int(3),
		})
		if err != nil {
			return err
		}
		return nil
	})
}
Copy
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Gcp = Pulumi.Gcp;

return await Deployment.RunAsync(() => 
{
    var connector = new Gcp.VpcAccess.Connector("connector", new()
    {
        Name = "vpc-con",
        IpCidrRange = "10.8.0.0/28",
        Network = "default",
        MinInstances = 2,
        MaxInstances = 3,
    });

});
Copy
package generated_program;

import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.gcp.vpcaccess.Connector;
import com.pulumi.gcp.vpcaccess.ConnectorArgs;
import java.util.List;
import java.util.ArrayList;
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 connector = new Connector("connector", ConnectorArgs.builder()
            .name("vpc-con")
            .ipCidrRange("10.8.0.0/28")
            .network("default")
            .minInstances(2)
            .maxInstances(3)
            .build());

    }
}
Copy
resources:
  connector:
    type: gcp:vpcaccess:Connector
    properties:
      name: vpc-con
      ipCidrRange: 10.8.0.0/28
      network: default
      minInstances: 2
      maxInstances: 3
Copy

Vpc Access Connector Shared Vpc

import * as pulumi from "@pulumi/pulumi";
import * as gcp from "@pulumi/gcp";

const customTest = new gcp.compute.Subnetwork("custom_test", {
    name: "vpc-con",
    ipCidrRange: "10.2.0.0/28",
    region: "us-central1",
    network: "default",
});
const connector = new gcp.vpcaccess.Connector("connector", {
    name: "vpc-con",
    subnet: {
        name: customTest.name,
    },
    machineType: "e2-standard-4",
    minInstances: 2,
    maxInstances: 3,
});
Copy
import pulumi
import pulumi_gcp as gcp

custom_test = gcp.compute.Subnetwork("custom_test",
    name="vpc-con",
    ip_cidr_range="10.2.0.0/28",
    region="us-central1",
    network="default")
connector = gcp.vpcaccess.Connector("connector",
    name="vpc-con",
    subnet={
        "name": custom_test.name,
    },
    machine_type="e2-standard-4",
    min_instances=2,
    max_instances=3)
Copy
package main

import (
	"github.com/pulumi/pulumi-gcp/sdk/v8/go/gcp/compute"
	"github.com/pulumi/pulumi-gcp/sdk/v8/go/gcp/vpcaccess"
	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)

func main() {
	pulumi.Run(func(ctx *pulumi.Context) error {
		customTest, err := compute.NewSubnetwork(ctx, "custom_test", &compute.SubnetworkArgs{
			Name:        pulumi.String("vpc-con"),
			IpCidrRange: pulumi.String("10.2.0.0/28"),
			Region:      pulumi.String("us-central1"),
			Network:     pulumi.String("default"),
		})
		if err != nil {
			return err
		}
		_, err = vpcaccess.NewConnector(ctx, "connector", &vpcaccess.ConnectorArgs{
			Name: pulumi.String("vpc-con"),
			Subnet: &vpcaccess.ConnectorSubnetArgs{
				Name: customTest.Name,
			},
			MachineType:  pulumi.String("e2-standard-4"),
			MinInstances: pulumi.Int(2),
			MaxInstances: pulumi.Int(3),
		})
		if err != nil {
			return err
		}
		return nil
	})
}
Copy
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Gcp = Pulumi.Gcp;

return await Deployment.RunAsync(() => 
{
    var customTest = new Gcp.Compute.Subnetwork("custom_test", new()
    {
        Name = "vpc-con",
        IpCidrRange = "10.2.0.0/28",
        Region = "us-central1",
        Network = "default",
    });

    var connector = new Gcp.VpcAccess.Connector("connector", new()
    {
        Name = "vpc-con",
        Subnet = new Gcp.VpcAccess.Inputs.ConnectorSubnetArgs
        {
            Name = customTest.Name,
        },
        MachineType = "e2-standard-4",
        MinInstances = 2,
        MaxInstances = 3,
    });

});
Copy
package generated_program;

import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.gcp.compute.Subnetwork;
import com.pulumi.gcp.compute.SubnetworkArgs;
import com.pulumi.gcp.vpcaccess.Connector;
import com.pulumi.gcp.vpcaccess.ConnectorArgs;
import com.pulumi.gcp.vpcaccess.inputs.ConnectorSubnetArgs;
import java.util.List;
import java.util.ArrayList;
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 customTest = new Subnetwork("customTest", SubnetworkArgs.builder()
            .name("vpc-con")
            .ipCidrRange("10.2.0.0/28")
            .region("us-central1")
            .network("default")
            .build());

        var connector = new Connector("connector", ConnectorArgs.builder()
            .name("vpc-con")
            .subnet(ConnectorSubnetArgs.builder()
                .name(customTest.name())
                .build())
            .machineType("e2-standard-4")
            .minInstances(2)
            .maxInstances(3)
            .build());

    }
}
Copy
resources:
  connector:
    type: gcp:vpcaccess:Connector
    properties:
      name: vpc-con
      subnet:
        name: ${customTest.name}
      machineType: e2-standard-4
      minInstances: 2
      maxInstances: 3
  customTest:
    type: gcp:compute:Subnetwork
    name: custom_test
    properties:
      name: vpc-con
      ipCidrRange: 10.2.0.0/28
      region: us-central1
      network: default
Copy

Create Connector Resource

Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.

Constructor syntax

new Connector(name: string, args?: ConnectorArgs, opts?: CustomResourceOptions);
@overload
def Connector(resource_name: str,
              args: Optional[ConnectorArgs] = None,
              opts: Optional[ResourceOptions] = None)

@overload
def Connector(resource_name: str,
              opts: Optional[ResourceOptions] = None,
              ip_cidr_range: Optional[str] = None,
              machine_type: Optional[str] = None,
              max_instances: Optional[int] = None,
              max_throughput: Optional[int] = None,
              min_instances: Optional[int] = None,
              min_throughput: Optional[int] = None,
              name: Optional[str] = None,
              network: Optional[str] = None,
              project: Optional[str] = None,
              region: Optional[str] = None,
              subnet: Optional[ConnectorSubnetArgs] = None)
func NewConnector(ctx *Context, name string, args *ConnectorArgs, opts ...ResourceOption) (*Connector, error)
public Connector(string name, ConnectorArgs? args = null, CustomResourceOptions? opts = null)
public Connector(String name, ConnectorArgs args)
public Connector(String name, ConnectorArgs args, CustomResourceOptions options)
type: gcp:vpcaccess:Connector
properties: # The arguments to resource properties.
options: # Bag of options to control resource's behavior.

Parameters

name This property is required. string
The unique name of the resource.
args ConnectorArgs
The arguments to resource properties.
opts CustomResourceOptions
Bag of options to control resource's behavior.
resource_name This property is required. str
The unique name of the resource.
args ConnectorArgs
The arguments to resource properties.
opts ResourceOptions
Bag of options to control resource's behavior.
ctx Context
Context object for the current deployment.
name This property is required. string
The unique name of the resource.
args ConnectorArgs
The arguments to resource properties.
opts ResourceOption
Bag of options to control resource's behavior.
name This property is required. string
The unique name of the resource.
args ConnectorArgs
The arguments to resource properties.
opts CustomResourceOptions
Bag of options to control resource's behavior.
name This property is required. String
The unique name of the resource.
args This property is required. ConnectorArgs
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 gcpConnectorResource = new Gcp.VpcAccess.Connector("gcpConnectorResource", new()
{
    IpCidrRange = "string",
    MachineType = "string",
    MaxInstances = 0,
    MaxThroughput = 0,
    MinInstances = 0,
    MinThroughput = 0,
    Name = "string",
    Network = "string",
    Project = "string",
    Region = "string",
    Subnet = new Gcp.VpcAccess.Inputs.ConnectorSubnetArgs
    {
        Name = "string",
        ProjectId = "string",
    },
});
Copy
example, err := vpcaccess.NewConnector(ctx, "gcpConnectorResource", &vpcaccess.ConnectorArgs{
	IpCidrRange:   pulumi.String("string"),
	MachineType:   pulumi.String("string"),
	MaxInstances:  pulumi.Int(0),
	MaxThroughput: pulumi.Int(0),
	MinInstances:  pulumi.Int(0),
	MinThroughput: pulumi.Int(0),
	Name:          pulumi.String("string"),
	Network:       pulumi.String("string"),
	Project:       pulumi.String("string"),
	Region:        pulumi.String("string"),
	Subnet: &vpcaccess.ConnectorSubnetArgs{
		Name:      pulumi.String("string"),
		ProjectId: pulumi.String("string"),
	},
})
Copy
var gcpConnectorResource = new Connector("gcpConnectorResource", ConnectorArgs.builder()
    .ipCidrRange("string")
    .machineType("string")
    .maxInstances(0)
    .maxThroughput(0)
    .minInstances(0)
    .minThroughput(0)
    .name("string")
    .network("string")
    .project("string")
    .region("string")
    .subnet(ConnectorSubnetArgs.builder()
        .name("string")
        .projectId("string")
        .build())
    .build());
Copy
gcp_connector_resource = gcp.vpcaccess.Connector("gcpConnectorResource",
    ip_cidr_range="string",
    machine_type="string",
    max_instances=0,
    max_throughput=0,
    min_instances=0,
    min_throughput=0,
    name="string",
    network="string",
    project="string",
    region="string",
    subnet={
        "name": "string",
        "project_id": "string",
    })
Copy
const gcpConnectorResource = new gcp.vpcaccess.Connector("gcpConnectorResource", {
    ipCidrRange: "string",
    machineType: "string",
    maxInstances: 0,
    maxThroughput: 0,
    minInstances: 0,
    minThroughput: 0,
    name: "string",
    network: "string",
    project: "string",
    region: "string",
    subnet: {
        name: "string",
        projectId: "string",
    },
});
Copy
type: gcp:vpcaccess:Connector
properties:
    ipCidrRange: string
    machineType: string
    maxInstances: 0
    maxThroughput: 0
    minInstances: 0
    minThroughput: 0
    name: string
    network: string
    project: string
    region: string
    subnet:
        name: string
        projectId: string
Copy

Connector 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 Connector resource accepts the following input properties:

IpCidrRange Changes to this property will trigger replacement. string
The range of internal addresses that follows RFC 4632 notation. Example: 10.132.0.0/28.
MachineType Changes to this property will trigger replacement. string
Machine type of VM Instance underlying connector. Default is e2-micro
MaxInstances Changes to this property will trigger replacement. int
Maximum value of instances in autoscaling group underlying the connector. Value must be between 3 and 10, inclusive. Must be higher than the value specified by min_instances.
MaxThroughput Changes to this property will trigger replacement. int
Maximum throughput of the connector in Mbps, must be greater than min_throughput. Default is 300. Refers to the expected throughput when using an e2-micro machine type. Value must be a multiple of 100 from 300 through 1000. Must be higher than the value specified by min_throughput. Only one of max_throughput and max_instances can be specified. The use of max_throughput is discouraged in favor of max_instances.
MinInstances Changes to this property will trigger replacement. int
Minimum value of instances in autoscaling group underlying the connector. Value must be between 2 and 9, inclusive. Must be lower than the value specified by max_instances.
MinThroughput Changes to this property will trigger replacement. int
Minimum throughput of the connector in Mbps. Default and min is 200. Refers to the expected throughput when using an e2-micro machine type. Value must be a multiple of 100 from 200 through 900. Must be lower than the value specified by max_throughput. Only one of min_throughput and min_instances can be specified. The use of min_throughput is discouraged in favor of min_instances.
Name Changes to this property will trigger replacement. string
The name of the resource (Max 25 characters).


Network Changes to this property will trigger replacement. string
Name or self_link of the VPC network. Required if ip_cidr_range is set.
Project Changes to this property will trigger replacement. string
The ID of the project in which the resource belongs. If it is not provided, the provider project is used.
Region Changes to this property will trigger replacement. string
Region where the VPC Access connector resides. If it is not provided, the provider region is used.
Subnet Changes to this property will trigger replacement. ConnectorSubnet
The subnet in which to house the connector Structure is documented below.
IpCidrRange Changes to this property will trigger replacement. string
The range of internal addresses that follows RFC 4632 notation. Example: 10.132.0.0/28.
MachineType Changes to this property will trigger replacement. string
Machine type of VM Instance underlying connector. Default is e2-micro
MaxInstances Changes to this property will trigger replacement. int
Maximum value of instances in autoscaling group underlying the connector. Value must be between 3 and 10, inclusive. Must be higher than the value specified by min_instances.
MaxThroughput Changes to this property will trigger replacement. int
Maximum throughput of the connector in Mbps, must be greater than min_throughput. Default is 300. Refers to the expected throughput when using an e2-micro machine type. Value must be a multiple of 100 from 300 through 1000. Must be higher than the value specified by min_throughput. Only one of max_throughput and max_instances can be specified. The use of max_throughput is discouraged in favor of max_instances.
MinInstances Changes to this property will trigger replacement. int
Minimum value of instances in autoscaling group underlying the connector. Value must be between 2 and 9, inclusive. Must be lower than the value specified by max_instances.
MinThroughput Changes to this property will trigger replacement. int
Minimum throughput of the connector in Mbps. Default and min is 200. Refers to the expected throughput when using an e2-micro machine type. Value must be a multiple of 100 from 200 through 900. Must be lower than the value specified by max_throughput. Only one of min_throughput and min_instances can be specified. The use of min_throughput is discouraged in favor of min_instances.
Name Changes to this property will trigger replacement. string
The name of the resource (Max 25 characters).


Network Changes to this property will trigger replacement. string
Name or self_link of the VPC network. Required if ip_cidr_range is set.
Project Changes to this property will trigger replacement. string
The ID of the project in which the resource belongs. If it is not provided, the provider project is used.
Region Changes to this property will trigger replacement. string
Region where the VPC Access connector resides. If it is not provided, the provider region is used.
Subnet Changes to this property will trigger replacement. ConnectorSubnetArgs
The subnet in which to house the connector Structure is documented below.
ipCidrRange Changes to this property will trigger replacement. String
The range of internal addresses that follows RFC 4632 notation. Example: 10.132.0.0/28.
machineType Changes to this property will trigger replacement. String
Machine type of VM Instance underlying connector. Default is e2-micro
maxInstances Changes to this property will trigger replacement. Integer
Maximum value of instances in autoscaling group underlying the connector. Value must be between 3 and 10, inclusive. Must be higher than the value specified by min_instances.
maxThroughput Changes to this property will trigger replacement. Integer
Maximum throughput of the connector in Mbps, must be greater than min_throughput. Default is 300. Refers to the expected throughput when using an e2-micro machine type. Value must be a multiple of 100 from 300 through 1000. Must be higher than the value specified by min_throughput. Only one of max_throughput and max_instances can be specified. The use of max_throughput is discouraged in favor of max_instances.
minInstances Changes to this property will trigger replacement. Integer
Minimum value of instances in autoscaling group underlying the connector. Value must be between 2 and 9, inclusive. Must be lower than the value specified by max_instances.
minThroughput Changes to this property will trigger replacement. Integer
Minimum throughput of the connector in Mbps. Default and min is 200. Refers to the expected throughput when using an e2-micro machine type. Value must be a multiple of 100 from 200 through 900. Must be lower than the value specified by max_throughput. Only one of min_throughput and min_instances can be specified. The use of min_throughput is discouraged in favor of min_instances.
name Changes to this property will trigger replacement. String
The name of the resource (Max 25 characters).


network Changes to this property will trigger replacement. String
Name or self_link of the VPC network. Required if ip_cidr_range is set.
project Changes to this property will trigger replacement. String
The ID of the project in which the resource belongs. If it is not provided, the provider project is used.
region Changes to this property will trigger replacement. String
Region where the VPC Access connector resides. If it is not provided, the provider region is used.
subnet Changes to this property will trigger replacement. ConnectorSubnet
The subnet in which to house the connector Structure is documented below.
ipCidrRange Changes to this property will trigger replacement. string
The range of internal addresses that follows RFC 4632 notation. Example: 10.132.0.0/28.
machineType Changes to this property will trigger replacement. string
Machine type of VM Instance underlying connector. Default is e2-micro
maxInstances Changes to this property will trigger replacement. number
Maximum value of instances in autoscaling group underlying the connector. Value must be between 3 and 10, inclusive. Must be higher than the value specified by min_instances.
maxThroughput Changes to this property will trigger replacement. number
Maximum throughput of the connector in Mbps, must be greater than min_throughput. Default is 300. Refers to the expected throughput when using an e2-micro machine type. Value must be a multiple of 100 from 300 through 1000. Must be higher than the value specified by min_throughput. Only one of max_throughput and max_instances can be specified. The use of max_throughput is discouraged in favor of max_instances.
minInstances Changes to this property will trigger replacement. number
Minimum value of instances in autoscaling group underlying the connector. Value must be between 2 and 9, inclusive. Must be lower than the value specified by max_instances.
minThroughput Changes to this property will trigger replacement. number
Minimum throughput of the connector in Mbps. Default and min is 200. Refers to the expected throughput when using an e2-micro machine type. Value must be a multiple of 100 from 200 through 900. Must be lower than the value specified by max_throughput. Only one of min_throughput and min_instances can be specified. The use of min_throughput is discouraged in favor of min_instances.
name Changes to this property will trigger replacement. string
The name of the resource (Max 25 characters).


network Changes to this property will trigger replacement. string
Name or self_link of the VPC network. Required if ip_cidr_range is set.
project Changes to this property will trigger replacement. string
The ID of the project in which the resource belongs. If it is not provided, the provider project is used.
region Changes to this property will trigger replacement. string
Region where the VPC Access connector resides. If it is not provided, the provider region is used.
subnet Changes to this property will trigger replacement. ConnectorSubnet
The subnet in which to house the connector Structure is documented below.
ip_cidr_range Changes to this property will trigger replacement. str
The range of internal addresses that follows RFC 4632 notation. Example: 10.132.0.0/28.
machine_type Changes to this property will trigger replacement. str
Machine type of VM Instance underlying connector. Default is e2-micro
max_instances Changes to this property will trigger replacement. int
Maximum value of instances in autoscaling group underlying the connector. Value must be between 3 and 10, inclusive. Must be higher than the value specified by min_instances.
max_throughput Changes to this property will trigger replacement. int
Maximum throughput of the connector in Mbps, must be greater than min_throughput. Default is 300. Refers to the expected throughput when using an e2-micro machine type. Value must be a multiple of 100 from 300 through 1000. Must be higher than the value specified by min_throughput. Only one of max_throughput and max_instances can be specified. The use of max_throughput is discouraged in favor of max_instances.
min_instances Changes to this property will trigger replacement. int
Minimum value of instances in autoscaling group underlying the connector. Value must be between 2 and 9, inclusive. Must be lower than the value specified by max_instances.
min_throughput Changes to this property will trigger replacement. int
Minimum throughput of the connector in Mbps. Default and min is 200. Refers to the expected throughput when using an e2-micro machine type. Value must be a multiple of 100 from 200 through 900. Must be lower than the value specified by max_throughput. Only one of min_throughput and min_instances can be specified. The use of min_throughput is discouraged in favor of min_instances.
name Changes to this property will trigger replacement. str
The name of the resource (Max 25 characters).


network Changes to this property will trigger replacement. str
Name or self_link of the VPC network. Required if ip_cidr_range is set.
project Changes to this property will trigger replacement. str
The ID of the project in which the resource belongs. If it is not provided, the provider project is used.
region Changes to this property will trigger replacement. str
Region where the VPC Access connector resides. If it is not provided, the provider region is used.
subnet Changes to this property will trigger replacement. ConnectorSubnetArgs
The subnet in which to house the connector Structure is documented below.
ipCidrRange Changes to this property will trigger replacement. String
The range of internal addresses that follows RFC 4632 notation. Example: 10.132.0.0/28.
machineType Changes to this property will trigger replacement. String
Machine type of VM Instance underlying connector. Default is e2-micro
maxInstances Changes to this property will trigger replacement. Number
Maximum value of instances in autoscaling group underlying the connector. Value must be between 3 and 10, inclusive. Must be higher than the value specified by min_instances.
maxThroughput Changes to this property will trigger replacement. Number
Maximum throughput of the connector in Mbps, must be greater than min_throughput. Default is 300. Refers to the expected throughput when using an e2-micro machine type. Value must be a multiple of 100 from 300 through 1000. Must be higher than the value specified by min_throughput. Only one of max_throughput and max_instances can be specified. The use of max_throughput is discouraged in favor of max_instances.
minInstances Changes to this property will trigger replacement. Number
Minimum value of instances in autoscaling group underlying the connector. Value must be between 2 and 9, inclusive. Must be lower than the value specified by max_instances.
minThroughput Changes to this property will trigger replacement. Number
Minimum throughput of the connector in Mbps. Default and min is 200. Refers to the expected throughput when using an e2-micro machine type. Value must be a multiple of 100 from 200 through 900. Must be lower than the value specified by max_throughput. Only one of min_throughput and min_instances can be specified. The use of min_throughput is discouraged in favor of min_instances.
name Changes to this property will trigger replacement. String
The name of the resource (Max 25 characters).


network Changes to this property will trigger replacement. String
Name or self_link of the VPC network. Required if ip_cidr_range is set.
project Changes to this property will trigger replacement. String
The ID of the project in which the resource belongs. If it is not provided, the provider project is used.
region Changes to this property will trigger replacement. String
Region where the VPC Access connector resides. If it is not provided, the provider region is used.
subnet Changes to this property will trigger replacement. Property Map
The subnet in which to house the connector Structure is documented below.

Outputs

All input properties are implicitly available as output properties. Additionally, the Connector resource produces the following output properties:

ConnectedProjects List<string>
List of projects using the connector.
Id string
The provider-assigned unique ID for this managed resource.
SelfLink string
The fully qualified name of this VPC connector
State string
State of the VPC access connector.
ConnectedProjects []string
List of projects using the connector.
Id string
The provider-assigned unique ID for this managed resource.
SelfLink string
The fully qualified name of this VPC connector
State string
State of the VPC access connector.
connectedProjects List<String>
List of projects using the connector.
id String
The provider-assigned unique ID for this managed resource.
selfLink String
The fully qualified name of this VPC connector
state String
State of the VPC access connector.
connectedProjects string[]
List of projects using the connector.
id string
The provider-assigned unique ID for this managed resource.
selfLink string
The fully qualified name of this VPC connector
state string
State of the VPC access connector.
connected_projects Sequence[str]
List of projects using the connector.
id str
The provider-assigned unique ID for this managed resource.
self_link str
The fully qualified name of this VPC connector
state str
State of the VPC access connector.
connectedProjects List<String>
List of projects using the connector.
id String
The provider-assigned unique ID for this managed resource.
selfLink String
The fully qualified name of this VPC connector
state String
State of the VPC access connector.

Look up Existing Connector Resource

Get an existing Connector 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?: ConnectorState, opts?: CustomResourceOptions): Connector
@staticmethod
def get(resource_name: str,
        id: str,
        opts: Optional[ResourceOptions] = None,
        connected_projects: Optional[Sequence[str]] = None,
        ip_cidr_range: Optional[str] = None,
        machine_type: Optional[str] = None,
        max_instances: Optional[int] = None,
        max_throughput: Optional[int] = None,
        min_instances: Optional[int] = None,
        min_throughput: Optional[int] = None,
        name: Optional[str] = None,
        network: Optional[str] = None,
        project: Optional[str] = None,
        region: Optional[str] = None,
        self_link: Optional[str] = None,
        state: Optional[str] = None,
        subnet: Optional[ConnectorSubnetArgs] = None) -> Connector
func GetConnector(ctx *Context, name string, id IDInput, state *ConnectorState, opts ...ResourceOption) (*Connector, error)
public static Connector Get(string name, Input<string> id, ConnectorState? state, CustomResourceOptions? opts = null)
public static Connector get(String name, Output<String> id, ConnectorState state, CustomResourceOptions options)
resources:  _:    type: gcp:vpcaccess:Connector    get:      id: ${id}
name This property is required.
The unique name of the resulting resource.
id This property is required.
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 This property is required.
The unique name of the resulting resource.
id This property is required.
The unique provider ID of the resource to lookup.
name This property is required.
The unique name of the resulting resource.
id This property is required.
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 This property is required.
The unique name of the resulting resource.
id This property is required.
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 This property is required.
The unique name of the resulting resource.
id This property is required.
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.
The following state arguments are supported:
ConnectedProjects List<string>
List of projects using the connector.
IpCidrRange Changes to this property will trigger replacement. string
The range of internal addresses that follows RFC 4632 notation. Example: 10.132.0.0/28.
MachineType Changes to this property will trigger replacement. string
Machine type of VM Instance underlying connector. Default is e2-micro
MaxInstances Changes to this property will trigger replacement. int
Maximum value of instances in autoscaling group underlying the connector. Value must be between 3 and 10, inclusive. Must be higher than the value specified by min_instances.
MaxThroughput Changes to this property will trigger replacement. int
Maximum throughput of the connector in Mbps, must be greater than min_throughput. Default is 300. Refers to the expected throughput when using an e2-micro machine type. Value must be a multiple of 100 from 300 through 1000. Must be higher than the value specified by min_throughput. Only one of max_throughput and max_instances can be specified. The use of max_throughput is discouraged in favor of max_instances.
MinInstances Changes to this property will trigger replacement. int
Minimum value of instances in autoscaling group underlying the connector. Value must be between 2 and 9, inclusive. Must be lower than the value specified by max_instances.
MinThroughput Changes to this property will trigger replacement. int
Minimum throughput of the connector in Mbps. Default and min is 200. Refers to the expected throughput when using an e2-micro machine type. Value must be a multiple of 100 from 200 through 900. Must be lower than the value specified by max_throughput. Only one of min_throughput and min_instances can be specified. The use of min_throughput is discouraged in favor of min_instances.
Name Changes to this property will trigger replacement. string
The name of the resource (Max 25 characters).


Network Changes to this property will trigger replacement. string
Name or self_link of the VPC network. Required if ip_cidr_range is set.
Project Changes to this property will trigger replacement. string
The ID of the project in which the resource belongs. If it is not provided, the provider project is used.
Region Changes to this property will trigger replacement. string
Region where the VPC Access connector resides. If it is not provided, the provider region is used.
SelfLink string
The fully qualified name of this VPC connector
State string
State of the VPC access connector.
Subnet Changes to this property will trigger replacement. ConnectorSubnet
The subnet in which to house the connector Structure is documented below.
ConnectedProjects []string
List of projects using the connector.
IpCidrRange Changes to this property will trigger replacement. string
The range of internal addresses that follows RFC 4632 notation. Example: 10.132.0.0/28.
MachineType Changes to this property will trigger replacement. string
Machine type of VM Instance underlying connector. Default is e2-micro
MaxInstances Changes to this property will trigger replacement. int
Maximum value of instances in autoscaling group underlying the connector. Value must be between 3 and 10, inclusive. Must be higher than the value specified by min_instances.
MaxThroughput Changes to this property will trigger replacement. int
Maximum throughput of the connector in Mbps, must be greater than min_throughput. Default is 300. Refers to the expected throughput when using an e2-micro machine type. Value must be a multiple of 100 from 300 through 1000. Must be higher than the value specified by min_throughput. Only one of max_throughput and max_instances can be specified. The use of max_throughput is discouraged in favor of max_instances.
MinInstances Changes to this property will trigger replacement. int
Minimum value of instances in autoscaling group underlying the connector. Value must be between 2 and 9, inclusive. Must be lower than the value specified by max_instances.
MinThroughput Changes to this property will trigger replacement. int
Minimum throughput of the connector in Mbps. Default and min is 200. Refers to the expected throughput when using an e2-micro machine type. Value must be a multiple of 100 from 200 through 900. Must be lower than the value specified by max_throughput. Only one of min_throughput and min_instances can be specified. The use of min_throughput is discouraged in favor of min_instances.
Name Changes to this property will trigger replacement. string
The name of the resource (Max 25 characters).


Network Changes to this property will trigger replacement. string
Name or self_link of the VPC network. Required if ip_cidr_range is set.
Project Changes to this property will trigger replacement. string
The ID of the project in which the resource belongs. If it is not provided, the provider project is used.
Region Changes to this property will trigger replacement. string
Region where the VPC Access connector resides. If it is not provided, the provider region is used.
SelfLink string
The fully qualified name of this VPC connector
State string
State of the VPC access connector.
Subnet Changes to this property will trigger replacement. ConnectorSubnetArgs
The subnet in which to house the connector Structure is documented below.
connectedProjects List<String>
List of projects using the connector.
ipCidrRange Changes to this property will trigger replacement. String
The range of internal addresses that follows RFC 4632 notation. Example: 10.132.0.0/28.
machineType Changes to this property will trigger replacement. String
Machine type of VM Instance underlying connector. Default is e2-micro
maxInstances Changes to this property will trigger replacement. Integer
Maximum value of instances in autoscaling group underlying the connector. Value must be between 3 and 10, inclusive. Must be higher than the value specified by min_instances.
maxThroughput Changes to this property will trigger replacement. Integer
Maximum throughput of the connector in Mbps, must be greater than min_throughput. Default is 300. Refers to the expected throughput when using an e2-micro machine type. Value must be a multiple of 100 from 300 through 1000. Must be higher than the value specified by min_throughput. Only one of max_throughput and max_instances can be specified. The use of max_throughput is discouraged in favor of max_instances.
minInstances Changes to this property will trigger replacement. Integer
Minimum value of instances in autoscaling group underlying the connector. Value must be between 2 and 9, inclusive. Must be lower than the value specified by max_instances.
minThroughput Changes to this property will trigger replacement. Integer
Minimum throughput of the connector in Mbps. Default and min is 200. Refers to the expected throughput when using an e2-micro machine type. Value must be a multiple of 100 from 200 through 900. Must be lower than the value specified by max_throughput. Only one of min_throughput and min_instances can be specified. The use of min_throughput is discouraged in favor of min_instances.
name Changes to this property will trigger replacement. String
The name of the resource (Max 25 characters).


network Changes to this property will trigger replacement. String
Name or self_link of the VPC network. Required if ip_cidr_range is set.
project Changes to this property will trigger replacement. String
The ID of the project in which the resource belongs. If it is not provided, the provider project is used.
region Changes to this property will trigger replacement. String
Region where the VPC Access connector resides. If it is not provided, the provider region is used.
selfLink String
The fully qualified name of this VPC connector
state String
State of the VPC access connector.
subnet Changes to this property will trigger replacement. ConnectorSubnet
The subnet in which to house the connector Structure is documented below.
connectedProjects string[]
List of projects using the connector.
ipCidrRange Changes to this property will trigger replacement. string
The range of internal addresses that follows RFC 4632 notation. Example: 10.132.0.0/28.
machineType Changes to this property will trigger replacement. string
Machine type of VM Instance underlying connector. Default is e2-micro
maxInstances Changes to this property will trigger replacement. number
Maximum value of instances in autoscaling group underlying the connector. Value must be between 3 and 10, inclusive. Must be higher than the value specified by min_instances.
maxThroughput Changes to this property will trigger replacement. number
Maximum throughput of the connector in Mbps, must be greater than min_throughput. Default is 300. Refers to the expected throughput when using an e2-micro machine type. Value must be a multiple of 100 from 300 through 1000. Must be higher than the value specified by min_throughput. Only one of max_throughput and max_instances can be specified. The use of max_throughput is discouraged in favor of max_instances.
minInstances Changes to this property will trigger replacement. number
Minimum value of instances in autoscaling group underlying the connector. Value must be between 2 and 9, inclusive. Must be lower than the value specified by max_instances.
minThroughput Changes to this property will trigger replacement. number
Minimum throughput of the connector in Mbps. Default and min is 200. Refers to the expected throughput when using an e2-micro machine type. Value must be a multiple of 100 from 200 through 900. Must be lower than the value specified by max_throughput. Only one of min_throughput and min_instances can be specified. The use of min_throughput is discouraged in favor of min_instances.
name Changes to this property will trigger replacement. string
The name of the resource (Max 25 characters).


network Changes to this property will trigger replacement. string
Name or self_link of the VPC network. Required if ip_cidr_range is set.
project Changes to this property will trigger replacement. string
The ID of the project in which the resource belongs. If it is not provided, the provider project is used.
region Changes to this property will trigger replacement. string
Region where the VPC Access connector resides. If it is not provided, the provider region is used.
selfLink string
The fully qualified name of this VPC connector
state string
State of the VPC access connector.
subnet Changes to this property will trigger replacement. ConnectorSubnet
The subnet in which to house the connector Structure is documented below.
connected_projects Sequence[str]
List of projects using the connector.
ip_cidr_range Changes to this property will trigger replacement. str
The range of internal addresses that follows RFC 4632 notation. Example: 10.132.0.0/28.
machine_type Changes to this property will trigger replacement. str
Machine type of VM Instance underlying connector. Default is e2-micro
max_instances Changes to this property will trigger replacement. int
Maximum value of instances in autoscaling group underlying the connector. Value must be between 3 and 10, inclusive. Must be higher than the value specified by min_instances.
max_throughput Changes to this property will trigger replacement. int
Maximum throughput of the connector in Mbps, must be greater than min_throughput. Default is 300. Refers to the expected throughput when using an e2-micro machine type. Value must be a multiple of 100 from 300 through 1000. Must be higher than the value specified by min_throughput. Only one of max_throughput and max_instances can be specified. The use of max_throughput is discouraged in favor of max_instances.
min_instances Changes to this property will trigger replacement. int
Minimum value of instances in autoscaling group underlying the connector. Value must be between 2 and 9, inclusive. Must be lower than the value specified by max_instances.
min_throughput Changes to this property will trigger replacement. int
Minimum throughput of the connector in Mbps. Default and min is 200. Refers to the expected throughput when using an e2-micro machine type. Value must be a multiple of 100 from 200 through 900. Must be lower than the value specified by max_throughput. Only one of min_throughput and min_instances can be specified. The use of min_throughput is discouraged in favor of min_instances.
name Changes to this property will trigger replacement. str
The name of the resource (Max 25 characters).


network Changes to this property will trigger replacement. str
Name or self_link of the VPC network. Required if ip_cidr_range is set.
project Changes to this property will trigger replacement. str
The ID of the project in which the resource belongs. If it is not provided, the provider project is used.
region Changes to this property will trigger replacement. str
Region where the VPC Access connector resides. If it is not provided, the provider region is used.
self_link str
The fully qualified name of this VPC connector
state str
State of the VPC access connector.
subnet Changes to this property will trigger replacement. ConnectorSubnetArgs
The subnet in which to house the connector Structure is documented below.
connectedProjects List<String>
List of projects using the connector.
ipCidrRange Changes to this property will trigger replacement. String
The range of internal addresses that follows RFC 4632 notation. Example: 10.132.0.0/28.
machineType Changes to this property will trigger replacement. String
Machine type of VM Instance underlying connector. Default is e2-micro
maxInstances Changes to this property will trigger replacement. Number
Maximum value of instances in autoscaling group underlying the connector. Value must be between 3 and 10, inclusive. Must be higher than the value specified by min_instances.
maxThroughput Changes to this property will trigger replacement. Number
Maximum throughput of the connector in Mbps, must be greater than min_throughput. Default is 300. Refers to the expected throughput when using an e2-micro machine type. Value must be a multiple of 100 from 300 through 1000. Must be higher than the value specified by min_throughput. Only one of max_throughput and max_instances can be specified. The use of max_throughput is discouraged in favor of max_instances.
minInstances Changes to this property will trigger replacement. Number
Minimum value of instances in autoscaling group underlying the connector. Value must be between 2 and 9, inclusive. Must be lower than the value specified by max_instances.
minThroughput Changes to this property will trigger replacement. Number
Minimum throughput of the connector in Mbps. Default and min is 200. Refers to the expected throughput when using an e2-micro machine type. Value must be a multiple of 100 from 200 through 900. Must be lower than the value specified by max_throughput. Only one of min_throughput and min_instances can be specified. The use of min_throughput is discouraged in favor of min_instances.
name Changes to this property will trigger replacement. String
The name of the resource (Max 25 characters).


network Changes to this property will trigger replacement. String
Name or self_link of the VPC network. Required if ip_cidr_range is set.
project Changes to this property will trigger replacement. String
The ID of the project in which the resource belongs. If it is not provided, the provider project is used.
region Changes to this property will trigger replacement. String
Region where the VPC Access connector resides. If it is not provided, the provider region is used.
selfLink String
The fully qualified name of this VPC connector
state String
State of the VPC access connector.
subnet Changes to this property will trigger replacement. Property Map
The subnet in which to house the connector Structure is documented below.

Supporting Types

ConnectorSubnet
, ConnectorSubnetArgs

Name Changes to this property will trigger replacement. string
Subnet name (relative, not fully qualified). E.g. if the full subnet selfLink is https://compute.googleapis.com/compute/v1/projects/{project}/regions/{region}/subnetworks/{subnetName} the correct input for this field would be {subnetName}"
ProjectId Changes to this property will trigger replacement. string
Project in which the subnet exists. If not set, this project is assumed to be the project for which the connector create request was issued.
Name Changes to this property will trigger replacement. string
Subnet name (relative, not fully qualified). E.g. if the full subnet selfLink is https://compute.googleapis.com/compute/v1/projects/{project}/regions/{region}/subnetworks/{subnetName} the correct input for this field would be {subnetName}"
ProjectId Changes to this property will trigger replacement. string
Project in which the subnet exists. If not set, this project is assumed to be the project for which the connector create request was issued.
name Changes to this property will trigger replacement. String
Subnet name (relative, not fully qualified). E.g. if the full subnet selfLink is https://compute.googleapis.com/compute/v1/projects/{project}/regions/{region}/subnetworks/{subnetName} the correct input for this field would be {subnetName}"
projectId Changes to this property will trigger replacement. String
Project in which the subnet exists. If not set, this project is assumed to be the project for which the connector create request was issued.
name Changes to this property will trigger replacement. string
Subnet name (relative, not fully qualified). E.g. if the full subnet selfLink is https://compute.googleapis.com/compute/v1/projects/{project}/regions/{region}/subnetworks/{subnetName} the correct input for this field would be {subnetName}"
projectId Changes to this property will trigger replacement. string
Project in which the subnet exists. If not set, this project is assumed to be the project for which the connector create request was issued.
name Changes to this property will trigger replacement. str
Subnet name (relative, not fully qualified). E.g. if the full subnet selfLink is https://compute.googleapis.com/compute/v1/projects/{project}/regions/{region}/subnetworks/{subnetName} the correct input for this field would be {subnetName}"
project_id Changes to this property will trigger replacement. str
Project in which the subnet exists. If not set, this project is assumed to be the project for which the connector create request was issued.
name Changes to this property will trigger replacement. String
Subnet name (relative, not fully qualified). E.g. if the full subnet selfLink is https://compute.googleapis.com/compute/v1/projects/{project}/regions/{region}/subnetworks/{subnetName} the correct input for this field would be {subnetName}"
projectId Changes to this property will trigger replacement. String
Project in which the subnet exists. If not set, this project is assumed to be the project for which the connector create request was issued.

Import

Connector can be imported using any of these accepted formats:

  • projects/{{project}}/locations/{{region}}/connectors/{{name}}

  • {{project}}/{{region}}/{{name}}

  • {{region}}/{{name}}

  • {{name}}

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

$ pulumi import gcp:vpcaccess/connector:Connector default projects/{{project}}/locations/{{region}}/connectors/{{name}}
Copy
$ pulumi import gcp:vpcaccess/connector:Connector default {{project}}/{{region}}/{{name}}
Copy
$ pulumi import gcp:vpcaccess/connector:Connector default {{region}}/{{name}}
Copy
$ pulumi import gcp:vpcaccess/connector:Connector default {{name}}
Copy

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-beta Terraform Provider.