Viewing docs for Google Cloud v9.26.0
published on Tuesday, Jun 9, 2026 by Pulumi
published on Tuesday, Jun 9, 2026 by Pulumi
Viewing docs for Google Cloud v9.26.0
published on Tuesday, Jun 9, 2026 by Pulumi
published on Tuesday, Jun 9, 2026 by Pulumi
Get a specific service attachment within a region. For more information see the official documentation and API.
Example Usage
import * as pulumi from "@pulumi/pulumi";
import * as gcp from "@pulumi/gcp";
const _default = gcp.compute.getServiceAttachment({
project: "my-project",
name: "my-service-attachment",
region: "us-west2",
});
import pulumi
import pulumi_gcp as gcp
default = gcp.compute.get_service_attachment(project="my-project",
name="my-service-attachment",
region="us-west2")
package main
import (
"github.com/pulumi/pulumi-gcp/sdk/v9/go/gcp/compute"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
_, err := compute.LookupServiceAttachment(ctx, &compute.LookupServiceAttachmentArgs{
Project: pulumi.StringRef("my-project"),
Name: "my-service-attachment",
Region: pulumi.StringRef("us-west2"),
}, nil)
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 @default = Gcp.Compute.GetServiceAttachment.Invoke(new()
{
Project = "my-project",
Name = "my-service-attachment",
Region = "us-west2",
});
});
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.gcp.compute.ComputeFunctions;
import com.pulumi.gcp.compute.inputs.GetServiceAttachmentArgs;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.Map;
import java.io.File;
import java.nio.file.Files;
import java.nio.file.Paths;
public class App {
public static void main(String[] args) {
Pulumi.run(App::stack);
}
public static void stack(Context ctx) {
final var default = ComputeFunctions.getServiceAttachment(GetServiceAttachmentArgs.builder()
.project("my-project")
.name("my-service-attachment")
.region("us-west2")
.build());
}
}
variables:
default:
fn::invoke:
function: gcp:compute:getServiceAttachment
arguments:
project: my-project
name: my-service-attachment
region: us-west2
pulumi {
required_providers {
gcp = {
source = "pulumi/gcp"
}
}
}
data "gcp_compute_getserviceattachment" "default" {
project = "my-project"
name = "my-service-attachment"
region = "us-west2"
}
Using getServiceAttachment
Two invocation forms are available. The direct form accepts plain arguments and either blocks until the result value is available, or returns a Promise-wrapped result. The output form accepts Input-wrapped arguments and returns an Output-wrapped result.
function getServiceAttachment(args: GetServiceAttachmentArgs, opts?: InvokeOptions): Promise<GetServiceAttachmentResult>
function getServiceAttachmentOutput(args: GetServiceAttachmentOutputArgs, opts?: InvokeOptions): Output<GetServiceAttachmentResult>def get_service_attachment(name: Optional[str] = None,
project: Optional[str] = None,
region: Optional[str] = None,
opts: Optional[InvokeOptions] = None) -> GetServiceAttachmentResult
def get_service_attachment_output(name: pulumi.Input[Optional[str]] = None,
project: pulumi.Input[Optional[str]] = None,
region: pulumi.Input[Optional[str]] = None,
opts: Optional[InvokeOptions] = None) -> Output[GetServiceAttachmentResult]func LookupServiceAttachment(ctx *Context, args *LookupServiceAttachmentArgs, opts ...InvokeOption) (*LookupServiceAttachmentResult, error)
func LookupServiceAttachmentOutput(ctx *Context, args *LookupServiceAttachmentOutputArgs, opts ...InvokeOption) LookupServiceAttachmentResultOutput> Note: This function is named LookupServiceAttachment in the Go SDK.
public static class GetServiceAttachment
{
public static Task<GetServiceAttachmentResult> InvokeAsync(GetServiceAttachmentArgs args, InvokeOptions? opts = null)
public static Output<GetServiceAttachmentResult> Invoke(GetServiceAttachmentInvokeArgs args, InvokeOptions? opts = null)
}public static CompletableFuture<GetServiceAttachmentResult> getServiceAttachment(GetServiceAttachmentArgs args, InvokeOptions options)
public static Output<GetServiceAttachmentResult> getServiceAttachment(GetServiceAttachmentArgs args, InvokeOptions options)
fn::invoke:
function: gcp:compute/getServiceAttachment:getServiceAttachment
arguments:
# arguments dictionarydata "gcp_compute_getserviceattachment" "name" {
# arguments
}The following arguments are supported:
getServiceAttachment Result
The following output properties are available:
- Connected
Endpoints List<GetService Attachment Connected Endpoint> - Connection
Preference string - Consumer
Accept List<GetLists Service Attachment Consumer Accept List> - Consumer
Reject List<string>Lists - Deletion
Policy string - Description string
- Domain
Names List<string> - Enable
Proxy boolProtocol - Fingerprint string
- Id string
- The provider-assigned unique ID for this managed resource.
- Name string
- Nat
Subnets List<string> - Propagated
Connection intLimit - Psc
Service List<GetAttachment Ids Service Attachment Psc Service Attachment Id> - Reconcile
Connections bool - Self
Link string - Send
Propagated boolConnection Limit If Zero - Show
Nat boolIps - Target
Service string - Tunneling
Configs List<GetService Attachment Tunneling Config> - Project string
- Region string
- Connected
Endpoints []GetService Attachment Connected Endpoint - Connection
Preference string - Consumer
Accept []GetLists Service Attachment Consumer Accept List - Consumer
Reject []stringLists - Deletion
Policy string - Description string
- Domain
Names []string - Enable
Proxy boolProtocol - Fingerprint string
- Id string
- The provider-assigned unique ID for this managed resource.
- Name string
- Nat
Subnets []string - Propagated
Connection intLimit - Psc
Service []GetAttachment Ids Service Attachment Psc Service Attachment Id - Reconcile
Connections bool - Self
Link string - Send
Propagated boolConnection Limit If Zero - Show
Nat boolIps - Target
Service string - Tunneling
Configs []GetService Attachment Tunneling Config - Project string
- Region string
- connected_
endpoints list(object) - connection_
preference string - consumer_
accept_ list(object)lists - consumer_
reject_ list(string)lists - deletion_
policy string - description string
- domain_
names list(string) - enable_
proxy_ boolprotocol - fingerprint string
- id string
- The provider-assigned unique ID for this managed resource.
- name string
- nat_
subnets list(string) - propagated_
connection_ numberlimit - psc_
service_ list(object)attachment_ ids - reconcile_
connections bool - self_
link string - send_
propagated_ boolconnection_ limit_ if_ zero - show_
nat_ boolips - target_
service string - tunneling_
configs list(object) - project string
- region string
- connected
Endpoints List<GetService Attachment Connected Endpoint> - connection
Preference String - consumer
Accept List<GetLists Service Attachment Consumer Accept List> - consumer
Reject List<String>Lists - deletion
Policy String - description String
- domain
Names List<String> - enable
Proxy BooleanProtocol - fingerprint String
- id String
- The provider-assigned unique ID for this managed resource.
- name String
- nat
Subnets List<String> - propagated
Connection IntegerLimit - psc
Service List<GetAttachment Ids Service Attachment Psc Service Attachment Id> - reconcile
Connections Boolean - self
Link String - send
Propagated BooleanConnection Limit If Zero - show
Nat BooleanIps - target
Service String - tunneling
Configs List<GetService Attachment Tunneling Config> - project String
- region String
- connected
Endpoints GetService Attachment Connected Endpoint[] - connection
Preference string - consumer
Accept GetLists Service Attachment Consumer Accept List[] - consumer
Reject string[]Lists - deletion
Policy string - description string
- domain
Names string[] - enable
Proxy booleanProtocol - fingerprint string
- id string
- The provider-assigned unique ID for this managed resource.
- name string
- nat
Subnets string[] - propagated
Connection numberLimit - psc
Service GetAttachment Ids Service Attachment Psc Service Attachment Id[] - reconcile
Connections boolean - self
Link string - send
Propagated booleanConnection Limit If Zero - show
Nat booleanIps - target
Service string - tunneling
Configs GetService Attachment Tunneling Config[] - project string
- region string
- connected_
endpoints Sequence[GetService Attachment Connected Endpoint] - connection_
preference str - consumer_
accept_ Sequence[Getlists Service Attachment Consumer Accept List] - consumer_
reject_ Sequence[str]lists - deletion_
policy str - description str
- domain_
names Sequence[str] - enable_
proxy_ boolprotocol - fingerprint str
- id str
- The provider-assigned unique ID for this managed resource.
- name str
- nat_
subnets Sequence[str] - propagated_
connection_ intlimit - psc_
service_ Sequence[Getattachment_ ids Service Attachment Psc Service Attachment Id] - reconcile_
connections bool - self_
link str - send_
propagated_ boolconnection_ limit_ if_ zero - show_
nat_ boolips - target_
service str - tunneling_
configs Sequence[GetService Attachment Tunneling Config] - project str
- region str
- connected
Endpoints List<Property Map> - connection
Preference String - consumer
Accept List<Property Map>Lists - consumer
Reject List<String>Lists - deletion
Policy String - description String
- domain
Names List<String> - enable
Proxy BooleanProtocol - fingerprint String
- id String
- The provider-assigned unique ID for this managed resource.
- name String
- nat
Subnets List<String> - propagated
Connection NumberLimit - psc
Service List<Property Map>Attachment Ids - reconcile
Connections Boolean - self
Link String - send
Propagated BooleanConnection Limit If Zero - show
Nat BooleanIps - target
Service String - tunneling
Configs List<Property Map> - project String
- region String
Supporting Types
GetServiceAttachmentConnectedEndpoint
- Consumer
Network string - The url of the consumer network.
- Endpoint string
- The URL of the consumer forwarding rule.
- Nat
Ips List<string> - NOTE: This field is temporarily non-functional due to an underlying API issue. Any value provided here will be ignored until the API issue is resolved, expected around 2026-03. 'The nat IPs of the connected endpoint.'
- Propagated
Connection intCount - The number of consumer Network Connectivity Center spokes that the connected Private Service Connect endpoint has propagated to.
- Psc
Connection stringId - The PSC connection id of the connected endpoint.
- Status string
- The status of the connection from the consumer forwarding rule to this service attachment.
- Consumer
Network string - The url of the consumer network.
- Endpoint string
- The URL of the consumer forwarding rule.
- Nat
Ips []string - NOTE: This field is temporarily non-functional due to an underlying API issue. Any value provided here will be ignored until the API issue is resolved, expected around 2026-03. 'The nat IPs of the connected endpoint.'
- Propagated
Connection intCount - The number of consumer Network Connectivity Center spokes that the connected Private Service Connect endpoint has propagated to.
- Psc
Connection stringId - The PSC connection id of the connected endpoint.
- Status string
- The status of the connection from the consumer forwarding rule to this service attachment.
- consumer_
network string - The url of the consumer network.
- endpoint string
- The URL of the consumer forwarding rule.
- nat_
ips list(string) - NOTE: This field is temporarily non-functional due to an underlying API issue. Any value provided here will be ignored until the API issue is resolved, expected around 2026-03. 'The nat IPs of the connected endpoint.'
- propagated_
connection_ numbercount - The number of consumer Network Connectivity Center spokes that the connected Private Service Connect endpoint has propagated to.
- psc_
connection_ stringid - The PSC connection id of the connected endpoint.
- status string
- The status of the connection from the consumer forwarding rule to this service attachment.
- consumer
Network String - The url of the consumer network.
- endpoint String
- The URL of the consumer forwarding rule.
- nat
Ips List<String> - NOTE: This field is temporarily non-functional due to an underlying API issue. Any value provided here will be ignored until the API issue is resolved, expected around 2026-03. 'The nat IPs of the connected endpoint.'
- propagated
Connection IntegerCount - The number of consumer Network Connectivity Center spokes that the connected Private Service Connect endpoint has propagated to.
- psc
Connection StringId - The PSC connection id of the connected endpoint.
- status String
- The status of the connection from the consumer forwarding rule to this service attachment.
- consumer
Network string - The url of the consumer network.
- endpoint string
- The URL of the consumer forwarding rule.
- nat
Ips string[] - NOTE: This field is temporarily non-functional due to an underlying API issue. Any value provided here will be ignored until the API issue is resolved, expected around 2026-03. 'The nat IPs of the connected endpoint.'
- propagated
Connection numberCount - The number of consumer Network Connectivity Center spokes that the connected Private Service Connect endpoint has propagated to.
- psc
Connection stringId - The PSC connection id of the connected endpoint.
- status string
- The status of the connection from the consumer forwarding rule to this service attachment.
- consumer_
network str - The url of the consumer network.
- endpoint str
- The URL of the consumer forwarding rule.
- nat_
ips Sequence[str] - NOTE: This field is temporarily non-functional due to an underlying API issue. Any value provided here will be ignored until the API issue is resolved, expected around 2026-03. 'The nat IPs of the connected endpoint.'
- propagated_
connection_ intcount - The number of consumer Network Connectivity Center spokes that the connected Private Service Connect endpoint has propagated to.
- psc_
connection_ strid - The PSC connection id of the connected endpoint.
- status str
- The status of the connection from the consumer forwarding rule to this service attachment.
- consumer
Network String - The url of the consumer network.
- endpoint String
- The URL of the consumer forwarding rule.
- nat
Ips List<String> - NOTE: This field is temporarily non-functional due to an underlying API issue. Any value provided here will be ignored until the API issue is resolved, expected around 2026-03. 'The nat IPs of the connected endpoint.'
- propagated
Connection NumberCount - The number of consumer Network Connectivity Center spokes that the connected Private Service Connect endpoint has propagated to.
- psc
Connection StringId - The PSC connection id of the connected endpoint.
- status String
- The status of the connection from the consumer forwarding rule to this service attachment.
GetServiceAttachmentConsumerAcceptList
- Connection
Limit int - The number of consumer forwarding rules the consumer project can create.
- Endpoint
Url string - The endpoint that is allowed to connect to this service attachment. Only one of project_id_or_num, networkUrl and endpointUrl may be set.
- Network
Url string - The network that is allowed to connect to this service attachment. Only one of projectIdOrNum and networkUrl may be set.
- Project
Id stringOr Num - A project that is allowed to connect to this service attachment. Only one of projectIdOrNum and networkUrl may be set.
- Connection
Limit int - The number of consumer forwarding rules the consumer project can create.
- Endpoint
Url string - The endpoint that is allowed to connect to this service attachment. Only one of project_id_or_num, networkUrl and endpointUrl may be set.
- Network
Url string - The network that is allowed to connect to this service attachment. Only one of projectIdOrNum and networkUrl may be set.
- Project
Id stringOr Num - A project that is allowed to connect to this service attachment. Only one of projectIdOrNum and networkUrl may be set.
- connection_
limit number - The number of consumer forwarding rules the consumer project can create.
- endpoint_
url string - The endpoint that is allowed to connect to this service attachment. Only one of project_id_or_num, networkUrl and endpointUrl may be set.
- network_
url string - The network that is allowed to connect to this service attachment. Only one of projectIdOrNum and networkUrl may be set.
- project_
id_ stringor_ num - A project that is allowed to connect to this service attachment. Only one of projectIdOrNum and networkUrl may be set.
- connection
Limit Integer - The number of consumer forwarding rules the consumer project can create.
- endpoint
Url String - The endpoint that is allowed to connect to this service attachment. Only one of project_id_or_num, networkUrl and endpointUrl may be set.
- network
Url String - The network that is allowed to connect to this service attachment. Only one of projectIdOrNum and networkUrl may be set.
- project
Id StringOr Num - A project that is allowed to connect to this service attachment. Only one of projectIdOrNum and networkUrl may be set.
- connection
Limit number - The number of consumer forwarding rules the consumer project can create.
- endpoint
Url string - The endpoint that is allowed to connect to this service attachment. Only one of project_id_or_num, networkUrl and endpointUrl may be set.
- network
Url string - The network that is allowed to connect to this service attachment. Only one of projectIdOrNum and networkUrl may be set.
- project
Id stringOr Num - A project that is allowed to connect to this service attachment. Only one of projectIdOrNum and networkUrl may be set.
- connection_
limit int - The number of consumer forwarding rules the consumer project can create.
- endpoint_
url str - The endpoint that is allowed to connect to this service attachment. Only one of project_id_or_num, networkUrl and endpointUrl may be set.
- network_
url str - The network that is allowed to connect to this service attachment. Only one of projectIdOrNum and networkUrl may be set.
- project_
id_ stror_ num - A project that is allowed to connect to this service attachment. Only one of projectIdOrNum and networkUrl may be set.
- connection
Limit Number - The number of consumer forwarding rules the consumer project can create.
- endpoint
Url String - The endpoint that is allowed to connect to this service attachment. Only one of project_id_or_num, networkUrl and endpointUrl may be set.
- network
Url String - The network that is allowed to connect to this service attachment. Only one of projectIdOrNum and networkUrl may be set.
- project
Id StringOr Num - A project that is allowed to connect to this service attachment. Only one of projectIdOrNum and networkUrl may be set.
GetServiceAttachmentPscServiceAttachmentId
GetServiceAttachmentTunnelingConfig
- Encapsulation
Profile string - The encapsulation profile for tunneling traffic.
- Routing
Mode string - The routing mode for tunneling traffic.
- Encapsulation
Profile string - The encapsulation profile for tunneling traffic.
- Routing
Mode string - The routing mode for tunneling traffic.
- encapsulation_
profile string - The encapsulation profile for tunneling traffic.
- routing_
mode string - The routing mode for tunneling traffic.
- encapsulation
Profile String - The encapsulation profile for tunneling traffic.
- routing
Mode String - The routing mode for tunneling traffic.
- encapsulation
Profile string - The encapsulation profile for tunneling traffic.
- routing
Mode string - The routing mode for tunneling traffic.
- encapsulation_
profile str - The encapsulation profile for tunneling traffic.
- routing_
mode str - The routing mode for tunneling traffic.
- encapsulation
Profile String - The encapsulation profile for tunneling traffic.
- routing
Mode String - The routing mode for tunneling traffic.
Package Details
- Repository
- Google Cloud (GCP) Classic pulumi/pulumi-gcp
- License
- Apache-2.0
- Notes
- This Pulumi package is based on the
google-betaTerraform Provider.
Viewing docs for Google Cloud v9.26.0
published on Tuesday, Jun 9, 2026 by Pulumi
published on Tuesday, Jun 9, 2026 by Pulumi