1. Packages
  2. Google Cloud (GCP) Classic
  3. API Docs
  4. compute
  5. getInterconnectLocation
Google Cloud v9.3.0 published on Tuesday, Oct 7, 2025 by Pulumi

gcp.compute.getInterconnectLocation

Deploy with Pulumi
gcp logo
Google Cloud v9.3.0 published on Tuesday, Oct 7, 2025 by Pulumi

    Get the details of a single interconnect location. For more information see the official API documentation.

    Example Usage

    import * as pulumi from "@pulumi/pulumi";
    import * as gcp from "@pulumi/gcp";
    
    const _this = gcp.compute.getInterconnectLocation({
        name: "iad-zone1-1",
    });
    const thisInterconnect = new gcp.compute.Interconnect("this", {
        project: _this.then(_this => _this.project),
        location: _this.then(_this => _this.selfLink),
        name: "my-dedicated-connection-1",
    });
    
    import pulumi
    import pulumi_gcp as gcp
    
    this = gcp.compute.get_interconnect_location(name="iad-zone1-1")
    this_interconnect = gcp.compute.Interconnect("this",
        project=this.project,
        location=this.self_link,
        name="my-dedicated-connection-1")
    
    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 {
    		this, err := compute.GetInterconnectLocation(ctx, &compute.GetInterconnectLocationArgs{
    			Name: "iad-zone1-1",
    		}, nil)
    		if err != nil {
    			return err
    		}
    		_, err = compute.NewInterconnect(ctx, "this", &compute.InterconnectArgs{
    			Project:  pulumi.String(this.Project),
    			Location: pulumi.String(this.SelfLink),
    			Name:     pulumi.String("my-dedicated-connection-1"),
    		})
    		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 @this = Gcp.Compute.GetInterconnectLocation.Invoke(new()
        {
            Name = "iad-zone1-1",
        });
    
        var thisInterconnect = new Gcp.Compute.Interconnect("this", new()
        {
            Project = @this.Apply(@this => @this.Apply(getInterconnectLocationResult => getInterconnectLocationResult.Project)),
            Location = @this.Apply(@this => @this.Apply(getInterconnectLocationResult => getInterconnectLocationResult.SelfLink)),
            Name = "my-dedicated-connection-1",
        });
    
    });
    
    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.GetInterconnectLocationArgs;
    import com.pulumi.gcp.compute.Interconnect;
    import com.pulumi.gcp.compute.InterconnectArgs;
    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) {
            final var this = ComputeFunctions.getInterconnectLocation(GetInterconnectLocationArgs.builder()
                .name("iad-zone1-1")
                .build());
    
            var thisInterconnect = new Interconnect("thisInterconnect", InterconnectArgs.builder()
                .project(this_.project())
                .location(this_.selfLink())
                .name("my-dedicated-connection-1")
                .build());
    
        }
    }
    
    resources:
      thisInterconnect:
        type: gcp:compute:Interconnect
        name: this
        properties:
          project: ${this.project}
          location: ${this.selfLink}
          name: my-dedicated-connection-1
    variables:
      this:
        fn::invoke:
          function: gcp:compute:getInterconnectLocation
          arguments:
            name: iad-zone1-1
    

    Using getInterconnectLocation

    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 getInterconnectLocation(args: GetInterconnectLocationArgs, opts?: InvokeOptions): Promise<GetInterconnectLocationResult>
    function getInterconnectLocationOutput(args: GetInterconnectLocationOutputArgs, opts?: InvokeOptions): Output<GetInterconnectLocationResult>
    def get_interconnect_location(name: Optional[str] = None,
                                  project: Optional[str] = None,
                                  opts: Optional[InvokeOptions] = None) -> GetInterconnectLocationResult
    def get_interconnect_location_output(name: Optional[pulumi.Input[str]] = None,
                                  project: Optional[pulumi.Input[str]] = None,
                                  opts: Optional[InvokeOptions] = None) -> Output[GetInterconnectLocationResult]
    func GetInterconnectLocation(ctx *Context, args *GetInterconnectLocationArgs, opts ...InvokeOption) (*GetInterconnectLocationResult, error)
    func GetInterconnectLocationOutput(ctx *Context, args *GetInterconnectLocationOutputArgs, opts ...InvokeOption) GetInterconnectLocationResultOutput

    > Note: This function is named GetInterconnectLocation in the Go SDK.

    public static class GetInterconnectLocation 
    {
        public static Task<GetInterconnectLocationResult> InvokeAsync(GetInterconnectLocationArgs args, InvokeOptions? opts = null)
        public static Output<GetInterconnectLocationResult> Invoke(GetInterconnectLocationInvokeArgs args, InvokeOptions? opts = null)
    }
    public static CompletableFuture<GetInterconnectLocationResult> getInterconnectLocation(GetInterconnectLocationArgs args, InvokeOptions options)
    public static Output<GetInterconnectLocationResult> getInterconnectLocation(GetInterconnectLocationArgs args, InvokeOptions options)
    
    fn::invoke:
      function: gcp:compute/getInterconnectLocation:getInterconnectLocation
      arguments:
        # arguments dictionary

    The following arguments are supported:

    Name string
    The name of the interconnect location.
    Project string
    The project in which the resource belongs. If it is not provided, the provider project is used.
    Name string
    The name of the interconnect location.
    Project string
    The project in which the resource belongs. If it is not provided, the provider project is used.
    name String
    The name of the interconnect location.
    project String
    The project in which the resource belongs. If it is not provided, the provider project is used.
    name string
    The name of the interconnect location.
    project string
    The project in which the resource belongs. If it is not provided, the provider project is used.
    name str
    The name of the interconnect location.
    project str
    The project in which the resource belongs. If it is not provided, the provider project is used.
    name String
    The name of the interconnect location.
    project String
    The project in which the resource belongs. If it is not provided, the provider project is used.

    getInterconnectLocation Result

    The following output properties are available:

    Address string
    The postal address of the Point of Presence.
    AvailabilityZone string
    The availability zone for this InterconnectLocation.
    City string
    The city for this location.
    Continent string
    The continent for this location.
    Description string
    A textual description of the resource.
    FacilityProvider string
    The name of the provider for this facility.
    FacilityProviderFacilityId string
    A provider-assigned Identifier for this facility.
    Id string
    The provider-assigned unique ID for this managed resource.
    Name string
    PeeringdbFacilityId string
    The PeeringDB facility ID for this facility.
    Project string
    SelfLink string
    The URI of the created resource.
    Status string
    The status of this InterconnectLocation.
    Address string
    The postal address of the Point of Presence.
    AvailabilityZone string
    The availability zone for this InterconnectLocation.
    City string
    The city for this location.
    Continent string
    The continent for this location.
    Description string
    A textual description of the resource.
    FacilityProvider string
    The name of the provider for this facility.
    FacilityProviderFacilityId string
    A provider-assigned Identifier for this facility.
    Id string
    The provider-assigned unique ID for this managed resource.
    Name string
    PeeringdbFacilityId string
    The PeeringDB facility ID for this facility.
    Project string
    SelfLink string
    The URI of the created resource.
    Status string
    The status of this InterconnectLocation.
    address String
    The postal address of the Point of Presence.
    availabilityZone String
    The availability zone for this InterconnectLocation.
    city String
    The city for this location.
    continent String
    The continent for this location.
    description String
    A textual description of the resource.
    facilityProvider String
    The name of the provider for this facility.
    facilityProviderFacilityId String
    A provider-assigned Identifier for this facility.
    id String
    The provider-assigned unique ID for this managed resource.
    name String
    peeringdbFacilityId String
    The PeeringDB facility ID for this facility.
    project String
    selfLink String
    The URI of the created resource.
    status String
    The status of this InterconnectLocation.
    address string
    The postal address of the Point of Presence.
    availabilityZone string
    The availability zone for this InterconnectLocation.
    city string
    The city for this location.
    continent string
    The continent for this location.
    description string
    A textual description of the resource.
    facilityProvider string
    The name of the provider for this facility.
    facilityProviderFacilityId string
    A provider-assigned Identifier for this facility.
    id string
    The provider-assigned unique ID for this managed resource.
    name string
    peeringdbFacilityId string
    The PeeringDB facility ID for this facility.
    project string
    selfLink string
    The URI of the created resource.
    status string
    The status of this InterconnectLocation.
    address str
    The postal address of the Point of Presence.
    availability_zone str
    The availability zone for this InterconnectLocation.
    city str
    The city for this location.
    continent str
    The continent for this location.
    description str
    A textual description of the resource.
    facility_provider str
    The name of the provider for this facility.
    facility_provider_facility_id str
    A provider-assigned Identifier for this facility.
    id str
    The provider-assigned unique ID for this managed resource.
    name str
    peeringdb_facility_id str
    The PeeringDB facility ID for this facility.
    project str
    self_link str
    The URI of the created resource.
    status str
    The status of this InterconnectLocation.
    address String
    The postal address of the Point of Presence.
    availabilityZone String
    The availability zone for this InterconnectLocation.
    city String
    The city for this location.
    continent String
    The continent for this location.
    description String
    A textual description of the resource.
    facilityProvider String
    The name of the provider for this facility.
    facilityProviderFacilityId String
    A provider-assigned Identifier for this facility.
    id String
    The provider-assigned unique ID for this managed resource.
    name String
    peeringdbFacilityId String
    The PeeringDB facility ID for this facility.
    project String
    selfLink String
    The URI of the created resource.
    status String
    The status of this InterconnectLocation.

    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.
    gcp logo
    Google Cloud v9.3.0 published on Tuesday, Oct 7, 2025 by Pulumi
      Meet Neo: Your AI Platform Teammate