servicenetworking

package
v8.0.0-alpha.2 Latest Latest
Warning

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

Go to latest
Published: Sep 10, 2024 License: Apache-2.0 Imports: 7 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Connection

type Connection struct {
	pulumi.CustomResourceState

	DeletionPolicy pulumi.StringPtrOutput `pulumi:"deletionPolicy"`
	// Name of VPC network connected with service producers using VPC peering.
	Network pulumi.StringOutput `pulumi:"network"`
	// (Computed) The name of the VPC Network Peering connection that was created by the service producer.
	Peering pulumi.StringOutput `pulumi:"peering"`
	// Named IP address range(s) of PEERING type reserved for
	// this service provider. Note that invoking this method with a different range when connection
	// is already established will not reallocate already provisioned service producer subnetworks.
	ReservedPeeringRanges pulumi.StringArrayOutput `pulumi:"reservedPeeringRanges"`
	// Provider peering service that is managing peering connectivity for a
	// service provider organization. For Google services that support this functionality it is
	// 'servicenetworking.googleapis.com'.
	Service pulumi.StringOutput `pulumi:"service"`
	// When set to true, enforce an update of the reserved peering ranges on the existing service networking connection in case of a new connection creation failure.
	UpdateOnCreationFail pulumi.BoolPtrOutput `pulumi:"updateOnCreationFail"`
}

