published on Wednesday, Sep 30, 2026 by Pulumi
published on Wednesday, Sep 30, 2026 by Pulumi
Provides information about a Linode VPC subnet. For more information, see the Linode APIv4 docs.
Example Usage
The following example shows how one might use this data source to access information about a Linode VPC subnet.
import * as pulumi from "@pulumi/pulumi";
import * as linode from "@pulumi/linode";
const foo = linode.getVpcSubnet({
vpcId: 123,
id: "12345",
});
export const vpcSubnet = foo;
import pulumi
import pulumi_linode as linode
foo = linode.get_vpc_subnet(vpc_id=123,
id="12345")
pulumi.export("vpcSubnet", foo)
package main
import (
"github.com/pulumi/pulumi-linode/sdk/v6/go/linode"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
foo, err := linode.GetVpcSubnet(ctx, &linode.LookupVpcSubnetArgs{
VpcId: 123,
Id: "12345",
}, nil)
if err != nil {
return err
}
ctx.Export("vpcSubnet", foo)
return nil
})
}
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Linode = Pulumi.Linode;
return await Deployment.RunAsync(() =>
{
var foo = Linode.GetVpcSubnet.Invoke(new()
{
VpcId = 123,
Id = "12345",
});
return new Dictionary<string, object?>
{
["vpcSubnet"] = foo,
};
});
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.linode.LinodeFunctions;
import com.pulumi.linode.inputs.GetVpcSubnetArgs;
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 foo = LinodeFunctions.getVpcSubnet(GetVpcSubnetArgs.builder()
.vpcId(123)
.id("12345")
.build());
ctx.export("vpcSubnet", foo);
}
}
variables:
foo:
fn::invoke:
function: linode:getVpcSubnet
arguments:
vpcId: 123
id: 12345
outputs:
vpcSubnet: ${foo}
pulumi {
required_providers {
linode = {
source = "pulumi/linode"
}
}
}
data "linode_getvpcsubnet" "foo" {
vpc_id = 123
id = 12345
}
output "vpcSubnet" {
value = data.linode_getvpcsubnet.foo
}
IPv6
Limited Availability IPv6 VPCs may not currently be available to all users.
The following attributes are exported under each entry of the ipv6 field:
range- An IPv6 range allocated to this subnet in CIDR format.
Using getVpcSubnet
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 getVpcSubnet(args: GetVpcSubnetArgs, opts?: InvokeOptions): Promise<GetVpcSubnetResult>
function getVpcSubnetOutput(args: GetVpcSubnetOutputArgs, opts?: InvokeOutputOptions): Output<GetVpcSubnetResult>def get_vpc_subnet(id: Optional[str] = None,
vpc_id: Optional[int] = None,
opts: Optional[InvokeOptions] = None) -> GetVpcSubnetResult
def get_vpc_subnet_output(id: pulumi.Input[Optional[str]] = None,
vpc_id: pulumi.Input[Optional[int]] = None,
opts: Optional[InvokeOutputOptions] = None) -> Output[GetVpcSubnetResult]func LookupVpcSubnet(ctx *Context, args *LookupVpcSubnetArgs, opts ...InvokeOption) (*LookupVpcSubnetResult, error)
func LookupVpcSubnetOutput(ctx *Context, args *LookupVpcSubnetOutputArgs, opts ...InvokeOption) LookupVpcSubnetResultOutput> Note: This function is named LookupVpcSubnet in the Go SDK.
public static class GetVpcSubnet
{
public static Task<GetVpcSubnetResult> InvokeAsync(GetVpcSubnetArgs args, InvokeOptions? opts = null)
public static Output<GetVpcSubnetResult> Invoke(GetVpcSubnetInvokeArgs args, InvokeOptions? opts = null)
public static Output<GetVpcSubnetResult> Invoke(GetVpcSubnetInvokeArgs args, InvokeOutputOptions opts)
}public static CompletableFuture<GetVpcSubnetResult> getVpcSubnet(GetVpcSubnetArgs args, InvokeOptions options)
public static Output<GetVpcSubnetResult> getVpcSubnet(GetVpcSubnetArgs args, InvokeOptions options)
public static Output<GetVpcSubnetResult> getVpcSubnet(GetVpcSubnetArgs args, InvokeOutputOptions options)
fn::invoke:
function: linode:index/getVpcSubnet:getVpcSubnet
arguments:
# arguments dictionarydata "linode_get_vpc_subnet" "name" {
# arguments
}The following arguments are supported:
getVpcSubnet Result
The following output properties are available:
- Created string
- The date and time when the VPC Subnet was created.
- Databases
List<Get
Vpc Subnet Database> - (Read-Only Object List) A list of Managed databases assigned to the VPC Subnet. Referenced with an index (e.g.
databases.0.id). - Id string
- ID of a NodeBalancer assigned to the VPC Subnet.
- Ipv4 string
- The IPv4 range of this subnet in CIDR format.
- Ipv6s
List<Get
Vpc Subnet Ipv6> - Label string
- The label of the VPC subnet.
- Linodes
List<Get
Vpc Subnet Linode> - (Read-Only Object List) A list of Linodes added to this subnet. Referenced with an index (e.g.
linodes.0.id). - Nodebalancers
List<Get
Vpc Subnet Nodebalancer> - (Read-Only Object List) A list of NodeBalancers assigned to the VPC Subnet. Referenced with an index (e.g.
nodebalancers.0.id). - Updated string
- The date and time when the VPC Subnet was last updated.
- Vpc
Id int - Vpc
Type string - The type of the parent VPC (
regularorrdma). Omitted if the requesting account does not have access to the GPUDirect RDMA functionality.
- Created string
- The date and time when the VPC Subnet was created.
- Databases
[]Get
Vpc Subnet Database - (Read-Only Object List) A list of Managed databases assigned to the VPC Subnet. Referenced with an index (e.g.
databases.0.id). - Id string
- ID of a NodeBalancer assigned to the VPC Subnet.
- Ipv4 string
- The IPv4 range of this subnet in CIDR format.
- Ipv6s
[]Get
Vpc Subnet Ipv6 - Label string
- The label of the VPC subnet.
- Linodes
[]Get
Vpc Subnet Linode - (Read-Only Object List) A list of Linodes added to this subnet. Referenced with an index (e.g.
linodes.0.id). - Nodebalancers
[]Get
Vpc Subnet Nodebalancer - (Read-Only Object List) A list of NodeBalancers assigned to the VPC Subnet. Referenced with an index (e.g.
nodebalancers.0.id). - Updated string
- The date and time when the VPC Subnet was last updated.
- Vpc
Id int - Vpc
Type string - The type of the parent VPC (
regularorrdma). Omitted if the requesting account does not have access to the GPUDirect RDMA functionality.
- created string
- The date and time when the VPC Subnet was created.
- databases list(object)
- (Read-Only Object List) A list of Managed databases assigned to the VPC Subnet. Referenced with an index (e.g.
databases.0.id). - id string
- ID of a NodeBalancer assigned to the VPC Subnet.
- ipv4 string
- The IPv4 range of this subnet in CIDR format.
- ipv6s list(object)
- label string
- The label of the VPC subnet.
- linodes list(object)
- (Read-Only Object List) A list of Linodes added to this subnet. Referenced with an index (e.g.
linodes.0.id). - nodebalancers list(object)
- (Read-Only Object List) A list of NodeBalancers assigned to the VPC Subnet. Referenced with an index (e.g.
nodebalancers.0.id). - updated string
- The date and time when the VPC Subnet was last updated.
- vpc_
id number - vpc_
type string - The type of the parent VPC (
regularorrdma). Omitted if the requesting account does not have access to the GPUDirect RDMA functionality.
- created String
- The date and time when the VPC Subnet was created.
- databases
List<Get
Vpc Subnet Database> - (Read-Only Object List) A list of Managed databases assigned to the VPC Subnet. Referenced with an index (e.g.
databases.0.id). - id String
- ID of a NodeBalancer assigned to the VPC Subnet.
- ipv4 String
- The IPv4 range of this subnet in CIDR format.
- ipv6s
List<Get
Vpc Subnet Ipv6> - label String
- The label of the VPC subnet.
- linodes
List<Get
Vpc Subnet Linode> - (Read-Only Object List) A list of Linodes added to this subnet. Referenced with an index (e.g.
linodes.0.id). - nodebalancers
List<Get
Vpc Subnet Nodebalancer> - (Read-Only Object List) A list of NodeBalancers assigned to the VPC Subnet. Referenced with an index (e.g.
nodebalancers.0.id). - updated String
- The date and time when the VPC Subnet was last updated.
- vpc
Id Integer - vpc
Type String - The type of the parent VPC (
regularorrdma). Omitted if the requesting account does not have access to the GPUDirect RDMA functionality.
- created string
- The date and time when the VPC Subnet was created.
- databases
Get
Vpc Subnet Database[] - (Read-Only Object List) A list of Managed databases assigned to the VPC Subnet. Referenced with an index (e.g.
databases.0.id). - id string
- ID of a NodeBalancer assigned to the VPC Subnet.
- ipv4 string
- The IPv4 range of this subnet in CIDR format.
- ipv6s
Get
Vpc Subnet Ipv6[] - label string
- The label of the VPC subnet.
- linodes
Get
Vpc Subnet Linode[] - (Read-Only Object List) A list of Linodes added to this subnet. Referenced with an index (e.g.
linodes.0.id). - nodebalancers
Get
Vpc Subnet Nodebalancer[] - (Read-Only Object List) A list of NodeBalancers assigned to the VPC Subnet. Referenced with an index (e.g.
nodebalancers.0.id). - updated string
- The date and time when the VPC Subnet was last updated.
- vpc
Id number - vpc
Type string - The type of the parent VPC (
regularorrdma). Omitted if the requesting account does not have access to the GPUDirect RDMA functionality.
- created str
- The date and time when the VPC Subnet was created.
- databases
Sequence[Get
Vpc Subnet Database] - (Read-Only Object List) A list of Managed databases assigned to the VPC Subnet. Referenced with an index (e.g.
databases.0.id). - id str
- ID of a NodeBalancer assigned to the VPC Subnet.
- ipv4 str
- The IPv4 range of this subnet in CIDR format.
- ipv6s
Sequence[Get
Vpc Subnet Ipv6] - label str
- The label of the VPC subnet.
- linodes
Sequence[Get
Vpc Subnet Linode] - (Read-Only Object List) A list of Linodes added to this subnet. Referenced with an index (e.g.
linodes.0.id). - nodebalancers
Sequence[Get
Vpc Subnet Nodebalancer] - (Read-Only Object List) A list of NodeBalancers assigned to the VPC Subnet. Referenced with an index (e.g.
nodebalancers.0.id). - updated str
- The date and time when the VPC Subnet was last updated.
- vpc_
id int - vpc_
type str - The type of the parent VPC (
regularorrdma). Omitted if the requesting account does not have access to the GPUDirect RDMA functionality.
- created String
- The date and time when the VPC Subnet was created.
- databases List<Property Map>
- (Read-Only Object List) A list of Managed databases assigned to the VPC Subnet. Referenced with an index (e.g.
databases.0.id). - id String
- ID of a NodeBalancer assigned to the VPC Subnet.
- ipv4 String
- The IPv4 range of this subnet in CIDR format.
- ipv6s List<Property Map>
- label String
- The label of the VPC subnet.
- linodes List<Property Map>
- (Read-Only Object List) A list of Linodes added to this subnet. Referenced with an index (e.g.
linodes.0.id). - nodebalancers List<Property Map>
- (Read-Only Object List) A list of NodeBalancers assigned to the VPC Subnet. Referenced with an index (e.g.
nodebalancers.0.id). - updated String
- The date and time when the VPC Subnet was last updated.
- vpc
Id Number - vpc
Type String - The type of the parent VPC (
regularorrdma). Omitted if the requesting account does not have access to the GPUDirect RDMA functionality.
Supporting Types
GetVpcSubnetDatabase
- Id int
- The unique id of this VPC subnet.
- Ipv4Range string
- IPv4 range assigned to the NodeBalancer.
- Ipv6Ranges
List<Get
Vpc Subnet Database Ipv6Range> - (Read-Only Object List) A list of IPv6 ranges assigned to the NodeBalancer. Referenced with an index (e.g.
nodebalancers.0.ipv6_ranges.0.range).
- Id int
- The unique id of this VPC subnet.
- Ipv4Range string
- IPv4 range assigned to the NodeBalancer.
- Ipv6Ranges
[]Get
Vpc Subnet Database Ipv6Range - (Read-Only Object List) A list of IPv6 ranges assigned to the NodeBalancer. Referenced with an index (e.g.
nodebalancers.0.ipv6_ranges.0.range).
- id number
- The unique id of this VPC subnet.
- ipv4_
range string - IPv4 range assigned to the NodeBalancer.
- ipv6_
ranges list(object) - (Read-Only Object List) A list of IPv6 ranges assigned to the NodeBalancer. Referenced with an index (e.g.
nodebalancers.0.ipv6_ranges.0.range).
- id Integer
- The unique id of this VPC subnet.
- ipv4Range String
- IPv4 range assigned to the NodeBalancer.
- ipv6Ranges
List<Get
Vpc Subnet Database Ipv6Range> - (Read-Only Object List) A list of IPv6 ranges assigned to the NodeBalancer. Referenced with an index (e.g.
nodebalancers.0.ipv6_ranges.0.range).
- id number
- The unique id of this VPC subnet.
- ipv4Range string
- IPv4 range assigned to the NodeBalancer.
- ipv6Ranges
Get
Vpc Subnet Database Ipv6Range[] - (Read-Only Object List) A list of IPv6 ranges assigned to the NodeBalancer. Referenced with an index (e.g.
nodebalancers.0.ipv6_ranges.0.range).
- id int
- The unique id of this VPC subnet.
- ipv4_
range str - IPv4 range assigned to the NodeBalancer.
- ipv6_
ranges Sequence[GetVpc Subnet Database Ipv6Range] - (Read-Only Object List) A list of IPv6 ranges assigned to the NodeBalancer. Referenced with an index (e.g.
nodebalancers.0.ipv6_ranges.0.range).
- id Number
- The unique id of this VPC subnet.
- ipv4Range String
- IPv4 range assigned to the NodeBalancer.
- ipv6Ranges List<Property Map>
- (Read-Only Object List) A list of IPv6 ranges assigned to the NodeBalancer. Referenced with an index (e.g.
nodebalancers.0.ipv6_ranges.0.range).
GetVpcSubnetDatabaseIpv6Range
- Range string
- An IPv6 address range in CIDR notation.
- Range string
- An IPv6 address range in CIDR notation.
- range string
- An IPv6 address range in CIDR notation.
- range String
- An IPv6 address range in CIDR notation.
- range string
- An IPv6 address range in CIDR notation.
- range str
- An IPv6 address range in CIDR notation.
- range String
- An IPv6 address range in CIDR notation.
GetVpcSubnetIpv6
- Range string
- An IPv6 address range in CIDR notation.
- Range string
- An IPv6 address range in CIDR notation.
- range string
- An IPv6 address range in CIDR notation.
- range String
- An IPv6 address range in CIDR notation.
- range string
- An IPv6 address range in CIDR notation.
- range str
- An IPv6 address range in CIDR notation.
- range String
- An IPv6 address range in CIDR notation.
GetVpcSubnetLinode
- Id int
- The unique id of this VPC subnet.
- Interfaces
List<Get
Vpc Subnet Linode Interface> - (Read-Only Object List) A list of networking interfaces objects. Referenced with an index (e.g.
linodes.0.interfaces.0.id).
- Id int
- The unique id of this VPC subnet.
- Interfaces
[]Get
Vpc Subnet Linode Interface - (Read-Only Object List) A list of networking interfaces objects. Referenced with an index (e.g.
linodes.0.interfaces.0.id).
- id number
- The unique id of this VPC subnet.
- interfaces list(object)
- (Read-Only Object List) A list of networking interfaces objects. Referenced with an index (e.g.
linodes.0.interfaces.0.id).
- id Integer
- The unique id of this VPC subnet.
- interfaces
List<Get
Vpc Subnet Linode Interface> - (Read-Only Object List) A list of networking interfaces objects. Referenced with an index (e.g.
linodes.0.interfaces.0.id).
- id number
- The unique id of this VPC subnet.
- interfaces
Get
Vpc Subnet Linode Interface[] - (Read-Only Object List) A list of networking interfaces objects. Referenced with an index (e.g.
linodes.0.interfaces.0.id).
- id int
- The unique id of this VPC subnet.
- interfaces
Sequence[Get
Vpc Subnet Linode Interface] - (Read-Only Object List) A list of networking interfaces objects. Referenced with an index (e.g.
linodes.0.interfaces.0.id).
- id Number
- The unique id of this VPC subnet.
- interfaces List<Property Map>
- (Read-Only Object List) A list of networking interfaces objects. Referenced with an index (e.g.
linodes.0.interfaces.0.id).
GetVpcSubnetLinodeInterface
GetVpcSubnetNodebalancer
- Id int
- The unique id of this VPC subnet.
- Ipv4Range string
- IPv4 range assigned to the NodeBalancer.
- Ipv6Ranges
List<Get
Vpc Subnet Nodebalancer Ipv6Range> - (Read-Only Object List) A list of IPv6 ranges assigned to the NodeBalancer. Referenced with an index (e.g.
nodebalancers.0.ipv6_ranges.0.range).
- Id int
- The unique id of this VPC subnet.
- Ipv4Range string
- IPv4 range assigned to the NodeBalancer.
- Ipv6Ranges
[]Get
Vpc Subnet Nodebalancer Ipv6Range - (Read-Only Object List) A list of IPv6 ranges assigned to the NodeBalancer. Referenced with an index (e.g.
nodebalancers.0.ipv6_ranges.0.range).
- id number
- The unique id of this VPC subnet.
- ipv4_
range string - IPv4 range assigned to the NodeBalancer.
- ipv6_
ranges list(object) - (Read-Only Object List) A list of IPv6 ranges assigned to the NodeBalancer. Referenced with an index (e.g.
nodebalancers.0.ipv6_ranges.0.range).
- id Integer
- The unique id of this VPC subnet.
- ipv4Range String
- IPv4 range assigned to the NodeBalancer.
- ipv6Ranges
List<Get
Vpc Subnet Nodebalancer Ipv6Range> - (Read-Only Object List) A list of IPv6 ranges assigned to the NodeBalancer. Referenced with an index (e.g.
nodebalancers.0.ipv6_ranges.0.range).
- id number
- The unique id of this VPC subnet.
- ipv4Range string
- IPv4 range assigned to the NodeBalancer.
- ipv6Ranges
Get
Vpc Subnet Nodebalancer Ipv6Range[] - (Read-Only Object List) A list of IPv6 ranges assigned to the NodeBalancer. Referenced with an index (e.g.
nodebalancers.0.ipv6_ranges.0.range).
- id int
- The unique id of this VPC subnet.
- ipv4_
range str - IPv4 range assigned to the NodeBalancer.
- ipv6_
ranges Sequence[GetVpc Subnet Nodebalancer Ipv6Range] - (Read-Only Object List) A list of IPv6 ranges assigned to the NodeBalancer. Referenced with an index (e.g.
nodebalancers.0.ipv6_ranges.0.range).
- id Number
- The unique id of this VPC subnet.
- ipv4Range String
- IPv4 range assigned to the NodeBalancer.
- ipv6Ranges List<Property Map>
- (Read-Only Object List) A list of IPv6 ranges assigned to the NodeBalancer. Referenced with an index (e.g.
nodebalancers.0.ipv6_ranges.0.range).
GetVpcSubnetNodebalancerIpv6Range
- Range string
- An IPv6 address range in CIDR notation.
- Range string
- An IPv6 address range in CIDR notation.
- range string
- An IPv6 address range in CIDR notation.
- range String
- An IPv6 address range in CIDR notation.
- range string
- An IPv6 address range in CIDR notation.
- range str
- An IPv6 address range in CIDR notation.
- range String
- An IPv6 address range in CIDR notation.
Package Details
- Repository
- Linode pulumi/pulumi-linode
- License
- Apache-2.0
- Notes
- This Pulumi package is based on the
linodeTerraform Provider.
published on Wednesday, Sep 30, 2026 by Pulumi