ServiceConnectionPolicy

class ServiceConnectionPolicy : KotlinCustomResource

Manage Service Connection Policies. To get more information about ServiceConnectionPolicy, see:

Example Usage

Network Connectivity Policy Basic

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()
.autoCreateSubnetworks(false)
.build());
var producerSubnet = new Subnetwork("producerSubnet", SubnetworkArgs.builder()
.ipCidrRange("10.0.0.0/16")
.region("us-central1")
.network(producerNet.id())
.build());
var default_ = new ServiceConnectionPolicy("default", ServiceConnectionPolicyArgs.builder()
.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());
}
}

Import

ServiceConnectionPolicy can be imported using any of these accepted formats* projects/{{project}}/locations/{{location}}/serviceConnectionPolicies/{{name}} * {{project}}/{{location}}/{{name}} * {{location}}/{{name}} In Terraform v1.5.0 and later, use an import block to import ServiceConnectionPolicy using one of the formats above. For exampletf import { id = "projects/{{project}}/locations/{{location}}/serviceConnectionPolicies/{{name}}" to = google_network_connectivity_service_connection_policy.default }

$ pulumi import gcp:networkconnectivity/serviceConnectionPolicy:ServiceConnectionPolicy When using the [`terraform import` command](https://developer.hashicorp.com/terraform/cli/commands/import), 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}}

Properties

Link copied to clipboard
val createTime: Output<String>

The timestamp when the resource was created.

Link copied to clipboard
val description: Output<String>?

Free-text description of the resource.

Link copied to clipboard

All of labels (key/value pairs) present on the resource in GCP, including the labels configured through Pulumi, other clients and services.

Link copied to clipboard
val etag: Output<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.

Link copied to clipboard
val id: Output<String>
Link copied to clipboard
val infrastructure: Output<String>

The type of underlying resources used to create the connection.

Link copied to clipboard
val labels: Output<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.

Link copied to clipboard
val location: Output<String>

The location of the ServiceConnectionPolicy.

Link copied to clipboard
val name: Output<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

Link copied to clipboard
val network: Output<String>

The resource path of the consumer network. Example: - projects/{projectNumOrId}/global/networks/{resourceId}.

Link copied to clipboard
val project: Output<String>

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

Link copied to clipboard

Configuration used for Private Service Connect connections. Used when Infrastructure is PSC. Structure is documented below.

Link copied to clipboard

Information about each Private Service Connect connection. Structure is documented below.

Link copied to clipboard
val pulumiChildResources: Set<KotlinResource>
Link copied to clipboard
val pulumiLabels: Output<Map<String, String>>

The combination of labels configured directly on the resource and default labels configured on the provider.

Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
val serviceClass: Output<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.

Link copied to clipboard
val updateTime: Output<String>

The timestamp when the resource was updated.

Link copied to clipboard
val urn: Output<String>