ionoscloud.getLan
Explore with Pulumi AI
The LAN data source can be used to search for and return existing lans. If a single match is found, it will be returned. If your search results in multiple matches, an error will be returned. When this happens, please refine your search string so that it is specific enough to return only one result.
Example Usage
By ID
import * as pulumi from "@pulumi/pulumi";
import * as ionoscloud from "@pulumi/ionoscloud";
const example = ionoscloud.getLan({
datacenterId: "datacenter_id",
id: "lan_id",
});
import pulumi
import pulumi_ionoscloud as ionoscloud
example = ionoscloud.get_lan(datacenter_id="datacenter_id",
id="lan_id")
package main
import (
"github.com/pulumi/pulumi-terraform-provider/sdks/go/ionoscloud/v6/ionoscloud"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
_, err := ionoscloud.LookupLan(ctx, &ionoscloud.LookupLanArgs{
DatacenterId: "datacenter_id",
Id: pulumi.StringRef("lan_id"),
}, nil)
if err != nil {
return err
}
return nil
})
}
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Ionoscloud = Pulumi.Ionoscloud;
return await Deployment.RunAsync(() =>
{
var example = Ionoscloud.GetLan.Invoke(new()
{
DatacenterId = "datacenter_id",
Id = "lan_id",
});
});
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.ionoscloud.IonoscloudFunctions;
import com.pulumi.ionoscloud.inputs.GetLanArgs;
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 example = IonoscloudFunctions.getLan(GetLanArgs.builder()
.datacenterId("datacenter_id")
.id("lan_id")
.build());
}
}
variables:
example:
fn::invoke:
function: ionoscloud:getLan
arguments:
datacenterId: datacenter_id
id: lan_id
By Name
import * as pulumi from "@pulumi/pulumi";
import * as ionoscloud from "@pulumi/ionoscloud";
const example = ionoscloud.getLan({
datacenterId: "datacenter_id",
name: "Lan Example",
});
import pulumi
import pulumi_ionoscloud as ionoscloud
example = ionoscloud.get_lan(datacenter_id="datacenter_id",
name="Lan Example")
package main
import (
"github.com/pulumi/pulumi-terraform-provider/sdks/go/ionoscloud/v6/ionoscloud"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
_, err := ionoscloud.LookupLan(ctx, &ionoscloud.LookupLanArgs{
DatacenterId: "datacenter_id",
Name: pulumi.StringRef("Lan Example"),
}, nil)
if err != nil {
return err
}
return nil
})
}
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Ionoscloud = Pulumi.Ionoscloud;
return await Deployment.RunAsync(() =>
{
var example = Ionoscloud.GetLan.Invoke(new()
{
DatacenterId = "datacenter_id",
Name = "Lan Example",
});
});
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.ionoscloud.IonoscloudFunctions;
import com.pulumi.ionoscloud.inputs.GetLanArgs;
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 example = IonoscloudFunctions.getLan(GetLanArgs.builder()
.datacenterId("datacenter_id")
.name("Lan Example")
.build());
}
}
variables:
example:
fn::invoke:
function: ionoscloud:getLan
arguments:
datacenterId: datacenter_id
name: Lan Example
Using getLan
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 getLan(args: GetLanArgs, opts?: InvokeOptions): Promise<GetLanResult>
function getLanOutput(args: GetLanOutputArgs, opts?: InvokeOptions): Output<GetLanResult>
def get_lan(datacenter_id: Optional[str] = None,
id: Optional[str] = None,
name: Optional[str] = None,
timeouts: Optional[GetLanTimeouts] = None,
opts: Optional[InvokeOptions] = None) -> GetLanResult
def get_lan_output(datacenter_id: Optional[pulumi.Input[str]] = None,
id: Optional[pulumi.Input[str]] = None,
name: Optional[pulumi.Input[str]] = None,
timeouts: Optional[pulumi.Input[GetLanTimeoutsArgs]] = None,
opts: Optional[InvokeOptions] = None) -> Output[GetLanResult]
func LookupLan(ctx *Context, args *LookupLanArgs, opts ...InvokeOption) (*LookupLanResult, error)
func LookupLanOutput(ctx *Context, args *LookupLanOutputArgs, opts ...InvokeOption) LookupLanResultOutput
> Note: This function is named LookupLan
in the Go SDK.
public static class GetLan
{
public static Task<GetLanResult> InvokeAsync(GetLanArgs args, InvokeOptions? opts = null)
public static Output<GetLanResult> Invoke(GetLanInvokeArgs args, InvokeOptions? opts = null)
}
public static CompletableFuture<GetLanResult> getLan(GetLanArgs args, InvokeOptions options)
public static Output<GetLanResult> getLan(GetLanArgs args, InvokeOptions options)
fn::invoke:
function: ionoscloud:index/getLan:getLan
arguments:
# arguments dictionary
The following arguments are supported:
- Datacenter
Id string - Datacenter's UUID.
- Id string
ID of the lan you want to search for.
datacenter_id
and eithername
orid
must be provided. If none, or both ofname
andid
are provided, the datasource will return an error.- Name string
- Name of an existing lan that you want to search for.
- Timeouts
Get
Lan Timeouts
- Datacenter
Id string - Datacenter's UUID.
- Id string
ID of the lan you want to search for.
datacenter_id
and eithername
orid
must be provided. If none, or both ofname
andid
are provided, the datasource will return an error.- Name string
- Name of an existing lan that you want to search for.
- Timeouts
Get
Lan Timeouts
- datacenter
Id String - Datacenter's UUID.
- id String
ID of the lan you want to search for.
datacenter_id
and eithername
orid
must be provided. If none, or both ofname
andid
are provided, the datasource will return an error.- name String
- Name of an existing lan that you want to search for.
- timeouts
Get
Lan Timeouts
- datacenter
Id string - Datacenter's UUID.
- id string
ID of the lan you want to search for.
datacenter_id
and eithername
orid
must be provided. If none, or both ofname
andid
are provided, the datasource will return an error.- name string
- Name of an existing lan that you want to search for.
- timeouts
Get
Lan Timeouts
- datacenter_
id str - Datacenter's UUID.
- id str
ID of the lan you want to search for.
datacenter_id
and eithername
orid
must be provided. If none, or both ofname
andid
are provided, the datasource will return an error.- name str
- Name of an existing lan that you want to search for.
- timeouts
Get
Lan Timeouts
- datacenter
Id String - Datacenter's UUID.
- id String
ID of the lan you want to search for.
datacenter_id
and eithername
orid
must be provided. If none, or both ofname
andid
are provided, the datasource will return an error.- name String
- Name of an existing lan that you want to search for.
- timeouts Property Map
getLan Result
The following output properties are available:
- Datacenter
Id string - The ID of lan's Virtual Data Center.
- Id string
- The id of the LAN.
- Ip
Failovers List<GetLan Ip Failover> - list of
- Ipv4Cidr
Block string - For public LANs this property is null, for private LANs it contains the private IPv4 CIDR range.
- Ipv6Cidr
Block string - Contains the LAN's /64 IPv6 CIDR block if this LAN is IPv6 enabled.
- Name string
- The name of the LAN.
- Pcc string
- The unique id of a
ionoscloud.PrivateCrossconnect
resource, in order. - Public bool
- Indicates if the LAN faces the public Internet (true) or not (false).
- Timeouts
Get
Lan Timeouts
- Datacenter
Id string - The ID of lan's Virtual Data Center.
- Id string
- The id of the LAN.
- Ip
Failovers []GetLan Ip Failover - list of
- Ipv4Cidr
Block string - For public LANs this property is null, for private LANs it contains the private IPv4 CIDR range.
- Ipv6Cidr
Block string - Contains the LAN's /64 IPv6 CIDR block if this LAN is IPv6 enabled.
- Name string
- The name of the LAN.
- Pcc string
- The unique id of a
ionoscloud.PrivateCrossconnect
resource, in order. - Public bool
- Indicates if the LAN faces the public Internet (true) or not (false).
- Timeouts
Get
Lan Timeouts
- datacenter
Id String - The ID of lan's Virtual Data Center.
- id String
- The id of the LAN.
- ip
Failovers List<GetLan Ip Failover> - list of
- ipv4Cidr
Block String - For public LANs this property is null, for private LANs it contains the private IPv4 CIDR range.
- ipv6Cidr
Block String - Contains the LAN's /64 IPv6 CIDR block if this LAN is IPv6 enabled.
- name String
- The name of the LAN.
- pcc String
- The unique id of a
ionoscloud.PrivateCrossconnect
resource, in order. - public_ Boolean
- Indicates if the LAN faces the public Internet (true) or not (false).
- timeouts
Get
Lan Timeouts
- datacenter
Id string - The ID of lan's Virtual Data Center.
- id string
- The id of the LAN.
- ip
Failovers GetLan Ip Failover[] - list of
- ipv4Cidr
Block string - For public LANs this property is null, for private LANs it contains the private IPv4 CIDR range.
- ipv6Cidr
Block string - Contains the LAN's /64 IPv6 CIDR block if this LAN is IPv6 enabled.
- name string
- The name of the LAN.
- pcc string
- The unique id of a
ionoscloud.PrivateCrossconnect
resource, in order. - public boolean
- Indicates if the LAN faces the public Internet (true) or not (false).
- timeouts
Get
Lan Timeouts
- datacenter_
id str - The ID of lan's Virtual Data Center.
- id str
- The id of the LAN.
- ip_
failovers Sequence[GetLan Ip Failover] - list of
- ipv4_
cidr_ strblock - For public LANs this property is null, for private LANs it contains the private IPv4 CIDR range.
- ipv6_
cidr_ strblock - Contains the LAN's /64 IPv6 CIDR block if this LAN is IPv6 enabled.
- name str
- The name of the LAN.
- pcc str
- The unique id of a
ionoscloud.PrivateCrossconnect
resource, in order. - public bool
- Indicates if the LAN faces the public Internet (true) or not (false).
- timeouts
Get
Lan Timeouts
- datacenter
Id String - The ID of lan's Virtual Data Center.
- id String
- The id of the LAN.
- ip
Failovers List<Property Map> - list of
- ipv4Cidr
Block String - For public LANs this property is null, for private LANs it contains the private IPv4 CIDR range.
- ipv6Cidr
Block String - Contains the LAN's /64 IPv6 CIDR block if this LAN is IPv6 enabled.
- name String
- The name of the LAN.
- pcc String
- The unique id of a
ionoscloud.PrivateCrossconnect
resource, in order. - public Boolean
- Indicates if the LAN faces the public Internet (true) or not (false).
- timeouts Property Map
Supporting Types
GetLanIpFailover
GetLanTimeouts
Package Details
- Repository
- ionoscloud ionos-cloud/terraform-provider-ionoscloud
- License
- Notes
- This Pulumi package is based on the
ionoscloud
Terraform Provider.