Manages a private VPC connection with a GCP service provider. For more information see [the official documentation](https://cloud.google.com/vpc/docs/configure-private-services-access#creating-connection) and [API](https://cloud.google.com/service-infrastructure/docs/service-networking/reference/rest/v1/services.connections).

## Example Usage

```go package main

import (

"github.com/pulumi/pulumi-gcp/sdk/v8/go/gcp/compute"
"github.com/pulumi/pulumi-gcp/sdk/v8/go/gcp/servicenetworking"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"

)

func main() {
	pulumi.Run(func(ctx *pulumi.Context) error {
		// Create a VPC network
		peeringNetwork, err := compute.NewNetwork(ctx, "peering_network", &compute.NetworkArgs{
			Name: pulumi.String("peering-network"),
		})
		if err != nil {
			return err
		}
		// Create an IP address
		privateIpAlloc, err := compute.NewGlobalAddress(ctx, "private_ip_alloc", &compute.GlobalAddressArgs{
			Name:         pulumi.String("private-ip-alloc"),
			Purpose:      pulumi.String("VPC_PEERING"),
			AddressType:  pulumi.String("INTERNAL"),
			PrefixLength: pulumi.Int(16),
			Network:      peeringNetwork.ID(),
		})
		if err != nil {
			return err
		}
		// Create a private connection
		_, err = servicenetworking.NewConnection(ctx, "default", &servicenetworking.ConnectionArgs{
			Network: peeringNetwork.ID(),
			Service: pulumi.String("servicenetworking.googleapis.com"),
			ReservedPeeringRanges: pulumi.StringArray{
				privateIpAlloc.Name,
			},
		})
		if err != nil {
			return err
		}
		// (Optional) Import or export custom routes
		_, err = compute.NewNetworkPeeringRoutesConfig(ctx, "peering_routes", &compute.NetworkPeeringRoutesConfigArgs{
			Peering:            _default.Peering,
			Network:            peeringNetwork.Name,
			ImportCustomRoutes: pulumi.Bool(true),
			ExportCustomRoutes: pulumi.Bool(true),
		})
		if err != nil {
			return err
		}
		return nil
	})
}

```

## Import

ServiceNetworkingConnection can be imported using any of these accepted formats

* `{{peering-network}}:{{service}}`

* `projects/{{project}}/global/networks/{{peering-network}}:{{service}}`

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

```sh $ pulumi import gcp:servicenetworking/connection:Connection default {{peering-network}}:{{service}} ```

```sh $ pulumi import gcp:servicenetworking/connection:Connection default /projects/{{project}}/global/networks/{{peering-network}}:{{service}} ```

func GetConnection

func GetConnection(ctx *pulumi.Context,
	name string, id pulumi.IDInput, state *ConnectionState, opts ...pulumi.ResourceOption) (*Connection, error)

GetConnection gets an existing Connection 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 NewConnection

func NewConnection(ctx *pulumi.Context,
	name string, args *ConnectionArgs, opts ...pulumi.ResourceOption) (*Connection, error)

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

func (*Connection) ElementType

func (*Connection) ElementType() reflect.Type

func (*Connection) ToConnectionOutput

func (i *Connection) ToConnectionOutput() ConnectionOutput

func (*Connection) ToConnectionOutputWithContext

func (i *Connection) ToConnectionOutputWithContext(ctx context.Context) ConnectionOutput

type ConnectionArgs

type ConnectionArgs struct {
	DeletionPolicy pulumi.StringPtrInput
	// Name of VPC network connected with service producers using VPC peering.
	Network pulumi.StringInput
	// Named IP address range(s) of PEERING type reserved for
	// this service provider. Note that invoking this method with a different range when connection
	// is already established will not reallocate already provisioned service producer subnetworks.
	ReservedPeeringRanges pulumi.StringArrayInput
	// Provider peering service that is managing peering connectivity for a
	// service provider organization. For Google services that support this functionality it is
	// 'servicenetworking.googleapis.com'.
	Service pulumi.StringInput
	// When set to true, enforce an update of the reserved peering ranges on the existing service networking connection in case of a new connection creation failure.
	UpdateOnCreationFail pulumi.BoolPtrInput
}

The set of arguments for constructing a Connection resource.

func (ConnectionArgs) ElementType

func (ConnectionArgs) ElementType() reflect.Type

type ConnectionArray

type ConnectionArray []ConnectionInput

func (ConnectionArray) ElementType

func (ConnectionArray) ElementType() reflect.Type

func (ConnectionArray) ToConnectionArrayOutput

func (i ConnectionArray) ToConnectionArrayOutput() ConnectionArrayOutput

func (ConnectionArray) ToConnectionArrayOutputWithContext

func (i ConnectionArray) ToConnectionArrayOutputWithContext(ctx context.Context) ConnectionArrayOutput

type ConnectionArrayInput

type ConnectionArrayInput interface {
	pulumi.Input

	ToConnectionArrayOutput() ConnectionArrayOutput
	ToConnectionArrayOutputWithContext(context.Context) ConnectionArrayOutput
}

ConnectionArrayInput is an input type that accepts ConnectionArray and ConnectionArrayOutput values. You can construct a concrete instance of `ConnectionArrayInput` via:

ConnectionArray{ ConnectionArgs{...} }

type ConnectionArrayOutput

type ConnectionArrayOutput struct{ *pulumi.OutputState }

func (ConnectionArrayOutput) ElementType

func (ConnectionArrayOutput) ElementType() reflect.Type

func (ConnectionArrayOutput) Index

func (ConnectionArrayOutput) ToConnectionArrayOutput

func (o ConnectionArrayOutput) ToConnectionArrayOutput() ConnectionArrayOutput

func (ConnectionArrayOutput) ToConnectionArrayOutputWithContext

func (o ConnectionArrayOutput) ToConnectionArrayOutputWithContext(ctx context.Context) ConnectionArrayOutput

type ConnectionInput

type ConnectionInput interface {
	pulumi.Input

	ToConnectionOutput() ConnectionOutput
	ToConnectionOutputWithContext(ctx context.Context) ConnectionOutput
}

type ConnectionMap

type ConnectionMap map[string]ConnectionInput

func (ConnectionMap) ElementType

func (ConnectionMap) ElementType() reflect.Type

func (ConnectionMap) ToConnectionMapOutput

func (i ConnectionMap) ToConnectionMapOutput() ConnectionMapOutput

func (ConnectionMap) ToConnectionMapOutputWithContext

func (i ConnectionMap) ToConnectionMapOutputWithContext(ctx context.Context) ConnectionMapOutput

type ConnectionMapInput

type ConnectionMapInput interface {
	pulumi.Input

	ToConnectionMapOutput() ConnectionMapOutput
	ToConnectionMapOutputWithContext(context.Context) ConnectionMapOutput
}

ConnectionMapInput is an input type that accepts ConnectionMap and ConnectionMapOutput values. You can construct a concrete instance of `ConnectionMapInput` via:

ConnectionMap{ "key": ConnectionArgs{...} }

type ConnectionMapOutput

type ConnectionMapOutput struct{ *pulumi.OutputState }

func (ConnectionMapOutput) ElementType

func (ConnectionMapOutput) ElementType() reflect.Type

func (ConnectionMapOutput) MapIndex

func (ConnectionMapOutput) ToConnectionMapOutput

func (o ConnectionMapOutput) ToConnectionMapOutput() ConnectionMapOutput

func (ConnectionMapOutput) ToConnectionMapOutputWithContext

func (o ConnectionMapOutput) ToConnectionMapOutputWithContext(ctx context.Context) ConnectionMapOutput

type ConnectionOutput

type ConnectionOutput struct{ *pulumi.OutputState }

func (ConnectionOutput) DeletionPolicy

func (o ConnectionOutput) DeletionPolicy() pulumi.StringPtrOutput

func (ConnectionOutput) ElementType

func (ConnectionOutput) ElementType() reflect.Type

func (ConnectionOutput) Network

func (o ConnectionOutput) Network() pulumi.StringOutput

Name of VPC network connected with service producers using VPC peering.

func (ConnectionOutput) Peering

func (o ConnectionOutput) Peering() pulumi.StringOutput

(Computed) The name of the VPC Network Peering connection that was created by the service producer.

func (ConnectionOutput) ReservedPeeringRanges

func (o ConnectionOutput) ReservedPeeringRanges() pulumi.StringArrayOutput

Named IP address range(s) of PEERING type reserved for this service provider. Note that invoking this method with a different range when connection is already established will not reallocate already provisioned service producer subnetworks.

func (ConnectionOutput) Service

func (o ConnectionOutput) Service() pulumi.StringOutput

Provider peering service that is managing peering connectivity for a service provider organization. For Google services that support this functionality it is 'servicenetworking.googleapis.com'.

func (ConnectionOutput) ToConnectionOutput

func (o ConnectionOutput) ToConnectionOutput() ConnectionOutput

func (ConnectionOutput) ToConnectionOutputWithContext

func (o ConnectionOutput) ToConnectionOutputWithContext(ctx context.Context) ConnectionOutput

func (ConnectionOutput) UpdateOnCreationFail

func (o ConnectionOutput) UpdateOnCreationFail() pulumi.BoolPtrOutput

When set to true, enforce an update of the reserved peering ranges on the existing service networking connection in case of a new connection creation failure.

type ConnectionState

type ConnectionState struct {
	DeletionPolicy pulumi.StringPtrInput
	// Name of VPC network connected with service producers using VPC peering.
	Network pulumi.StringPtrInput
	// (Computed) The name of the VPC Network Peering connection that was created by the service producer.
	Peering pulumi.StringPtrInput
	// Named IP address range(s) of PEERING type reserved for
	// this service provider. Note that invoking this method with a different range when connection
	// is already established will not reallocate already provisioned service producer subnetworks.
	ReservedPeeringRanges pulumi.StringArrayInput
	// Provider peering service that is managing peering connectivity for a
	// service provider organization. For Google services that support this functionality it is
	// 'servicenetworking.googleapis.com'.
	Service pulumi.StringPtrInput
	// When set to true, enforce an update of the reserved peering ranges on the existing service networking connection in case of a new connection creation failure.
	UpdateOnCreationFail pulumi.BoolPtrInput
}

func (ConnectionState) ElementType

func (ConnectionState) ElementType() reflect.Type

type LookupPeeredDnsDomainArgs

type LookupPeeredDnsDomainArgs struct {
	Name    string `pulumi:"name"`
	Network string `pulumi:"network"`
	Project string `pulumi:"project"`
	Service string `pulumi:"service"`
}

A collection of arguments for invoking getPeeredDnsDomain.

type LookupPeeredDnsDomainOutputArgs

type LookupPeeredDnsDomainOutputArgs struct {
	Name    pulumi.StringInput `pulumi:"name"`
	Network pulumi.StringInput `pulumi:"network"`
	Project pulumi.StringInput `pulumi:"project"`
	Service pulumi.StringInput `pulumi:"service"`
}

A collection of arguments for invoking getPeeredDnsDomain.

func (LookupPeeredDnsDomainOutputArgs) ElementType

type LookupPeeredDnsDomainResult

type LookupPeeredDnsDomainResult struct {
	DnsSuffix string `pulumi:"dnsSuffix"`
	// The provider-assigned unique ID for this managed resource.
	Id      string `pulumi:"id"`
	Name    string `pulumi:"name"`
	Network string `pulumi:"network"`
	Parent  string `pulumi:"parent"`
	Project string `pulumi:"project"`
	Service string `pulumi:"service"`
}

A collection of values returned by getPeeredDnsDomain.

type LookupPeeredDnsDomainResultOutput

type LookupPeeredDnsDomainResultOutput struct{ *pulumi.OutputState }

A collection of values returned by getPeeredDnsDomain.

func (LookupPeeredDnsDomainResultOutput) DnsSuffix

func (LookupPeeredDnsDomainResultOutput) ElementType

func (LookupPeeredDnsDomainResultOutput) Id

The provider-assigned unique ID for this managed resource.

func (LookupPeeredDnsDomainResultOutput) Name

func (LookupPeeredDnsDomainResultOutput) Network

func (LookupPeeredDnsDomainResultOutput) Parent

func (LookupPeeredDnsDomainResultOutput) Project

func (LookupPeeredDnsDomainResultOutput) Service

func (LookupPeeredDnsDomainResultOutput) ToLookupPeeredDnsDomainResultOutput

func (o LookupPeeredDnsDomainResultOutput) ToLookupPeeredDnsDomainResultOutput() LookupPeeredDnsDomainResultOutput

func (LookupPeeredDnsDomainResultOutput) ToLookupPeeredDnsDomainResultOutputWithContext

func (o LookupPeeredDnsDomainResultOutput) ToLookupPeeredDnsDomainResultOutputWithContext(ctx context.Context) LookupPeeredDnsDomainResultOutput

type PeeredDnsDomain

type PeeredDnsDomain struct {
	pulumi.CustomResourceState

	// The DNS domain suffix of the peered DNS domain. Make sure to suffix with a `.` (dot).
	DnsSuffix pulumi.StringOutput `pulumi:"dnsSuffix"`
	// Internal name used for the peered DNS domain.
	Name pulumi.StringOutput `pulumi:"name"`
	// The network in the consumer project.
	Network pulumi.StringOutput `pulumi:"network"`
	// an identifier for the resource with format `services/{{service}}/projects/{{project}}/global/networks/{{network}}`
	Parent pulumi.StringOutput `pulumi:"parent"`
	// The producer project number. If not provided, the provider project is used.
	Project pulumi.StringOutput `pulumi:"project"`
	// Private service connection between service and consumer network, defaults to `servicenetworking.googleapis.com`
	Service pulumi.StringPtrOutput `pulumi:"service"`
}

Allows management of a single peered DNS domain for an existing Google Cloud Platform project.

When using Google Cloud DNS to manage internal DNS, create peered DNS domains to make your DNS available to services like Google Cloud Build.

## Example Usage

```go package main

import (

"github.com/pulumi/pulumi-gcp/sdk/v8/go/gcp/servicenetworking"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"

)

func main() {
	pulumi.Run(func(ctx *pulumi.Context) error {
		_, err := servicenetworking.NewPeeredDnsDomain(ctx, "name", &servicenetworking.PeeredDnsDomainArgs{
			Project:   pulumi.String("10000000"),
			Name:      pulumi.String("example-com"),
			Network:   pulumi.String("default"),
			DnsSuffix: pulumi.String("example.com."),
			Service:   pulumi.String("peering-service"),
		})
		if err != nil {
			return err
		}
		return nil
	})
}

```

## Import

Project peered DNS domains can be imported using the `service`, `project`, `network` and `name`, where:

- `service` is the service connection, defaults to `servicenetworking.googleapis.com`.

- `project` is the producer project name.

- `network` is the consumer network name.

- `name` is the name of your peered DNS domain.

* `services/{service}/projects/{project}/global/networks/{network}/peeredDnsDomains/{name}`

When using the `pulumi import` command, project peered DNS domains can be imported using one of the formats above. For example:

```sh $ pulumi import gcp:servicenetworking/peeredDnsDomain:PeeredDnsDomain default services/{service}/projects/{project}/global/networks/{network}/peeredDnsDomains/{name} ```

func GetPeeredDnsDomain

func GetPeeredDnsDomain(ctx *pulumi.Context,
	name string, id pulumi.IDInput, state *PeeredDnsDomainState, opts ...pulumi.ResourceOption) (*PeeredDnsDomain, error)

GetPeeredDnsDomain gets an existing PeeredDnsDomain 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 NewPeeredDnsDomain

func NewPeeredDnsDomain(ctx *pulumi.Context,
	name string, args *PeeredDnsDomainArgs, opts ...pulumi.ResourceOption) (*PeeredDnsDomain, error)

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

func (*PeeredDnsDomain) ElementType

func (*PeeredDnsDomain) ElementType() reflect.Type

func (*PeeredDnsDomain) ToPeeredDnsDomainOutput

func (i *PeeredDnsDomain) ToPeeredDnsDomainOutput() PeeredDnsDomainOutput

func (*PeeredDnsDomain) ToPeeredDnsDomainOutputWithContext

func (i *PeeredDnsDomain) ToPeeredDnsDomainOutputWithContext(ctx context.Context) PeeredDnsDomainOutput

type PeeredDnsDomainArgs

type PeeredDnsDomainArgs struct {
	// The DNS domain suffix of the peered DNS domain. Make sure to suffix with a `.` (dot).
	DnsSuffix pulumi.StringInput
	// Internal name used for the peered DNS domain.
	Name pulumi.StringPtrInput
	// The network in the consumer project.
	Network pulumi.StringInput
	// The producer project number. If not provided, the provider project is used.
	Project pulumi.StringPtrInput
	// Private service connection between service and consumer network, defaults to `servicenetworking.googleapis.com`
	Service pulumi.StringPtrInput
}

The set of arguments for constructing a PeeredDnsDomain resource.

func (PeeredDnsDomainArgs) ElementType

func (PeeredDnsDomainArgs) ElementType() reflect.Type

type PeeredDnsDomainArray

type PeeredDnsDomainArray []PeeredDnsDomainInput

func (PeeredDnsDomainArray) ElementType

func (PeeredDnsDomainArray) ElementType() reflect.Type

func (PeeredDnsDomainArray) ToPeeredDnsDomainArrayOutput

func (i PeeredDnsDomainArray) ToPeeredDnsDomainArrayOutput() PeeredDnsDomainArrayOutput

func (PeeredDnsDomainArray) ToPeeredDnsDomainArrayOutputWithContext

func (i PeeredDnsDomainArray) ToPeeredDnsDomainArrayOutputWithContext(ctx context.Context) PeeredDnsDomainArrayOutput

type PeeredDnsDomainArrayInput

type PeeredDnsDomainArrayInput interface {
	pulumi.Input

	ToPeeredDnsDomainArrayOutput() PeeredDnsDomainArrayOutput
	ToPeeredDnsDomainArrayOutputWithContext(context.Context) PeeredDnsDomainArrayOutput
}

PeeredDnsDomainArrayInput is an input type that accepts PeeredDnsDomainArray and PeeredDnsDomainArrayOutput values. You can construct a concrete instance of `PeeredDnsDomainArrayInput` via:

PeeredDnsDomainArray{ PeeredDnsDomainArgs{...} }

type PeeredDnsDomainArrayOutput

type PeeredDnsDomainArrayOutput struct{ *pulumi.OutputState }

func (PeeredDnsDomainArrayOutput) ElementType

func (PeeredDnsDomainArrayOutput) ElementType() reflect.Type

func (PeeredDnsDomainArrayOutput) Index

func (PeeredDnsDomainArrayOutput) ToPeeredDnsDomainArrayOutput

func (o PeeredDnsDomainArrayOutput) ToPeeredDnsDomainArrayOutput() PeeredDnsDomainArrayOutput

func (PeeredDnsDomainArrayOutput) ToPeeredDnsDomainArrayOutputWithContext

func (o PeeredDnsDomainArrayOutput) ToPeeredDnsDomainArrayOutputWithContext(ctx context.Context) PeeredDnsDomainArrayOutput

type PeeredDnsDomainInput

type PeeredDnsDomainInput interface {
	pulumi.Input

	ToPeeredDnsDomainOutput() PeeredDnsDomainOutput
	ToPeeredDnsDomainOutputWithContext(ctx context.Context) PeeredDnsDomainOutput
}

type PeeredDnsDomainMap

type PeeredDnsDomainMap map[string]PeeredDnsDomainInput

func (PeeredDnsDomainMap) ElementType

func (PeeredDnsDomainMap) ElementType() reflect.Type

func (PeeredDnsDomainMap) ToPeeredDnsDomainMapOutput

func (i PeeredDnsDomainMap) ToPeeredDnsDomainMapOutput() PeeredDnsDomainMapOutput

func (PeeredDnsDomainMap) ToPeeredDnsDomainMapOutputWithContext

func (i PeeredDnsDomainMap) ToPeeredDnsDomainMapOutputWithContext(ctx context.Context) PeeredDnsDomainMapOutput

type PeeredDnsDomainMapInput

type PeeredDnsDomainMapInput interface {
	pulumi.Input

	ToPeeredDnsDomainMapOutput() PeeredDnsDomainMapOutput
	ToPeeredDnsDomainMapOutputWithContext(context.Context) PeeredDnsDomainMapOutput
}

PeeredDnsDomainMapInput is an input type that accepts PeeredDnsDomainMap and PeeredDnsDomainMapOutput values. You can construct a concrete instance of `PeeredDnsDomainMapInput` via:

PeeredDnsDomainMap{ "key": PeeredDnsDomainArgs{...} }

type PeeredDnsDomainMapOutput

type PeeredDnsDomainMapOutput struct{ *pulumi.OutputState }

func (PeeredDnsDomainMapOutput) ElementType

func (PeeredDnsDomainMapOutput) ElementType() reflect.Type

func (PeeredDnsDomainMapOutput) MapIndex

func (PeeredDnsDomainMapOutput) ToPeeredDnsDomainMapOutput

func (o PeeredDnsDomainMapOutput) ToPeeredDnsDomainMapOutput() PeeredDnsDomainMapOutput

func (PeeredDnsDomainMapOutput) ToPeeredDnsDomainMapOutputWithContext

func (o PeeredDnsDomainMapOutput) ToPeeredDnsDomainMapOutputWithContext(ctx context.Context) PeeredDnsDomainMapOutput

type PeeredDnsDomainOutput

type PeeredDnsDomainOutput struct{ *pulumi.OutputState }

func (PeeredDnsDomainOutput) DnsSuffix

The DNS domain suffix of the peered DNS domain. Make sure to suffix with a `.` (dot).

func (PeeredDnsDomainOutput) ElementType

func (PeeredDnsDomainOutput) ElementType() reflect.Type

func (PeeredDnsDomainOutput) Name

Internal name used for the peered DNS domain.

func (PeeredDnsDomainOutput) Network

The network in the consumer project.

func (PeeredDnsDomainOutput) Parent

an identifier for the resource with format `services/{{service}}/projects/{{project}}/global/networks/{{network}}`

func (PeeredDnsDomainOutput) Project

The producer project number. If not provided, the provider project is used.

func (PeeredDnsDomainOutput) Service

Private service connection between service and consumer network, defaults to `servicenetworking.googleapis.com`

func (PeeredDnsDomainOutput) ToPeeredDnsDomainOutput

func (o PeeredDnsDomainOutput) ToPeeredDnsDomainOutput() PeeredDnsDomainOutput

func (PeeredDnsDomainOutput) ToPeeredDnsDomainOutputWithContext

func (o PeeredDnsDomainOutput) ToPeeredDnsDomainOutputWithContext(ctx context.Context) PeeredDnsDomainOutput

type PeeredDnsDomainState

type PeeredDnsDomainState struct {
	// The DNS domain suffix of the peered DNS domain. Make sure to suffix with a `.` (dot).
	DnsSuffix pulumi.StringPtrInput
	// Internal name used for the peered DNS domain.
	Name pulumi.StringPtrInput
	// The network in the consumer project.
	Network pulumi.StringPtrInput
	// an identifier for the resource with format `services/{{service}}/projects/{{project}}/global/networks/{{network}}`
	Parent pulumi.StringPtrInput
	// The producer project number. If not provided, the provider project is used.
	Project pulumi.StringPtrInput
	// Private service connection between service and consumer network, defaults to `servicenetworking.googleapis.com`
	Service pulumi.StringPtrInput
}

func (PeeredDnsDomainState) ElementType

func (PeeredDnsDomainState) ElementType() reflect.Type

type VpcServiceControls

type VpcServiceControls struct {
	pulumi.CustomResourceState

	// Desired VPC Service Controls state service producer VPC network, as
	// described at the top of this page.
	Enabled pulumi.BoolOutput `pulumi:"enabled"`
	// The network that the consumer is using to connect with services.
	Network pulumi.StringOutput `pulumi:"network"`
	// The id of the Google Cloud project containing the consumer network.
	Project pulumi.StringPtrOutput `pulumi:"project"`
	// The service that is managing peering connectivity for a service
	// producer's organization. For Google services that support this
	// functionality, this value is `servicenetworking.googleapis.com`.
	//
	// ***
	Service pulumi.StringOutput `pulumi:"service"`
}

Manages the VPC Service Controls configuration for a service networking connection

When enabled, Google Cloud makes the following route configuration changes in the service producer VPC network:

  • Removes the IPv4 default route (destination 0.0.0.0/0, next hop default internet gateway), Google Cloud then creates an IPv4 route for destination 199.36.153.4/30 using the default internet gateway next hop.
  • Creates Cloud DNS managed private zones and authorizes those zones for the service producer VPC network. The zones include googleapis.com, gcr.io, pkg.dev, notebooks.cloud.google.com, kernels.googleusercontent.com, backupdr.cloud.google.com, and backupdr.googleusercontent.com as necessary domains or host names for Google APIs and services that are compatible with VPC Service Controls. Record data in the zones resolves all host names to 199.36.153.4, 199.36.153.5, 199.36.153.6, and 199.36.153.7.

When disabled, Google Cloud makes the following route configuration changes in the service producer VPC network:

  • Restores a default route (destination 0.0.0.0/0, next hop default internet gateway)
  • Deletes the Cloud DNS managed private zones that provided the host name overrides.

To get more information about VPCServiceControls, see:

* [API documentation](https://cloud.google.com/service-infrastructure/docs/service-networking/reference/rest/v1/services) * How-to Guides

> **Note:** Destroying a `servicenetworking.VpcServiceControls` resource will remove it from state, but will not change the underlying VPC Service Controls configuration for the service producer network.

## Example Usage

### Service Networking Vpc Service Controls Basic

```go package main

import (

"github.com/pulumi/pulumi-gcp/sdk/v8/go/gcp/compute"
"github.com/pulumi/pulumi-gcp/sdk/v8/go/gcp/servicenetworking"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"

)

func main() {
	pulumi.Run(func(ctx *pulumi.Context) error {
		// Create a VPC
		_, err := compute.NewNetwork(ctx, "default", &compute.NetworkArgs{
			Name: pulumi.String("example-network"),
		})
		if err != nil {
			return err
		}
		// Create an IP address
		defaultGlobalAddress, err := compute.NewGlobalAddress(ctx, "default", &compute.GlobalAddressArgs{
			Name:         pulumi.String("psa-range"),
			Purpose:      pulumi.String("VPC_PEERING"),
			AddressType:  pulumi.String("INTERNAL"),
			PrefixLength: pulumi.Int(16),
			Network:      _default.ID(),
		})
		if err != nil {
			return err
		}
		// Create a private connection
		defaultConnection, err := servicenetworking.NewConnection(ctx, "default", &servicenetworking.ConnectionArgs{
			Network: _default.ID(),
			Service: pulumi.String("servicenetworking.googleapis.com"),
			ReservedPeeringRanges: pulumi.StringArray{
				defaultGlobalAddress.Name,
			},
		})
		if err != nil {
			return err
		}
		// Enable VPC-SC on the producer network
		_, err = servicenetworking.NewVpcServiceControls(ctx, "default", &servicenetworking.VpcServiceControlsArgs{
			Network: _default.Name,
			Service: pulumi.String("servicenetworking.googleapis.com"),
			Enabled: pulumi.Bool(true),
		}, pulumi.DependsOn([]pulumi.Resource{
			defaultConnection,
		}))
		if err != nil {
			return err
		}
		return nil
	})
}

```

## Import

VPCServiceControls can be imported using any of these accepted formats:

* `services/{{service}}/projects/{{project}}/networks/{{network}}`

* `{{service}}/{{project}}/{{network}}`

* `{{service}}/{{network}}`

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

```sh $ pulumi import gcp:servicenetworking/vpcServiceControls:VpcServiceControls default services/{{service}}/projects/{{project}}/networks/{{network}} ```

```sh $ pulumi import gcp:servicenetworking/vpcServiceControls:VpcServiceControls default {{service}}/{{project}}/{{network}} ```

```sh $ pulumi import gcp:servicenetworking/vpcServiceControls:VpcServiceControls default {{service}}/{{network}} ```

func GetVpcServiceControls

func GetVpcServiceControls(ctx *pulumi.Context,
	name string, id pulumi.IDInput, state *VpcServiceControlsState, opts ...pulumi.ResourceOption) (*VpcServiceControls, error)

GetVpcServiceControls gets an existing VpcServiceControls 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 NewVpcServiceControls

func NewVpcServiceControls(ctx *pulumi.Context,
	name string, args *VpcServiceControlsArgs, opts ...pulumi.ResourceOption) (*VpcServiceControls, error)

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

func (*VpcServiceControls) ElementType

func (*VpcServiceControls) ElementType() reflect.Type

func (*VpcServiceControls) ToVpcServiceControlsOutput

func (i *VpcServiceControls) ToVpcServiceControlsOutput() VpcServiceControlsOutput

func (*VpcServiceControls) ToVpcServiceControlsOutputWithContext

func (i *VpcServiceControls) ToVpcServiceControlsOutputWithContext(ctx context.Context) VpcServiceControlsOutput

type VpcServiceControlsArgs

type VpcServiceControlsArgs struct {
	// Desired VPC Service Controls state service producer VPC network, as
	// described at the top of this page.
	Enabled pulumi.BoolInput
	// The network that the consumer is using to connect with services.
	Network pulumi.StringInput
	// The id of the Google Cloud project containing the consumer network.
	Project pulumi.StringPtrInput
	// The service that is managing peering connectivity for a service
	// producer's organization. For Google services that support this
	// functionality, this value is `servicenetworking.googleapis.com`.
	//
	// ***
	Service pulumi.StringInput
}

The set of arguments for constructing a VpcServiceControls resource.

func (VpcServiceControlsArgs) ElementType

func (VpcServiceControlsArgs) ElementType() reflect.Type

type VpcServiceControlsArray

type VpcServiceControlsArray []VpcServiceControlsInput

func (VpcServiceControlsArray) ElementType

func (VpcServiceControlsArray) ElementType() reflect.Type

func (VpcServiceControlsArray) ToVpcServiceControlsArrayOutput

func (i VpcServiceControlsArray) ToVpcServiceControlsArrayOutput() VpcServiceControlsArrayOutput

func (VpcServiceControlsArray) ToVpcServiceControlsArrayOutputWithContext

func (i VpcServiceControlsArray) ToVpcServiceControlsArrayOutputWithContext(ctx context.Context) VpcServiceControlsArrayOutput

type VpcServiceControlsArrayInput

type VpcServiceControlsArrayInput interface {
	pulumi.Input

	ToVpcServiceControlsArrayOutput() VpcServiceControlsArrayOutput
	ToVpcServiceControlsArrayOutputWithContext(context.Context) VpcServiceControlsArrayOutput
}

VpcServiceControlsArrayInput is an input type that accepts VpcServiceControlsArray and VpcServiceControlsArrayOutput values. You can construct a concrete instance of `VpcServiceControlsArrayInput` via:

VpcServiceControlsArray{ VpcServiceControlsArgs{...} }

type VpcServiceControlsArrayOutput

type VpcServiceControlsArrayOutput struct{ *pulumi.OutputState }

func (VpcServiceControlsArrayOutput) ElementType

func (VpcServiceControlsArrayOutput) Index

func (VpcServiceControlsArrayOutput) ToVpcServiceControlsArrayOutput

func (o VpcServiceControlsArrayOutput) ToVpcServiceControlsArrayOutput() VpcServiceControlsArrayOutput

func (VpcServiceControlsArrayOutput) ToVpcServiceControlsArrayOutputWithContext

func (o VpcServiceControlsArrayOutput) ToVpcServiceControlsArrayOutputWithContext(ctx context.Context) VpcServiceControlsArrayOutput

type VpcServiceControlsInput

type VpcServiceControlsInput interface {
	pulumi.Input

	ToVpcServiceControlsOutput() VpcServiceControlsOutput
	ToVpcServiceControlsOutputWithContext(ctx context.Context) VpcServiceControlsOutput
}

type VpcServiceControlsMap

type VpcServiceControlsMap map[string]VpcServiceControlsInput

func (VpcServiceControlsMap) ElementType

func (VpcServiceControlsMap) ElementType() reflect.Type

func (VpcServiceControlsMap) ToVpcServiceControlsMapOutput

func (i VpcServiceControlsMap) ToVpcServiceControlsMapOutput() VpcServiceControlsMapOutput

func (VpcServiceControlsMap) ToVpcServiceControlsMapOutputWithContext

func (i VpcServiceControlsMap) ToVpcServiceControlsMapOutputWithContext(ctx context.Context) VpcServiceControlsMapOutput

type VpcServiceControlsMapInput

type VpcServiceControlsMapInput interface {
	pulumi.Input

	ToVpcServiceControlsMapOutput() VpcServiceControlsMapOutput
	ToVpcServiceControlsMapOutputWithContext(context.Context) VpcServiceControlsMapOutput
}

VpcServiceControlsMapInput is an input type that accepts VpcServiceControlsMap and VpcServiceControlsMapOutput values. You can construct a concrete instance of `VpcServiceControlsMapInput` via:

VpcServiceControlsMap{ "key": VpcServiceControlsArgs{...} }

type VpcServiceControlsMapOutput

type VpcServiceControlsMapOutput struct{ *pulumi.OutputState }

func (VpcServiceControlsMapOutput) ElementType

func (VpcServiceControlsMapOutput) MapIndex

func (VpcServiceControlsMapOutput) ToVpcServiceControlsMapOutput

func (o VpcServiceControlsMapOutput) ToVpcServiceControlsMapOutput() VpcServiceControlsMapOutput

func (VpcServiceControlsMapOutput) ToVpcServiceControlsMapOutputWithContext

func (o VpcServiceControlsMapOutput) ToVpcServiceControlsMapOutputWithContext(ctx context.Context) VpcServiceControlsMapOutput

type VpcServiceControlsOutput

type VpcServiceControlsOutput struct{ *pulumi.OutputState }

func (VpcServiceControlsOutput) ElementType

func (VpcServiceControlsOutput) ElementType() reflect.Type

func (VpcServiceControlsOutput) Enabled

Desired VPC Service Controls state service producer VPC network, as described at the top of this page.

func (VpcServiceControlsOutput) Network

The network that the consumer is using to connect with services.

func (VpcServiceControlsOutput) Project

The id of the Google Cloud project containing the consumer network.

func (VpcServiceControlsOutput) Service

The service that is managing peering connectivity for a service producer's organization. For Google services that support this functionality, this value is `servicenetworking.googleapis.com`.

***

func (VpcServiceControlsOutput) ToVpcServiceControlsOutput

func (o VpcServiceControlsOutput) ToVpcServiceControlsOutput() VpcServiceControlsOutput

func (VpcServiceControlsOutput) ToVpcServiceControlsOutputWithContext

func (o VpcServiceControlsOutput) ToVpcServiceControlsOutputWithContext(ctx context.Context) VpcServiceControlsOutput

type VpcServiceControlsState

type VpcServiceControlsState struct {
	// Desired VPC Service Controls state service producer VPC network, as
	// described at the top of this page.
	Enabled pulumi.BoolPtrInput
	// The network that the consumer is using to connect with services.
	Network pulumi.StringPtrInput
	// The id of the Google Cloud project containing the consumer network.
	Project pulumi.StringPtrInput
	// The service that is managing peering connectivity for a service
	// producer's organization. For Google services that support this
	// functionality, this value is `servicenetworking.googleapis.com`.
	//
	// ***
	Service pulumi.StringPtrInput
}

func (VpcServiceControlsState) ElementType

func (VpcServiceControlsState) ElementType() reflect.Type

Jump to

Keyboard shortcuts

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