vpcaccess

package
v5.26.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Nov 1, 2021 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Connector

type Connector struct {
	pulumi.CustomResourceState

	// The range of internal addresses that follows RFC 4632 notation. Example: `10.132.0.0/28`.
	IpCidrRange pulumi.StringPtrOutput `pulumi:"ipCidrRange"`
	// Machine type of VM Instance underlying connector. Default is e2-micro
	MachineType pulumi.StringPtrOutput `pulumi:"machineType"`
	// Maximum value of instances in autoscaling group underlying the connector.
	MaxInstances pulumi.IntOutput `pulumi:"maxInstances"`
	// Maximum throughput of the connector in Mbps, must be greater than `minThroughput`. Default is 300.
	MaxThroughput pulumi.IntPtrOutput `pulumi:"maxThroughput"`
	// Minimum value of instances in autoscaling group underlying the connector.
	MinInstances pulumi.IntOutput `pulumi:"minInstances"`
	// Minimum throughput of the connector in Mbps. Default and min is 200.
	MinThroughput pulumi.IntPtrOutput `pulumi:"minThroughput"`
	// 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}"
	Name pulumi.StringOutput `pulumi:"name"`
	// Name of the VPC network. Required if `ipCidrRange` is set.
	Network pulumi.StringPtrOutput `pulumi:"network"`
	// The ID of the project in which the resource belongs.
	// If it is not provided, the provider project is used.
	Project pulumi.StringOutput `pulumi:"project"`
	// Region where the VPC Access connector resides. If it is not provided, the provider region is used.
	Region pulumi.StringOutput `pulumi:"region"`
	// The fully qualified name of this VPC connector
	SelfLink pulumi.StringOutput `pulumi:"selfLink"`
	// State of the VPC access connector.
	State pulumi.StringOutput `pulumi:"state"`
	// The subnet in which to house the connector
	// Structure is documented below.
	Subnet ConnectorSubnetPtrOutput `pulumi:"subnet"`
}

Serverless VPC Access connector resource.

To get more information about Connector, see:

