gcp logo
Google Cloud Classic v6.52.0, Mar 22 23

gcp.vpcaccess.getConnector

Get a Serverless VPC Access connector.

To get more information about Connector, see:

Example Usage

using System.Collections.Generic;
using Pulumi;
using Gcp = Pulumi.Gcp;

return await Deployment.RunAsync(() => 
{
    var sample = Gcp.VpcAccess.GetConnector.Invoke(new()
    {
        Name = "vpc-con",
    });

    var connector = new Gcp.VpcAccess.Connector("connector", new()
    {
        IpCidrRange = "10.8.0.0/28",
        Network = "default",
        Region = "us-central1",
    });

});
package main

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

func main() {
	pulumi.Run(func(ctx *pulumi.Context) error {
		_, err := vpcaccess.LookupConnector(ctx, &vpcaccess.LookupConnectorArgs{
			Name: "vpc-con",
		}, nil)
		if err != nil {
			return err
		}
		_, err = vpcaccess.NewConnector(ctx, "connector", &vpcaccess.ConnectorArgs{
			IpCidrRange: pulumi.String("10.8.0.0/28"),
			Network:     pulumi.String("default"),
			Region:      pulumi.String("us-central1"),
		})
		if err != nil {
			return err
		}
		return nil
	})
}
package generated_program;

import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.gcp.vpcaccess.VpcaccessFunctions;
import com.pulumi.gcp.vpcaccess.inputs.GetConnectorArgs;
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) {
        final var sample = VpcaccessFunctions.getConnector(GetConnectorArgs.builder()
            .name("vpc-con")
            .build());

        var connector = new Connector("connector", ConnectorArgs.builder()        
            .ipCidrRange("10.8.0.0/28")
            .network("default")
            .region("us-central1")
            .build());

    }
}
import pulumi
import pulumi_gcp as gcp

sample = gcp.vpcaccess.get_connector(name="vpc-con")
connector = gcp.vpcaccess.Connector("connector",
    ip_cidr_range="10.8.0.0/28",
    network="default",
    region="us-central1")
import * as pulumi from "@pulumi/pulumi";
import * as gcp from "@pulumi/gcp";

const sample = gcp.vpcaccess.getConnector({
    name: "vpc-con",
});
const connector = new gcp.vpcaccess.Connector("connector", {
    ipCidrRange: "10.8.0.0/28",
    network: "default",
    region: "us-central1",
});
resources:
  connector:
    type: gcp:vpcaccess:Connector
    properties:
      ipCidrRange: 10.8.0.0/28
      network: default
      region: us-central1
variables:
  sample:
    fn::invoke:
      Function: gcp:vpcaccess:getConnector
      Arguments:
        name: vpc-con

Using getConnector

Two invocation forms are available. The direct form accepts plain arguments and either blocks until the result value is available, or returns a Promise-wrapped result. The output form accepts Input-wrapped arguments and returns an Output-wrapped result.

function getConnector(args: GetConnectorArgs, opts?: InvokeOptions): Promise<GetConnectorResult>
function getConnectorOutput(args: GetConnectorOutputArgs, opts?: InvokeOptions): Output<GetConnectorResult>
def get_connector(name: Optional[str] = None,
                  project: Optional[str] = None,
                  region: Optional[str] = None,
                  opts: Optional[InvokeOptions] = None) -> GetConnectorResult
def get_connector_output(name: Optional[pulumi.Input[str]] = None,
                  project: Optional[pulumi.Input[str]] = None,
                  region: Optional[pulumi.Input[str]] = None,
                  opts: Optional[InvokeOptions] = None) -> Output[GetConnectorResult]
func LookupConnector(ctx *Context, args *LookupConnectorArgs, opts ...InvokeOption) (*LookupConnectorResult, error)
func LookupConnectorOutput(ctx *Context, args *LookupConnectorOutputArgs, opts ...InvokeOption) LookupConnectorResultOutput

> Note: This function is named LookupConnector in the Go SDK.

public static class GetConnector 
{
    public static Task<GetConnectorResult> InvokeAsync(GetConnectorArgs args, InvokeOptions? opts = null)
    public static Output<GetConnectorResult> Invoke(GetConnectorInvokeArgs args, InvokeOptions? opts = null)
}
public static CompletableFuture<GetConnectorResult> getConnector(GetConnectorArgs args, InvokeOptions options)
// Output-based functions aren't available in Java yet
fn::invoke:
  function: gcp:vpcaccess/getConnector:getConnector
  arguments:
    # arguments dictionary

The following arguments are supported:

Name string

Name of the resource.

Project string

The ID of the project in which the resource belongs. If it is not provided, the provider project is used.

Region string

The region in which the resource belongs. If it is not provided, the provider region is used.

Name string

Name of the resource.

Project string

The ID of the project in which the resource belongs. If it is not provided, the provider project is used.

Region string

The region in which the resource belongs. If it is not provided, the provider region is used.

name String

Name of the resource.

project String

The ID of the project in which the resource belongs. If it is not provided, the provider project is used.

region String

The region in which the resource belongs. If it is not provided, the provider region is used.

name string

Name of the resource.

project string

The ID of the project in which the resource belongs. If it is not provided, the provider project is used.

region string

The region in which the resource belongs. If it is not provided, the provider region is used.

name str

Name of the resource.

project str

The ID of the project in which the resource belongs. If it is not provided, the provider project is used.

region str

The region in which the resource belongs. If it is not provided, the provider region is used.

name String

Name of the resource.

project String

The ID of the project in which the resource belongs. If it is not provided, the provider project is used.

region String

The region in which the resource belongs. If it is not provided, the provider region is used.

getConnector Result

The following output properties are available:

Id string

The provider-assigned unique ID for this managed resource.

IpCidrRange string
MachineType string
MaxInstances int
MaxThroughput int
MinInstances int
MinThroughput int
Name string
Network string
SelfLink string
State string
Subnets List<GetConnectorSubnet>
Project string
Region string
Id string

The provider-assigned unique ID for this managed resource.

IpCidrRange string
MachineType string
MaxInstances int
MaxThroughput int
MinInstances int
MinThroughput int
Name string
Network string
SelfLink string
State string
Subnets []GetConnectorSubnet
Project string
Region string
id String

The provider-assigned unique ID for this managed resource.

ipCidrRange String
machineType String
maxInstances Integer
maxThroughput Integer
minInstances Integer
minThroughput Integer
name String
network String
selfLink String
state String
subnets List<GetConnectorSubnet>
project String
region String
id string

The provider-assigned unique ID for this managed resource.

ipCidrRange string
machineType string
maxInstances number
maxThroughput number
minInstances number
minThroughput number
name string
network string
selfLink string
state string
subnets GetConnectorSubnet[]
project string
region string
id str

The provider-assigned unique ID for this managed resource.

ip_cidr_range str
machine_type str
max_instances int
max_throughput int
min_instances int
min_throughput int
name str
network str
self_link str
state str
subnets Sequence[GetConnectorSubnet]
project str
region str
id String

The provider-assigned unique ID for this managed resource.

ipCidrRange String
machineType String
maxInstances Number
maxThroughput Number
minInstances Number
minThroughput Number
name String
network String
selfLink String
state String
subnets List<Property Map>
project String
region String

Supporting Types

GetConnectorSubnet

Name string

Name of the resource.

ProjectId string
Name string

Name of the resource.

ProjectId string
name String

Name of the resource.

projectId String
name string

Name of the resource.

projectId string
name str

Name of the resource.

project_id str
name String

Name of the resource.

projectId String

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.