gcp.networkconnectivity.ServiceConnectionPolicy
Explore with Pulumi AI
Manage Service Connection Policies.
To get more information about ServiceConnectionPolicy, see:
- API documentation
- How-to Guides
Example Usage
Network Connectivity Policy Basic
import * as pulumi from "@pulumi/pulumi";
import * as gcp from "@pulumi/gcp";
const producerNet = new gcp.compute.Network("producer_net", {
name: "producer-net",
autoCreateSubnetworks: false,
});
const producerSubnet = new gcp.compute.Subnetwork("producer_subnet", {
name: "producer-subnet",
ipCidrRange: "10.0.0.0/16",
region: "us-central1",
network: producerNet.id,
});
const _default = new gcp.networkconnectivity.ServiceConnectionPolicy("default", {
name: "my-network-connectivity-policy",
location: "us-central1",
serviceClass: "my-basic-service-class",
description: "my basic service connection policy",
network: producerNet.id,
pscConfig: {
subnetworks: [producerSubnet.id],
limit: "2",
},
});
import pulumi
import pulumi_gcp as gcp
producer_net = gcp.compute.Network("producer_net",
name="producer-net",
auto_create_subnetworks=False)
producer_subnet = gcp.compute.Subnetwork("producer_subnet",
name="producer-subnet",
ip_cidr_range="10.0.0.0/16",
region="us-central1",
network=producer_net.id)
default = gcp.networkconnectivity.ServiceConnectionPolicy("default",
name="my-network-connectivity-policy",
location="us-central1",
service_class="my-basic-service-class",
description="my basic service connection policy",
network=producer_net.id,
psc_config=gcp.networkconnectivity.ServiceConnectionPolicyPscConfigArgs(
subnetworks=[producer_subnet.id],
limit="2",
))
package main
import (
"github.com/pulumi/pulumi-gcp/sdk/v7/go/gcp/compute"
"github.com/pulumi/pulumi-gcp/sdk/v7/go/gcp/networkconnectivity"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
producerNet, err := compute.NewNetwork(ctx, "producer_net", &compute.NetworkArgs{
Name: pulumi.String("producer-net"),
AutoCreateSubnetworks: pulumi.Bool(false),
})
if err != nil {
return err
}
producerSubnet, err := compute.NewSubnetwork(ctx, "producer_subnet", &compute.SubnetworkArgs{
Name: pulumi.String("producer-subnet"),
IpCidrRange: pulumi.String("10.0.0.0/16"),
Region: pulumi.String("us-central1"),
Network: producerNet.ID(),
})
if err != nil {
return err
}
_, err = networkconnectivity.NewServiceConnectionPolicy(ctx, "default", &networkconnectivity.ServiceConnectionPolicyArgs{
Name: pulumi.String("my-network-connectivity-policy"),
Location: pulumi.String("us-central1"),
ServiceClass: pulumi.String("my-basic-service-class"),
Description: pulumi.String("my basic service connection policy"),
Network: producerNet.ID(),
PscConfig: &networkconnectivity.ServiceConnectionPolicyPscConfigArgs{
Subnetworks: pulumi.StringArray{
producerSubnet.ID(),
},
Limit: pulumi.String("2"),
},
})
if err != nil {
return err
}
return nil
})
}
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Gcp = Pulumi.Gcp;
return await Deployment.RunAsync(() =>
{
var producerNet = new Gcp.Compute.Network("producer_net", new()
{
Name = "producer-net",
AutoCreateSubnetworks = false,
});
var producerSubnet = new Gcp.Compute.Subnetwork("producer_subnet", new()
{
Name = "producer-subnet",
IpCidrRange = "10.0.0.0/16",
Region = "us-central1",
Network = producerNet.Id,
});
var @default = new Gcp.NetworkConnectivity.ServiceConnectionPolicy("default", new()
{
Name = "my-network-connectivity-policy",
Location = "us-central1",
ServiceClass = "my-basic-service-class",
Description = "my basic service connection policy",
Network = producerNet.Id,
PscConfig = new Gcp.NetworkConnectivity.Inputs.ServiceConnectionPolicyPscConfigArgs
{
Subnetworks = new[]
{
producerSubnet.Id,
},
Limit = "2",
},
});
});
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.gcp.compute.Network;
import com.pulumi.gcp.compute.NetworkArgs;
import com.pulumi.gcp.compute.Subnetwork;
import com.pulumi.gcp.compute.SubnetworkArgs;
import com.pulumi.gcp.networkconnectivity.ServiceConnectionPolicy;
import com.pulumi.gcp.networkconnectivity.ServiceConnectionPolicyArgs;
import com.pulumi.gcp.networkconnectivity.inputs.ServiceConnectionPolicyPscConfigArgs;
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 producerNet = new Network("producerNet", NetworkArgs.builder()
.name("producer-net")
.autoCreateSubnetworks(false)
.build());
var producerSubnet = new Subnetwork("producerSubnet", SubnetworkArgs.builder()
.name("producer-subnet")
.ipCidrRange("10.0.0.0/16")
.region("us-central1")
.network(producerNet.id())
.build());
var default_ = new ServiceConnectionPolicy("default", ServiceConnectionPolicyArgs.builder()
.name("my-network-connectivity-policy")
.location("us-central1")
.serviceClass("my-basic-service-class")
.description("my basic service connection policy")
.network(producerNet.id())
.pscConfig(ServiceConnectionPolicyPscConfigArgs.builder()
.subnetworks(producerSubnet.id())
.limit(2)
.build())
.build());
}
}
resources:
producerNet:
type: gcp:compute:Network
name: producer_net
properties:
name: producer-net
autoCreateSubnetworks: false
producerSubnet:
type: gcp:compute:Subnetwork
name: producer_subnet
properties:
name: producer-subnet
ipCidrRange: 10.0.0.0/16
region: us-central1
network: ${producerNet.id}
default:
type: gcp:networkconnectivity:ServiceConnectionPolicy
properties:
name: my-network-connectivity-policy
location: us-central1
serviceClass: my-basic-service-class
description: my basic service connection policy
network: ${producerNet.id}
pscConfig:
subnetworks:
- ${producerSubnet.id}
limit: 2
Create ServiceConnectionPolicy Resource
Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.
Constructor syntax
new ServiceConnectionPolicy(name: string, args: ServiceConnectionPolicyArgs, opts?: CustomResourceOptions);
@overload
def ServiceConnectionPolicy(resource_name: str,
args: ServiceConnectionPolicyArgs,
opts: Optional[ResourceOptions] = None)
@overload
def ServiceConnectionPolicy(resource_name: str,
opts: Optional[ResourceOptions] = None,
location: Optional[str] = None,
network: Optional[str] = None,
service_class: Optional[str] = None,
description: Optional[str] = None,
labels: Optional[Mapping[str, str]] = None,
name: Optional[str] = None,
project: Optional[str] = None,
psc_config: Optional[ServiceConnectionPolicyPscConfigArgs] = None)
func NewServiceConnectionPolicy(ctx *Context, name string, args ServiceConnectionPolicyArgs, opts ...ResourceOption) (*ServiceConnectionPolicy, error)
public ServiceConnectionPolicy(string name, ServiceConnectionPolicyArgs args, CustomResourceOptions? opts = null)
public ServiceConnectionPolicy(String name, ServiceConnectionPolicyArgs args)
public ServiceConnectionPolicy(String name, ServiceConnectionPolicyArgs args, CustomResourceOptions options)
type: gcp:networkconnectivity:ServiceConnectionPolicy
properties: # The arguments to resource properties.
options: # Bag of options to control resource's behavior.
Parameters
- name string
- The unique name of the resource.
- args ServiceConnectionPolicyArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- resource_name str
- The unique name of the resource.
- args ServiceConnectionPolicyArgs
- The arguments to resource properties.
- opts ResourceOptions
- Bag of options to control resource's behavior.
- ctx Context
- Context object for the current deployment.
- name string
- The unique name of the resource.
- args ServiceConnectionPolicyArgs
- The arguments to resource properties.
- opts ResourceOption
- Bag of options to control resource's behavior.
- name string
- The unique name of the resource.
- args ServiceConnectionPolicyArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- name String
- The unique name of the resource.
- args ServiceConnectionPolicyArgs
- 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 serviceConnectionPolicyResource = new Gcp.NetworkConnectivity.ServiceConnectionPolicy("serviceConnectionPolicyResource", new()
{
Location = "string",
Network = "string",
ServiceClass = "string",
Description = "string",
Labels =
{
{ "string", "string" },
},
Name = "string",
Project = "string",
PscConfig = new Gcp.NetworkConnectivity.Inputs.ServiceConnectionPolicyPscConfigArgs
{
Subnetworks = new[]
{
"string",
},
Limit = "string",
},
});
example, err := networkconnectivity.NewServiceConnectionPolicy(ctx, "serviceConnectionPolicyResource", &networkconnectivity.ServiceConnectionPolicyArgs{
Location: pulumi.String("string"),
Network: pulumi.String("string"),
ServiceClass: pulumi.String("string"),
Description: pulumi.String("string"),
Labels: pulumi.StringMap{
"string": pulumi.String("string"),
},
Name: pulumi.String("string"),
Project: pulumi.String("string"),
PscConfig: &networkconnectivity.ServiceConnectionPolicyPscConfigArgs{
Subnetworks: pulumi.StringArray{
pulumi.String("string"),
},
Limit: pulumi.String("string"),
},
})
var serviceConnectionPolicyResource = new ServiceConnectionPolicy("serviceConnectionPolicyResource", ServiceConnectionPolicyArgs.builder()
.location("string")
.network("string")
.serviceClass("string")
.description("string")
.labels(Map.of("string", "string"))
.name("string")
.project("string")
.pscConfig(ServiceConnectionPolicyPscConfigArgs.builder()
.subnetworks("string")
.limit("string")
.build())
.build());
service_connection_policy_resource = gcp.networkconnectivity.ServiceConnectionPolicy("serviceConnectionPolicyResource",
location="string",
network="string",
service_class="string",
description="string",
labels={
"string": "string",
},
name="string",
project="string",
psc_config=gcp.networkconnectivity.ServiceConnectionPolicyPscConfigArgs(
subnetworks=["string"],
limit="string",
))
const serviceConnectionPolicyResource = new gcp.networkconnectivity.ServiceConnectionPolicy("serviceConnectionPolicyResource", {
location: "string",
network: "string",
serviceClass: "string",
description: "string",
labels: {
string: "string",
},
name: "string",
project: "string",
pscConfig: {
subnetworks: ["string"],
limit: "string",
},
});
type: gcp:networkconnectivity:ServiceConnectionPolicy
properties:
description: string
labels:
string: string
location: string
name: string
network: string
project: string
pscConfig:
limit: string
subnetworks:
- string
serviceClass: string
ServiceConnectionPolicy Resource Properties
To learn more about resource properties and how to use them, see Inputs and Outputs in the Architecture and Concepts docs.
Inputs
The ServiceConnectionPolicy resource accepts the following input properties:
- Location string
- The location of the ServiceConnectionPolicy.
- Network string
- The resource path of the consumer network. Example: - projects/{projectNumOrId}/global/networks/{resourceId}.
- Service
Class string - The service class identifier for which this ServiceConnectionPolicy is for. The service class identifier is a unique, symbolic representation of a ServiceClass. It is provided by the Service Producer. Google services have a prefix of gcp. For example, gcp-cloud-sql. 3rd party services do not. For example, test-service-a3dfcx.
- Description string
- Free-text description of the resource.
- Labels Dictionary<string, string>
User-defined labels.
Note: This field is non-authoritative, and will only manage the labels present in your configuration. Please refer to the field
effective_labels
for all of the labels present on the resource.- Name string
- The name of a ServiceConnectionPolicy. Format: projects/{project}/locations/{location}/serviceConnectionPolicies/{service_connection_policy} See: https://google.aip.dev/122#fields-representing-resource-names
- Project string
- The ID of the project in which the resource belongs. If it is not provided, the provider project is used.
- Psc
Config ServiceConnection Policy Psc Config - Configuration used for Private Service Connect connections. Used when Infrastructure is PSC. Structure is documented below.
- Location string
- The location of the ServiceConnectionPolicy.
- Network string
- The resource path of the consumer network. Example: - projects/{projectNumOrId}/global/networks/{resourceId}.
- Service
Class string - The service class identifier for which this ServiceConnectionPolicy is for. The service class identifier is a unique, symbolic representation of a ServiceClass. It is provided by the Service Producer. Google services have a prefix of gcp. For example, gcp-cloud-sql. 3rd party services do not. For example, test-service-a3dfcx.
- Description string
- Free-text description of the resource.
- Labels map[string]string
User-defined labels.
Note: This field is non-authoritative, and will only manage the labels present in your configuration. Please refer to the field
effective_labels
for all of the labels present on the resource.- Name string
- The name of a ServiceConnectionPolicy. Format: projects/{project}/locations/{location}/serviceConnectionPolicies/{service_connection_policy} See: https://google.aip.dev/122#fields-representing-resource-names
- Project string
- The ID of the project in which the resource belongs. If it is not provided, the provider project is used.
- Psc
Config ServiceConnection Policy Psc Config Args - Configuration used for Private Service Connect connections. Used when Infrastructure is PSC. Structure is documented below.
- location String
- The location of the ServiceConnectionPolicy.
- network String
- The resource path of the consumer network. Example: - projects/{projectNumOrId}/global/networks/{resourceId}.
- service
Class String - The service class identifier for which this ServiceConnectionPolicy is for. The service class identifier is a unique, symbolic representation of a ServiceClass. It is provided by the Service Producer. Google services have a prefix of gcp. For example, gcp-cloud-sql. 3rd party services do not. For example, test-service-a3dfcx.
- description String
- Free-text description of the resource.
- labels Map<String,String>
User-defined labels.
Note: This field is non-authoritative, and will only manage the labels present in your configuration. Please refer to the field
effective_labels
for all of the labels present on the resource.- name String
- The name of a ServiceConnectionPolicy. Format: projects/{project}/locations/{location}/serviceConnectionPolicies/{service_connection_policy} See: https://google.aip.dev/122#fields-representing-resource-names
- project String
- The ID of the project in which the resource belongs. If it is not provided, the provider project is used.
- psc
Config ServiceConnection Policy Psc Config - Configuration used for Private Service Connect connections. Used when Infrastructure is PSC. Structure is documented below.
- location string
- The location of the ServiceConnectionPolicy.
- network string
- The resource path of the consumer network. Example: - projects/{projectNumOrId}/global/networks/{resourceId}.
- service
Class string - The service class identifier for which this ServiceConnectionPolicy is for. The service class identifier is a unique, symbolic representation of a ServiceClass. It is provided by the Service Producer. Google services have a prefix of gcp. For example, gcp-cloud-sql. 3rd party services do not. For example, test-service-a3dfcx.
- description string
- Free-text description of the resource.
- labels {[key: string]: string}
User-defined labels.
Note: This field is non-authoritative, and will only manage the labels present in your configuration. Please refer to the field
effective_labels
for all of the labels present on the resource.- name string
- The name of a ServiceConnectionPolicy. Format: projects/{project}/locations/{location}/serviceConnectionPolicies/{service_connection_policy} See: https://google.aip.dev/122#fields-representing-resource-names
- project string
- The ID of the project in which the resource belongs. If it is not provided, the provider project is used.
- psc
Config ServiceConnection Policy Psc Config - Configuration used for Private Service Connect connections. Used when Infrastructure is PSC. Structure is documented below.
- location str
- The location of the ServiceConnectionPolicy.
- network str
- The resource path of the consumer network. Example: - projects/{projectNumOrId}/global/networks/{resourceId}.
- service_
class str - The service class identifier for which this ServiceConnectionPolicy is for. The service class identifier is a unique, symbolic representation of a ServiceClass. It is provided by the Service Producer. Google services have a prefix of gcp. For example, gcp-cloud-sql. 3rd party services do not. For example, test-service-a3dfcx.
- description str
- Free-text description of the resource.
- labels Mapping[str, str]
User-defined labels.
Note: This field is non-authoritative, and will only manage the labels present in your configuration. Please refer to the field
effective_labels
for all of the labels present on the resource.- name str
- The name of a ServiceConnectionPolicy. Format: projects/{project}/locations/{location}/serviceConnectionPolicies/{service_connection_policy} See: https://google.aip.dev/122#fields-representing-resource-names
- project str
- The ID of the project in which the resource belongs. If it is not provided, the provider project is used.
- psc_
config ServiceConnection Policy Psc Config Args - Configuration used for Private Service Connect connections. Used when Infrastructure is PSC. Structure is documented below.
- location String
- The location of the ServiceConnectionPolicy.
- network String
- The resource path of the consumer network. Example: - projects/{projectNumOrId}/global/networks/{resourceId}.
- service
Class String - The service class identifier for which this ServiceConnectionPolicy is for. The service class identifier is a unique, symbolic representation of a ServiceClass. It is provided by the Service Producer. Google services have a prefix of gcp. For example, gcp-cloud-sql. 3rd party services do not. For example, test-service-a3dfcx.
- description String
- Free-text description of the resource.
- labels Map<String>
User-defined labels.
Note: This field is non-authoritative, and will only manage the labels present in your configuration. Please refer to the field
effective_labels
for all of the labels present on the resource.- name String
- The name of a ServiceConnectionPolicy. Format: projects/{project}/locations/{location}/serviceConnectionPolicies/{service_connection_policy} See: https://google.aip.dev/122#fields-representing-resource-names
- project String
- The ID of the project in which the resource belongs. If it is not provided, the provider project is used.
- psc
Config Property Map - Configuration used for Private Service Connect connections. Used when Infrastructure is PSC. Structure is documented below.
Outputs
All input properties are implicitly available as output properties. Additionally, the ServiceConnectionPolicy resource produces the following output properties:
- Create
Time string - The timestamp when the resource was created.
- Effective
Labels Dictionary<string, string> - All of labels (key/value pairs) present on the resource in GCP, including the labels configured through Pulumi, other clients and services.
- Etag string
- The etag is computed by the server, and may be sent on update and delete requests to ensure the client has an up-to-date value before proceeding.
- Id string
- The provider-assigned unique ID for this managed resource.
- Infrastructure string
- The type of underlying resources used to create the connection.
- Psc
Connections List<ServiceConnection Policy Psc Connection> - Information about each Private Service Connect connection. Structure is documented below.
- Pulumi
Labels Dictionary<string, string> - The combination of labels configured directly on the resource and default labels configured on the provider.
- Update
Time string - The timestamp when the resource was updated.
- Create
Time string - The timestamp when the resource was created.
- Effective
Labels map[string]string - All of labels (key/value pairs) present on the resource in GCP, including the labels configured through Pulumi, other clients and services.
- Etag string
- The etag is computed by the server, and may be sent on update and delete requests to ensure the client has an up-to-date value before proceeding.
- Id string
- The provider-assigned unique ID for this managed resource.
- Infrastructure string
- The type of underlying resources used to create the connection.
- Psc
Connections []ServiceConnection Policy Psc Connection - Information about each Private Service Connect connection. Structure is documented below.
- Pulumi
Labels map[string]string - The combination of labels configured directly on the resource and default labels configured on the provider.
- Update
Time string - The timestamp when the resource was updated.
- create
Time String - The timestamp when the resource was created.
- effective
Labels Map<String,String> - All of labels (key/value pairs) present on the resource in GCP, including the labels configured through Pulumi, other clients and services.
- etag String
- The etag is computed by the server, and may be sent on update and delete requests to ensure the client has an up-to-date value before proceeding.
- id String
- The provider-assigned unique ID for this managed resource.
- infrastructure String
- The type of underlying resources used to create the connection.
- psc
Connections List<ServiceConnection Policy Psc Connection> - Information about each Private Service Connect connection. Structure is documented below.
- pulumi
Labels Map<String,String> - The combination of labels configured directly on the resource and default labels configured on the provider.
- update
Time String - The timestamp when the resource was updated.
- create
Time string - The timestamp when the resource was created.
- effective
Labels {[key: string]: string} - All of labels (key/value pairs) present on the resource in GCP, including the labels configured through Pulumi, other clients and services.
- etag string
- The etag is computed by the server, and may be sent on update and delete requests to ensure the client has an up-to-date value before proceeding.
- id string
- The provider-assigned unique ID for this managed resource.
- infrastructure string
- The type of underlying resources used to create the connection.
- psc
Connections ServiceConnection Policy Psc Connection[] - Information about each Private Service Connect connection. Structure is documented below.
- pulumi
Labels {[key: string]: string} - The combination of labels configured directly on the resource and default labels configured on the provider.
- update
Time string - The timestamp when the resource was updated.
- create_
time str - The timestamp when the resource was created.
- effective_
labels Mapping[str, str] - All of labels (key/value pairs) present on the resource in GCP, including the labels configured through Pulumi, other clients and services.
- etag str
- The etag is computed by the server, and may be sent on update and delete requests to ensure the client has an up-to-date value before proceeding.
- id str
- The provider-assigned unique ID for this managed resource.
- infrastructure str
- The type of underlying resources used to create the connection.
- psc_
connections Sequence[ServiceConnection Policy Psc Connection] - Information about each Private Service Connect connection. Structure is documented below.
- pulumi_
labels Mapping[str, str] - The combination of labels configured directly on the resource and default labels configured on the provider.
- update_
time str - The timestamp when the resource was updated.
- create
Time String - The timestamp when the resource was created.
- effective
Labels Map<String> - All of labels (key/value pairs) present on the resource in GCP, including the labels configured through Pulumi, other clients and services.
- etag String
- The etag is computed by the server, and may be sent on update and delete requests to ensure the client has an up-to-date value before proceeding.
- id String
- The provider-assigned unique ID for this managed resource.
- infrastructure String
- The type of underlying resources used to create the connection.
- psc
Connections List<Property Map> - Information about each Private Service Connect connection. Structure is documented below.
- pulumi
Labels Map<String> - The combination of labels configured directly on the resource and default labels configured on the provider.
- update
Time String - The timestamp when the resource was updated.
Look up Existing ServiceConnectionPolicy Resource
Get an existing ServiceConnectionPolicy 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?: ServiceConnectionPolicyState, opts?: CustomResourceOptions): ServiceConnectionPolicy
@staticmethod
def get(resource_name: str,
id: str,
opts: Optional[ResourceOptions] = None,
create_time: Optional[str] = None,
description: Optional[str] = None,
effective_labels: Optional[Mapping[str, str]] = None,
etag: Optional[str] = None,
infrastructure: Optional[str] = None,
labels: Optional[Mapping[str, str]] = None,
location: Optional[str] = None,
name: Optional[str] = None,
network: Optional[str] = None,
project: Optional[str] = None,
psc_config: Optional[ServiceConnectionPolicyPscConfigArgs] = None,
psc_connections: Optional[Sequence[ServiceConnectionPolicyPscConnectionArgs]] = None,
pulumi_labels: Optional[Mapping[str, str]] = None,
service_class: Optional[str] = None,
update_time: Optional[str] = None) -> ServiceConnectionPolicy
func GetServiceConnectionPolicy(ctx *Context, name string, id IDInput, state *ServiceConnectionPolicyState, opts ...ResourceOption) (*ServiceConnectionPolicy, error)
public static ServiceConnectionPolicy Get(string name, Input<string> id, ServiceConnectionPolicyState? state, CustomResourceOptions? opts = null)
public static ServiceConnectionPolicy get(String name, Output<String> id, ServiceConnectionPolicyState state, CustomResourceOptions options)
Resource lookup is not supported in YAML
- name
- The unique name of the resulting resource.
- id
- 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
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- name
- The unique name of the resulting resource.
- id
- 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
- The unique name of the resulting resource.
- id
- 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
- The unique name of the resulting resource.
- id
- 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.
- Create
Time string - The timestamp when the resource was created.
- Description string
- Free-text description of the resource.
- Effective
Labels Dictionary<string, string> - All of labels (key/value pairs) present on the resource in GCP, including the labels configured through Pulumi, other clients and services.
- Etag string
- The etag is computed by the server, and may be sent on update and delete requests to ensure the client has an up-to-date value before proceeding.
- Infrastructure string
- The type of underlying resources used to create the connection.
- Labels Dictionary<string, string>
User-defined labels.
Note: This field is non-authoritative, and will only manage the labels present in your configuration. Please refer to the field
effective_labels
for all of the labels present on the resource.- Location string
- The location of the ServiceConnectionPolicy.
- Name string
- The name of a ServiceConnectionPolicy. Format: projects/{project}/locations/{location}/serviceConnectionPolicies/{service_connection_policy} See: https://google.aip.dev/122#fields-representing-resource-names
- Network string
- The resource path of the consumer network. Example: - projects/{projectNumOrId}/global/networks/{resourceId}.
- Project string
- The ID of the project in which the resource belongs. If it is not provided, the provider project is used.
- Psc
Config ServiceConnection Policy Psc Config - Configuration used for Private Service Connect connections. Used when Infrastructure is PSC. Structure is documented below.
- Psc
Connections List<ServiceConnection Policy Psc Connection> - Information about each Private Service Connect connection. Structure is documented below.
- Pulumi
Labels Dictionary<string, string> - The combination of labels configured directly on the resource and default labels configured on the provider.
- Service
Class string - The service class identifier for which this ServiceConnectionPolicy is for. The service class identifier is a unique, symbolic representation of a ServiceClass. It is provided by the Service Producer. Google services have a prefix of gcp. For example, gcp-cloud-sql. 3rd party services do not. For example, test-service-a3dfcx.
- Update
Time string - The timestamp when the resource was updated.
- Create
Time string - The timestamp when the resource was created.
- Description string
- Free-text description of the resource.
- Effective
Labels map[string]string - All of labels (key/value pairs) present on the resource in GCP, including the labels configured through Pulumi, other clients and services.
- Etag string
- The etag is computed by the server, and may be sent on update and delete requests to ensure the client has an up-to-date value before proceeding.
- Infrastructure string
- The type of underlying resources used to create the connection.
- Labels map[string]string
User-defined labels.
Note: This field is non-authoritative, and will only manage the labels present in your configuration. Please refer to the field
effective_labels
for all of the labels present on the resource.- Location string
- The location of the ServiceConnectionPolicy.
- Name string
- The name of a ServiceConnectionPolicy. Format: projects/{project}/locations/{location}/serviceConnectionPolicies/{service_connection_policy} See: https://google.aip.dev/122#fields-representing-resource-names
- Network string
- The resource path of the consumer network. Example: - projects/{projectNumOrId}/global/networks/{resourceId}.
- Project string
- The ID of the project in which the resource belongs. If it is not provided, the provider project is used.
- Psc
Config ServiceConnection Policy Psc Config Args - Configuration used for Private Service Connect connections. Used when Infrastructure is PSC. Structure is documented below.
- Psc
Connections []ServiceConnection Policy Psc Connection Args - Information about each Private Service Connect connection. Structure is documented below.
- Pulumi
Labels map[string]string - The combination of labels configured directly on the resource and default labels configured on the provider.
- Service
Class string - The service class identifier for which this ServiceConnectionPolicy is for. The service class identifier is a unique, symbolic representation of a ServiceClass. It is provided by the Service Producer. Google services have a prefix of gcp. For example, gcp-cloud-sql. 3rd party services do not. For example, test-service-a3dfcx.
- Update
Time string - The timestamp when the resource was updated.
- create
Time String - The timestamp when the resource was created.
- description String
- Free-text description of the resource.
- effective
Labels Map<String,String> - All of labels (key/value pairs) present on the resource in GCP, including the labels configured through Pulumi, other clients and services.
- etag String
- The etag is computed by the server, and may be sent on update and delete requests to ensure the client has an up-to-date value before proceeding.
- infrastructure String
- The type of underlying resources used to create the connection.
- labels Map<String,String>
User-defined labels.
Note: This field is non-authoritative, and will only manage the labels present in your configuration. Please refer to the field
effective_labels
for all of the labels present on the resource.- location String
- The location of the ServiceConnectionPolicy.
- name String
- The name of a ServiceConnectionPolicy. Format: projects/{project}/locations/{location}/serviceConnectionPolicies/{service_connection_policy} See: https://google.aip.dev/122#fields-representing-resource-names
- network String
- The resource path of the consumer network. Example: - projects/{projectNumOrId}/global/networks/{resourceId}.
- project String
- The ID of the project in which the resource belongs. If it is not provided, the provider project is used.
- psc
Config ServiceConnection Policy Psc Config - Configuration used for Private Service Connect connections. Used when Infrastructure is PSC. Structure is documented below.
- psc
Connections List<ServiceConnection Policy Psc Connection> - Information about each Private Service Connect connection. Structure is documented below.
- pulumi
Labels Map<String,String> - The combination of labels configured directly on the resource and default labels configured on the provider.
- service
Class String - The service class identifier for which this ServiceConnectionPolicy is for. The service class identifier is a unique, symbolic representation of a ServiceClass. It is provided by the Service Producer. Google services have a prefix of gcp. For example, gcp-cloud-sql. 3rd party services do not. For example, test-service-a3dfcx.
- update
Time String - The timestamp when the resource was updated.
- create
Time string - The timestamp when the resource was created.
- description string
- Free-text description of the resource.
- effective
Labels {[key: string]: string} - All of labels (key/value pairs) present on the resource in GCP, including the labels configured through Pulumi, other clients and services.
- etag string
- The etag is computed by the server, and may be sent on update and delete requests to ensure the client has an up-to-date value before proceeding.
- infrastructure string
- The type of underlying resources used to create the connection.
- labels {[key: string]: string}
User-defined labels.
Note: This field is non-authoritative, and will only manage the labels present in your configuration. Please refer to the field
effective_labels
for all of the labels present on the resource.- location string
- The location of the ServiceConnectionPolicy.
- name string
- The name of a ServiceConnectionPolicy. Format: projects/{project}/locations/{location}/serviceConnectionPolicies/{service_connection_policy} See: https://google.aip.dev/122#fields-representing-resource-names
- network string
- The resource path of the consumer network. Example: - projects/{projectNumOrId}/global/networks/{resourceId}.
- project string
- The ID of the project in which the resource belongs. If it is not provided, the provider project is used.
- psc
Config ServiceConnection Policy Psc Config - Configuration used for Private Service Connect connections. Used when Infrastructure is PSC. Structure is documented below.
- psc
Connections ServiceConnection Policy Psc Connection[] - Information about each Private Service Connect connection. Structure is documented below.
- pulumi
Labels {[key: string]: string} - The combination of labels configured directly on the resource and default labels configured on the provider.
- service
Class string - The service class identifier for which this ServiceConnectionPolicy is for. The service class identifier is a unique, symbolic representation of a ServiceClass. It is provided by the Service Producer. Google services have a prefix of gcp. For example, gcp-cloud-sql. 3rd party services do not. For example, test-service-a3dfcx.
- update
Time string - The timestamp when the resource was updated.
- create_
time str - The timestamp when the resource was created.
- description str
- Free-text description of the resource.
- effective_
labels Mapping[str, str] - All of labels (key/value pairs) present on the resource in GCP, including the labels configured through Pulumi, other clients and services.
- etag str
- The etag is computed by the server, and may be sent on update and delete requests to ensure the client has an up-to-date value before proceeding.
- infrastructure str
- The type of underlying resources used to create the connection.
- labels Mapping[str, str]
User-defined labels.
Note: This field is non-authoritative, and will only manage the labels present in your configuration. Please refer to the field
effective_labels
for all of the labels present on the resource.- location str
- The location of the ServiceConnectionPolicy.
- name str
- The name of a ServiceConnectionPolicy. Format: projects/{project}/locations/{location}/serviceConnectionPolicies/{service_connection_policy} See: https://google.aip.dev/122#fields-representing-resource-names
- network str
- The resource path of the consumer network. Example: - projects/{projectNumOrId}/global/networks/{resourceId}.
- project str
- The ID of the project in which the resource belongs. If it is not provided, the provider project is used.
- psc_
config ServiceConnection Policy Psc Config Args - Configuration used for Private Service Connect connections. Used when Infrastructure is PSC. Structure is documented below.
- psc_
connections Sequence[ServiceConnection Policy Psc Connection Args] - Information about each Private Service Connect connection. Structure is documented below.
- pulumi_
labels Mapping[str, str] - The combination of labels configured directly on the resource and default labels configured on the provider.
- service_
class str - The service class identifier for which this ServiceConnectionPolicy is for. The service class identifier is a unique, symbolic representation of a ServiceClass. It is provided by the Service Producer. Google services have a prefix of gcp. For example, gcp-cloud-sql. 3rd party services do not. For example, test-service-a3dfcx.
- update_
time str - The timestamp when the resource was updated.
- create
Time String - The timestamp when the resource was created.
- description String
- Free-text description of the resource.
- effective
Labels Map<String> - All of labels (key/value pairs) present on the resource in GCP, including the labels configured through Pulumi, other clients and services.
- etag String
- The etag is computed by the server, and may be sent on update and delete requests to ensure the client has an up-to-date value before proceeding.
- infrastructure String
- The type of underlying resources used to create the connection.
- labels Map<String>
User-defined labels.
Note: This field is non-authoritative, and will only manage the labels present in your configuration. Please refer to the field
effective_labels
for all of the labels present on the resource.- location String
- The location of the ServiceConnectionPolicy.
- name String
- The name of a ServiceConnectionPolicy. Format: projects/{project}/locations/{location}/serviceConnectionPolicies/{service_connection_policy} See: https://google.aip.dev/122#fields-representing-resource-names
- network String
- The resource path of the consumer network. Example: - projects/{projectNumOrId}/global/networks/{resourceId}.
- project String
- The ID of the project in which the resource belongs. If it is not provided, the provider project is used.
- psc
Config Property Map - Configuration used for Private Service Connect connections. Used when Infrastructure is PSC. Structure is documented below.
- psc
Connections List<Property Map> - Information about each Private Service Connect connection. Structure is documented below.
- pulumi
Labels Map<String> - The combination of labels configured directly on the resource and default labels configured on the provider.
- service
Class String - The service class identifier for which this ServiceConnectionPolicy is for. The service class identifier is a unique, symbolic representation of a ServiceClass. It is provided by the Service Producer. Google services have a prefix of gcp. For example, gcp-cloud-sql. 3rd party services do not. For example, test-service-a3dfcx.
- update
Time String - The timestamp when the resource was updated.
Supporting Types
ServiceConnectionPolicyPscConfig, ServiceConnectionPolicyPscConfigArgs
- Subnetworks List<string>
- IDs of the subnetworks or fully qualified identifiers for the subnetworks
- Limit string
- Max number of PSC connections for this policy.
- Subnetworks []string
- IDs of the subnetworks or fully qualified identifiers for the subnetworks
- Limit string
- Max number of PSC connections for this policy.
- subnetworks List<String>
- IDs of the subnetworks or fully qualified identifiers for the subnetworks
- limit String
- Max number of PSC connections for this policy.
- subnetworks string[]
- IDs of the subnetworks or fully qualified identifiers for the subnetworks
- limit string
- Max number of PSC connections for this policy.
- subnetworks Sequence[str]
- IDs of the subnetworks or fully qualified identifiers for the subnetworks
- limit str
- Max number of PSC connections for this policy.
- subnetworks List<String>
- IDs of the subnetworks or fully qualified identifiers for the subnetworks
- limit String
- Max number of PSC connections for this policy.
ServiceConnectionPolicyPscConnection, ServiceConnectionPolicyPscConnectionArgs
- Consumer
Address string - The resource reference of the consumer address.
- Consumer
Forwarding stringRule - The resource reference of the PSC Forwarding Rule within the consumer VPC.
- Consumer
Target stringProject - The project where the PSC connection is created.
- Error
Service
Connection Policy Psc Connection Error - The most recent error during operating this connection. Structure is documented below.
- Error
Info ServiceConnection Policy Psc Connection Error Info - The error info for the latest error during operating this connection. Structure is documented below.
- Error
Type string - The error type indicates whether the error is consumer facing, producer
facing or system internal.
Possible values are:
CONNECTION_ERROR_TYPE_UNSPECIFIED
,ERROR_INTERNAL
,ERROR_CONSUMER_SIDE
,ERROR_PRODUCER_SIDE
. - Gce
Operation string - The last Compute Engine operation to setup PSC connection.
- Psc
Connection stringId - The PSC connection id of the PSC forwarding rule.
- State string
- The state of the PSC connection.
Possible values are:
STATE_UNSPECIFIED
,ACTIVE
,CREATING
,DELETING
,FAILED
.
- Consumer
Address string - The resource reference of the consumer address.
- Consumer
Forwarding stringRule - The resource reference of the PSC Forwarding Rule within the consumer VPC.
- Consumer
Target stringProject - The project where the PSC connection is created.
- Error
Service
Connection Policy Psc Connection Error - The most recent error during operating this connection. Structure is documented below.
- Error
Info ServiceConnection Policy Psc Connection Error Info - The error info for the latest error during operating this connection. Structure is documented below.
- Error
Type string - The error type indicates whether the error is consumer facing, producer
facing or system internal.
Possible values are:
CONNECTION_ERROR_TYPE_UNSPECIFIED
,ERROR_INTERNAL
,ERROR_CONSUMER_SIDE
,ERROR_PRODUCER_SIDE
. - Gce
Operation string - The last Compute Engine operation to setup PSC connection.
- Psc
Connection stringId - The PSC connection id of the PSC forwarding rule.
- State string
- The state of the PSC connection.
Possible values are:
STATE_UNSPECIFIED
,ACTIVE
,CREATING
,DELETING
,FAILED
.
- consumer
Address String - The resource reference of the consumer address.
- consumer
Forwarding StringRule - The resource reference of the PSC Forwarding Rule within the consumer VPC.
- consumer
Target StringProject - The project where the PSC connection is created.
- error
Service
Connection Policy Psc Connection Error - The most recent error during operating this connection. Structure is documented below.
- error
Info ServiceConnection Policy Psc Connection Error Info - The error info for the latest error during operating this connection. Structure is documented below.
- error
Type String - The error type indicates whether the error is consumer facing, producer
facing or system internal.
Possible values are:
CONNECTION_ERROR_TYPE_UNSPECIFIED
,ERROR_INTERNAL
,ERROR_CONSUMER_SIDE
,ERROR_PRODUCER_SIDE
. - gce
Operation String - The last Compute Engine operation to setup PSC connection.
- psc
Connection StringId - The PSC connection id of the PSC forwarding rule.
- state String
- The state of the PSC connection.
Possible values are:
STATE_UNSPECIFIED
,ACTIVE
,CREATING
,DELETING
,FAILED
.
- consumer
Address string - The resource reference of the consumer address.
- consumer
Forwarding stringRule - The resource reference of the PSC Forwarding Rule within the consumer VPC.
- consumer
Target stringProject - The project where the PSC connection is created.
- error
Service
Connection Policy Psc Connection Error - The most recent error during operating this connection. Structure is documented below.
- error
Info ServiceConnection Policy Psc Connection Error Info - The error info for the latest error during operating this connection. Structure is documented below.
- error
Type string - The error type indicates whether the error is consumer facing, producer
facing or system internal.
Possible values are:
CONNECTION_ERROR_TYPE_UNSPECIFIED
,ERROR_INTERNAL
,ERROR_CONSUMER_SIDE
,ERROR_PRODUCER_SIDE
. - gce
Operation string - The last Compute Engine operation to setup PSC connection.
- psc
Connection stringId - The PSC connection id of the PSC forwarding rule.
- state string
- The state of the PSC connection.
Possible values are:
STATE_UNSPECIFIED
,ACTIVE
,CREATING
,DELETING
,FAILED
.
- consumer_
address str - The resource reference of the consumer address.
- consumer_
forwarding_ strrule - The resource reference of the PSC Forwarding Rule within the consumer VPC.
- consumer_
target_ strproject - The project where the PSC connection is created.
- error
Service
Connection Policy Psc Connection Error - The most recent error during operating this connection. Structure is documented below.
- error_
info ServiceConnection Policy Psc Connection Error Info - The error info for the latest error during operating this connection. Structure is documented below.
- error_
type str - The error type indicates whether the error is consumer facing, producer
facing or system internal.
Possible values are:
CONNECTION_ERROR_TYPE_UNSPECIFIED
,ERROR_INTERNAL
,ERROR_CONSUMER_SIDE
,ERROR_PRODUCER_SIDE
. - gce_
operation str - The last Compute Engine operation to setup PSC connection.
- psc_
connection_ strid - The PSC connection id of the PSC forwarding rule.
- state str
- The state of the PSC connection.
Possible values are:
STATE_UNSPECIFIED
,ACTIVE
,CREATING
,DELETING
,FAILED
.
- consumer
Address String - The resource reference of the consumer address.
- consumer
Forwarding StringRule - The resource reference of the PSC Forwarding Rule within the consumer VPC.
- consumer
Target StringProject - The project where the PSC connection is created.
- error Property Map
- The most recent error during operating this connection. Structure is documented below.
- error
Info Property Map - The error info for the latest error during operating this connection. Structure is documented below.
- error
Type String - The error type indicates whether the error is consumer facing, producer
facing or system internal.
Possible values are:
CONNECTION_ERROR_TYPE_UNSPECIFIED
,ERROR_INTERNAL
,ERROR_CONSUMER_SIDE
,ERROR_PRODUCER_SIDE
. - gce
Operation String - The last Compute Engine operation to setup PSC connection.
- psc
Connection StringId - The PSC connection id of the PSC forwarding rule.
- state String
- The state of the PSC connection.
Possible values are:
STATE_UNSPECIFIED
,ACTIVE
,CREATING
,DELETING
,FAILED
.
ServiceConnectionPolicyPscConnectionError, ServiceConnectionPolicyPscConnectionErrorArgs
ServiceConnectionPolicyPscConnectionErrorInfo, ServiceConnectionPolicyPscConnectionErrorInfoArgs
Import
ServiceConnectionPolicy can be imported using any of these accepted formats:
projects/{{project}}/locations/{{location}}/serviceConnectionPolicies/{{name}}
{{project}}/{{location}}/{{name}}
{{location}}/{{name}}
When using the pulumi import
command, ServiceConnectionPolicy can be imported using one of the formats above. For example:
$ pulumi import gcp:networkconnectivity/serviceConnectionPolicy:ServiceConnectionPolicy default projects/{{project}}/locations/{{location}}/serviceConnectionPolicies/{{name}}
$ pulumi import gcp:networkconnectivity/serviceConnectionPolicy:ServiceConnectionPolicy default {{project}}/{{location}}/{{name}}
$ pulumi import gcp:networkconnectivity/serviceConnectionPolicy:ServiceConnectionPolicy default {{location}}/{{name}}
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.