* [API documentation](https://cloud.google.com/vpc/docs/reference/vpcaccess/rest/v1/projects.locations.connectors) * How-to Guides

## Example Usage ### VPC Access Connector

```go package main

import (

"github.com/pulumi/pulumi-gcp/sdk/v5/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{
			IpCidrRange: pulumi.String("10.8.0.0/28"),
			Network:     pulumi.String("default"),
		})
		if err != nil {
			return err
		}
		return nil
	})
}

``` ### VPC Access Connector Shared VPC

```go package main

import (

"github.com/pulumi/pulumi-gcp/sdk/v5/go/gcp/compute"
"github.com/pulumi/pulumi-gcp/sdk/v5/go/gcp/vpcaccess"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"

)

func main() {
	pulumi.Run(func(ctx *pulumi.Context) error {
		customTestNetwork, err := compute.NewNetwork(ctx, "customTestNetwork", &compute.NetworkArgs{
			AutoCreateSubnetworks: pulumi.Bool(false),
		}, pulumi.Provider(google_beta))
		if err != nil {
			return err
		}
		customTestSubnetwork, err := compute.NewSubnetwork(ctx, "customTestSubnetwork", &compute.SubnetworkArgs{
			IpCidrRange: pulumi.String("10.2.0.0/28"),
			Region:      pulumi.String("us-central1"),
			Network:     customTestNetwork.ID(),
		}, pulumi.Provider(google_beta))
		if err != nil {
			return err
		}
		_, err = vpcaccess.NewConnector(ctx, "connector", &vpcaccess.ConnectorArgs{
			Subnet: &vpcaccess.ConnectorSubnetArgs{
				Name: customTestSubnetwork.Name,
			},
			MachineType: pulumi.String("e2-standard-4"),
		}, pulumi.Provider(google_beta))
		if err != nil {
			return err
		}
		return nil
	})
}

```

## Import

Connector can be imported using any of these accepted formats

```sh

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

```

```sh

$ pulumi import gcp:vpcaccess/connector:Connector default {{project}}/{{region}}/{{name}}

```

```sh

$ pulumi import gcp:vpcaccess/connector:Connector default {{region}}/{{name}}

```

```sh

$ pulumi import gcp:vpcaccess/connector:Connector default {{name}}

```

func GetConnector

func GetConnector(ctx *pulumi.Context,
	name string, id pulumi.IDInput, state *ConnectorState, opts ...pulumi.ResourceOption) (*Connector, error)

GetConnector gets an existing Connector resource's state with the given name, ID, and optional state properties that are used to uniquely qualify the lookup (nil if not required).

func NewConnector

func NewConnector(ctx *pulumi.Context,
	name string, args *ConnectorArgs, opts ...pulumi.ResourceOption) (*Connector, error)

NewConnector registers a new resource with the given unique name, arguments, and options.

func (*Connector) ElementType

func (*Connector) ElementType() reflect.Type

func (*Connector) ToConnectorOutput

func (i *Connector) ToConnectorOutput() ConnectorOutput

func (*Connector) ToConnectorOutputWithContext

func (i *Connector) ToConnectorOutputWithContext(ctx context.Context) ConnectorOutput

func (*Connector) ToConnectorPtrOutput

func (i *Connector) ToConnectorPtrOutput() ConnectorPtrOutput

func (*Connector) ToConnectorPtrOutputWithContext

func (i *Connector) ToConnectorPtrOutputWithContext(ctx context.Context) ConnectorPtrOutput

type ConnectorArgs

type ConnectorArgs struct {
	// The range of internal addresses that follows RFC 4632 notation. Example: `10.132.0.0/28`.
	IpCidrRange pulumi.StringPtrInput
	// Machine type of VM Instance underlying connector. Default is e2-micro
	MachineType pulumi.StringPtrInput
	// Maximum value of instances in autoscaling group underlying the connector.
	MaxInstances pulumi.IntPtrInput
	// Maximum throughput of the connector in Mbps, must be greater than `minThroughput`. Default is 300.
	MaxThroughput pulumi.IntPtrInput
	// Minimum value of instances in autoscaling group underlying the connector.
	MinInstances pulumi.IntPtrInput
	// Minimum throughput of the connector in Mbps. Default and min is 200.
	MinThroughput pulumi.IntPtrInput
	// 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}"
	Name pulumi.StringPtrInput
	// Name of the VPC network. Required if `ipCidrRange` is set.
	Network pulumi.StringPtrInput
	// The ID of the project in which the resource belongs.
	// If it is not provided, the provider project is used.
	Project pulumi.StringPtrInput
	// Region where the VPC Access connector resides. If it is not provided, the provider region is used.
	Region pulumi.StringPtrInput
	// The subnet in which to house the connector
	// Structure is documented below.
	Subnet ConnectorSubnetPtrInput
}

The set of arguments for constructing a Connector resource.

func (ConnectorArgs) ElementType

func (ConnectorArgs) ElementType() reflect.Type

type ConnectorArray

type ConnectorArray []ConnectorInput

func (ConnectorArray) ElementType

func (ConnectorArray) ElementType() reflect.Type

func (ConnectorArray) ToConnectorArrayOutput

func (i ConnectorArray) ToConnectorArrayOutput() ConnectorArrayOutput

func (ConnectorArray) ToConnectorArrayOutputWithContext

func (i ConnectorArray) ToConnectorArrayOutputWithContext(ctx context.Context) ConnectorArrayOutput

type ConnectorArrayInput

type ConnectorArrayInput interface {
	pulumi.Input

	ToConnectorArrayOutput() ConnectorArrayOutput
	ToConnectorArrayOutputWithContext(context.Context) ConnectorArrayOutput
}

ConnectorArrayInput is an input type that accepts ConnectorArray and ConnectorArrayOutput values. You can construct a concrete instance of `ConnectorArrayInput` via:

ConnectorArray{ ConnectorArgs{...} }

type ConnectorArrayOutput

type ConnectorArrayOutput struct{ *pulumi.OutputState }

func (ConnectorArrayOutput) ElementType

func (ConnectorArrayOutput) ElementType() reflect.Type

func (ConnectorArrayOutput) Index

func (ConnectorArrayOutput) ToConnectorArrayOutput

func (o ConnectorArrayOutput) ToConnectorArrayOutput() ConnectorArrayOutput

func (ConnectorArrayOutput) ToConnectorArrayOutputWithContext

func (o ConnectorArrayOutput) ToConnectorArrayOutputWithContext(ctx context.Context) ConnectorArrayOutput

type ConnectorInput

type ConnectorInput interface {
	pulumi.Input

	ToConnectorOutput() ConnectorOutput
	ToConnectorOutputWithContext(ctx context.Context) ConnectorOutput
}

type ConnectorMap

type ConnectorMap map[string]ConnectorInput

func (ConnectorMap) ElementType

func (ConnectorMap) ElementType() reflect.Type

func (ConnectorMap) ToConnectorMapOutput

func (i ConnectorMap) ToConnectorMapOutput() ConnectorMapOutput

func (ConnectorMap) ToConnectorMapOutputWithContext

func (i ConnectorMap) ToConnectorMapOutputWithContext(ctx context.Context) ConnectorMapOutput

type ConnectorMapInput

type ConnectorMapInput interface {
	pulumi.Input

	ToConnectorMapOutput() ConnectorMapOutput
	ToConnectorMapOutputWithContext(context.Context) ConnectorMapOutput
}

ConnectorMapInput is an input type that accepts ConnectorMap and ConnectorMapOutput values. You can construct a concrete instance of `ConnectorMapInput` via:

ConnectorMap{ "key": ConnectorArgs{...} }

type ConnectorMapOutput

type ConnectorMapOutput struct{ *pulumi.OutputState }

func (ConnectorMapOutput) ElementType

func (ConnectorMapOutput) ElementType() reflect.Type

func (ConnectorMapOutput) MapIndex

func (ConnectorMapOutput) ToConnectorMapOutput

func (o ConnectorMapOutput) ToConnectorMapOutput() ConnectorMapOutput

func (ConnectorMapOutput) ToConnectorMapOutputWithContext

func (o ConnectorMapOutput) ToConnectorMapOutputWithContext(ctx context.Context) ConnectorMapOutput

type ConnectorOutput

type ConnectorOutput struct{ *pulumi.OutputState }

func (ConnectorOutput) ElementType

func (ConnectorOutput) ElementType() reflect.Type

func (ConnectorOutput) ToConnectorOutput

func (o ConnectorOutput) ToConnectorOutput() ConnectorOutput

func (ConnectorOutput) ToConnectorOutputWithContext

func (o ConnectorOutput) ToConnectorOutputWithContext(ctx context.Context) ConnectorOutput

func (ConnectorOutput) ToConnectorPtrOutput

func (o ConnectorOutput) ToConnectorPtrOutput() ConnectorPtrOutput

func (ConnectorOutput) ToConnectorPtrOutputWithContext

func (o ConnectorOutput) ToConnectorPtrOutputWithContext(ctx context.Context) ConnectorPtrOutput

type ConnectorPtrInput

type ConnectorPtrInput interface {
	pulumi.Input

	ToConnectorPtrOutput() ConnectorPtrOutput
	ToConnectorPtrOutputWithContext(ctx context.Context) ConnectorPtrOutput
}

type ConnectorPtrOutput

type ConnectorPtrOutput struct{ *pulumi.OutputState }

func (ConnectorPtrOutput) Elem added in v5.21.0

func (ConnectorPtrOutput) ElementType

func (ConnectorPtrOutput) ElementType() reflect.Type

func (ConnectorPtrOutput) ToConnectorPtrOutput

func (o ConnectorPtrOutput) ToConnectorPtrOutput() ConnectorPtrOutput

func (ConnectorPtrOutput) ToConnectorPtrOutputWithContext

func (o ConnectorPtrOutput) ToConnectorPtrOutputWithContext(ctx context.Context) ConnectorPtrOutput

type ConnectorState

type ConnectorState struct {
	// The range of internal addresses that follows RFC 4632 notation. Example: `10.132.0.0/28`.
	IpCidrRange pulumi.StringPtrInput
	// Machine type of VM Instance underlying connector. Default is e2-micro
	MachineType pulumi.StringPtrInput
	// Maximum value of instances in autoscaling group underlying the connector.
	MaxInstances pulumi.IntPtrInput
	// Maximum throughput of the connector in Mbps, must be greater than `minThroughput`. Default is 300.
	MaxThroughput pulumi.IntPtrInput
	// Minimum value of instances in autoscaling group underlying the connector.
	MinInstances pulumi.IntPtrInput
	// Minimum throughput of the connector in Mbps. Default and min is 200.
	MinThroughput pulumi.IntPtrInput
	// 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}"
	Name pulumi.StringPtrInput
	// Name of the VPC network. Required if `ipCidrRange` is set.
	Network pulumi.StringPtrInput
	// The ID of the project in which the resource belongs.
	// If it is not provided, the provider project is used.
	Project pulumi.StringPtrInput
	// Region where the VPC Access connector resides. If it is not provided, the provider region is used.
	Region pulumi.StringPtrInput
	// The fully qualified name of this VPC connector
	SelfLink pulumi.StringPtrInput
	// State of the VPC access connector.
	State pulumi.StringPtrInput
	// The subnet in which to house the connector
	// Structure is documented below.
	Subnet ConnectorSubnetPtrInput
}

func (ConnectorState) ElementType

func (ConnectorState) ElementType() reflect.Type

type ConnectorSubnet

type ConnectorSubnet struct {
	// 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}"
	Name *string `pulumi:"name"`
	// 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.
	ProjectId *string `pulumi:"projectId"`
}

type ConnectorSubnetArgs

type ConnectorSubnetArgs struct {
	// 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}"
	Name pulumi.StringPtrInput `pulumi:"name"`
	// 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.
	ProjectId pulumi.StringPtrInput `pulumi:"projectId"`
}

func (ConnectorSubnetArgs) ElementType

func (ConnectorSubnetArgs) ElementType() reflect.Type

func (ConnectorSubnetArgs) ToConnectorSubnetOutput

func (i ConnectorSubnetArgs) ToConnectorSubnetOutput() ConnectorSubnetOutput

func (ConnectorSubnetArgs) ToConnectorSubnetOutputWithContext

func (i ConnectorSubnetArgs) ToConnectorSubnetOutputWithContext(ctx context.Context) ConnectorSubnetOutput

func (ConnectorSubnetArgs) ToConnectorSubnetPtrOutput

func (i ConnectorSubnetArgs) ToConnectorSubnetPtrOutput() ConnectorSubnetPtrOutput

func (ConnectorSubnetArgs) ToConnectorSubnetPtrOutputWithContext

func (i ConnectorSubnetArgs) ToConnectorSubnetPtrOutputWithContext(ctx context.Context) ConnectorSubnetPtrOutput

type ConnectorSubnetInput

type ConnectorSubnetInput interface {
	pulumi.Input

	ToConnectorSubnetOutput() ConnectorSubnetOutput
	ToConnectorSubnetOutputWithContext(context.Context) ConnectorSubnetOutput
}

ConnectorSubnetInput is an input type that accepts ConnectorSubnetArgs and ConnectorSubnetOutput values. You can construct a concrete instance of `ConnectorSubnetInput` via:

ConnectorSubnetArgs{...}

type ConnectorSubnetOutput

type ConnectorSubnetOutput struct{ *pulumi.OutputState }

func (ConnectorSubnetOutput) ElementType

func (ConnectorSubnetOutput) ElementType() reflect.Type

func (ConnectorSubnetOutput) Name

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}"

