Google Cloud v9.3.0 published on Tuesday, Oct 7, 2025 by Pulumi
gcp.compute.getInterconnectLocation
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:
getInterconnectLocation Result
The following output properties are available:
- Address string
- The postal address of the Point of Presence.
- Availability
Zone 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.
- Facility
Provider string - The name of the provider for this facility.
- Facility
Provider stringFacility Id - A provider-assigned Identifier for this facility.
- Id string
- The provider-assigned unique ID for this managed resource.
- Name string
- Peeringdb
Facility stringId - The PeeringDB facility ID for this facility.
- Project string
- Self
Link string - The URI of the created resource.
- Status string
- The status of this InterconnectLocation.
- Address string
- The postal address of the Point of Presence.
- Availability
Zone 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.
- Facility
Provider string - The name of the provider for this facility.
- Facility
Provider stringFacility Id - A provider-assigned Identifier for this facility.
- Id string
- The provider-assigned unique ID for this managed resource.
- Name string
- Peeringdb
Facility stringId - The PeeringDB facility ID for this facility.
- Project string
- Self
Link string - The URI of the created resource.
- Status string
- The status of this InterconnectLocation.
- address String
- The postal address of the Point of Presence.
- availability
Zone 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.
- facility
Provider String - The name of the provider for this facility.
- facility
Provider StringFacility Id - A provider-assigned Identifier for this facility.
- id String
- The provider-assigned unique ID for this managed resource.
- name String
- peeringdb
Facility StringId - The PeeringDB facility ID for this facility.
- project String
- self
Link String - The URI of the created resource.
- status String
- The status of this InterconnectLocation.
- address string
- The postal address of the Point of Presence.
- availability
Zone 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.
- facility
Provider string - The name of the provider for this facility.
- facility
Provider stringFacility Id - A provider-assigned Identifier for this facility.
- id string
- The provider-assigned unique ID for this managed resource.
- name string
- peeringdb
Facility stringId - The PeeringDB facility ID for this facility.
- project string
- self
Link 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_ strfacility_ id - A provider-assigned Identifier for this facility.
- id str
- The provider-assigned unique ID for this managed resource.
- name str
- peeringdb_
facility_ strid - 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.
- availability
Zone 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.
- facility
Provider String - The name of the provider for this facility.
- facility
Provider StringFacility Id - A provider-assigned Identifier for this facility.
- id String
- The provider-assigned unique ID for this managed resource.
- name String
- peeringdb
Facility StringId - The PeeringDB facility ID for this facility.
- project String
- self
Link 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.