func (ConnectorSubnetOutput) ProjectId

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.

func (ConnectorSubnetOutput) ToConnectorSubnetOutput

func (o ConnectorSubnetOutput) ToConnectorSubnetOutput() ConnectorSubnetOutput

func (ConnectorSubnetOutput) ToConnectorSubnetOutputWithContext

func (o ConnectorSubnetOutput) ToConnectorSubnetOutputWithContext(ctx context.Context) ConnectorSubnetOutput

func (ConnectorSubnetOutput) ToConnectorSubnetPtrOutput

func (o ConnectorSubnetOutput) ToConnectorSubnetPtrOutput() ConnectorSubnetPtrOutput

func (ConnectorSubnetOutput) ToConnectorSubnetPtrOutputWithContext

func (o ConnectorSubnetOutput) ToConnectorSubnetPtrOutputWithContext(ctx context.Context) ConnectorSubnetPtrOutput

type ConnectorSubnetPtrInput

type ConnectorSubnetPtrInput interface {
	pulumi.Input

	ToConnectorSubnetPtrOutput() ConnectorSubnetPtrOutput
	ToConnectorSubnetPtrOutputWithContext(context.Context) ConnectorSubnetPtrOutput
}

ConnectorSubnetPtrInput is an input type that accepts ConnectorSubnetArgs, ConnectorSubnetPtr and ConnectorSubnetPtrOutput values. You can construct a concrete instance of `ConnectorSubnetPtrInput` via:

        ConnectorSubnetArgs{...}

or:

        nil

type ConnectorSubnetPtrOutput

type ConnectorSubnetPtrOutput struct{ *pulumi.OutputState }

func (ConnectorSubnetPtrOutput) Elem

func (ConnectorSubnetPtrOutput) ElementType

func (ConnectorSubnetPtrOutput) ElementType() reflect.Type

func (ConnectorSubnetPtrOutput) Name

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}"

func (ConnectorSubnetPtrOutput) ProjectId

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.

func (ConnectorSubnetPtrOutput) ToConnectorSubnetPtrOutput

func (o ConnectorSubnetPtrOutput) ToConnectorSubnetPtrOutput() ConnectorSubnetPtrOutput

func (ConnectorSubnetPtrOutput) ToConnectorSubnetPtrOutputWithContext

func (o ConnectorSubnetPtrOutput) ToConnectorSubnetPtrOutputWithContext(ctx context.Context) ConnectorSubnetPtrOutput

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL