linode.getVpcIps
Explore with Pulumi AI
Provides information about a list of Linode VPC IPs that match a set of filters. For more information, see the Linode APIv4 docs.
Provides information about a list of Linode VPC IPs in a specific VPC that match a set of filters. For more information, see the Linode APIv4 docs.
Example Usage
The following example shows how one might use this data source to list VPC IPs.
import * as pulumi from "@pulumi/pulumi";
import * as linode from "@pulumi/linode";
const filtered-ips = linode.getVpcIps({
filters: [{
name: "address",
values: ["10.0.0.0"],
}],
});
export const vpcIps = filtered_ips.then(filtered_ips => filtered_ips.vpcIps);
import pulumi
import pulumi_linode as linode
filtered_ips = linode.get_vpc_ips(filters=[{
"name": "address",
"values": ["10.0.0.0"],
}])
pulumi.export("vpcIps", filtered_ips.vpc_ips)
package main
import (
"github.com/pulumi/pulumi-linode/sdk/v4/go/linode"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
filtered_ips, err := linode.GetVpcIps(ctx, &linode.GetVpcIpsArgs{
Filters: []linode.GetVpcIpsFilter{
{
Name: "address",
Values: []string{
"10.0.0.0",
},
},
},
}, nil)
if err != nil {
return err
}
ctx.Export("vpcIps", filtered_ips.VpcIps)
return nil
})
}
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Linode = Pulumi.Linode;
return await Deployment.RunAsync(() =>
{
var filtered_ips = Linode.GetVpcIps.Invoke(new()
{
Filters = new[]
{
new Linode.Inputs.GetVpcIpsFilterInputArgs
{
Name = "address",
Values = new[]
{
"10.0.0.0",
},
},
},
});
return new Dictionary<string, object?>
{
["vpcIps"] = filtered_ips.Apply(filtered_ips => filtered_ips.Apply(getVpcIpsResult => getVpcIpsResult.VpcIps)),
};
});
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.GetVpcIpsArgs;
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 filtered-ips = LinodeFunctions.getVpcIps(GetVpcIpsArgs.builder()
.filters(GetVpcIpsFilterArgs.builder()
.name("address")
.values("10.0.0.0")
.build())
.build());
ctx.export("vpcIps", filtered_ips.vpcIps());
}
}
variables:
filtered-ips:
fn::invoke:
Function: linode:getVpcIps
Arguments:
filters:
- name: address
values:
- 10.0.0.0
outputs:
vpcIps: ${["filtered-ips"].vpcIps}
One might also use this data source to list all VPC IPs in a specific VPC. The following example shows how to do this.
import * as pulumi from "@pulumi/pulumi";
import * as linode from "@pulumi/linode";
const specific-vpc-ips = linode.getVpcIps({
vpcId: 123,
});
export const vpcIps = specific_vpc_ips.then(specific_vpc_ips => specific_vpc_ips.vpcIps);
import pulumi
import pulumi_linode as linode
specific_vpc_ips = linode.get_vpc_ips(vpc_id=123)
pulumi.export("vpcIps", specific_vpc_ips.vpc_ips)
package main
import (
"github.com/pulumi/pulumi-linode/sdk/v4/go/linode"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
specific_vpc_ips, err := linode.GetVpcIps(ctx, &linode.GetVpcIpsArgs{
VpcId: pulumi.IntRef(123),
}, nil)
if err != nil {
return err
}
ctx.Export("vpcIps", specific_vpc_ips.VpcIps)
return nil
})
}
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Linode = Pulumi.Linode;
return await Deployment.RunAsync(() =>
{
var specific_vpc_ips = Linode.GetVpcIps.Invoke(new()
{
VpcId = 123,
});
return new Dictionary<string, object?>
{
["vpcIps"] = specific_vpc_ips.Apply(specific_vpc_ips => specific_vpc_ips.Apply(getVpcIpsResult => getVpcIpsResult.VpcIps)),
};
});
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.GetVpcIpsArgs;
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 specific-vpc-ips = LinodeFunctions.getVpcIps(GetVpcIpsArgs.builder()
.vpcId(123)
.build());
ctx.export("vpcIps", specific_vpc_ips.vpcIps());
}
}
variables:
specific-vpc-ips:
fn::invoke:
Function: linode:getVpcIps
Arguments:
vpcId: 123
outputs:
vpcIps: ${["specific-vpc-ips"].vpcIps}
Filterable Fields
active
config_id
linode_id
region
vpc_id
Using getVpcIps
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 getVpcIps(args: GetVpcIpsArgs, opts?: InvokeOptions): Promise<GetVpcIpsResult>
function getVpcIpsOutput(args: GetVpcIpsOutputArgs, opts?: InvokeOptions): Output<GetVpcIpsResult>
def get_vpc_ips(filters: Optional[Sequence[GetVpcIpsFilter]] = None,
vpc_id: Optional[int] = None,
vpc_ips: Optional[Sequence[GetVpcIpsVpcIp]] = None,
opts: Optional[InvokeOptions] = None) -> GetVpcIpsResult
def get_vpc_ips_output(filters: Optional[pulumi.Input[Sequence[pulumi.Input[GetVpcIpsFilterArgs]]]] = None,
vpc_id: Optional[pulumi.Input[int]] = None,
vpc_ips: Optional[pulumi.Input[Sequence[pulumi.Input[GetVpcIpsVpcIpArgs]]]] = None,
opts: Optional[InvokeOptions] = None) -> Output[GetVpcIpsResult]
func GetVpcIps(ctx *Context, args *GetVpcIpsArgs, opts ...InvokeOption) (*GetVpcIpsResult, error)
func GetVpcIpsOutput(ctx *Context, args *GetVpcIpsOutputArgs, opts ...InvokeOption) GetVpcIpsResultOutput
> Note: This function is named GetVpcIps
in the Go SDK.
public static class GetVpcIps
{
public static Task<GetVpcIpsResult> InvokeAsync(GetVpcIpsArgs args, InvokeOptions? opts = null)
public static Output<GetVpcIpsResult> Invoke(GetVpcIpsInvokeArgs args, InvokeOptions? opts = null)
}
public static CompletableFuture<GetVpcIpsResult> getVpcIps(GetVpcIpsArgs args, InvokeOptions options)
// Output-based functions aren't available in Java yet
fn::invoke:
function: linode:index/getVpcIps:getVpcIps
arguments:
# arguments dictionary
The following arguments are supported:
- Filters
List<Get
Vpc Ips Filter> - Vpc
Id int - The id of the parent VPC for the list of VPC IPs.
filter
- (Optional) A set of filters used to select Linode VPC IPs that meet certain requirements.
- Vpc
Ips List<GetVpc Ips Vpc Ip>
- Filters
[]Get
Vpc Ips Filter - Vpc
Id int - The id of the parent VPC for the list of VPC IPs.
filter
- (Optional) A set of filters used to select Linode VPC IPs that meet certain requirements.
- Vpc
Ips []GetVpc Ips Vpc Ip
- filters
List<Get
Vpc Ips Filter> - vpc
Id Integer - The id of the parent VPC for the list of VPC IPs.
filter
- (Optional) A set of filters used to select Linode VPC IPs that meet certain requirements.
- vpc
Ips List<GetVpc Ips Vpc Ip>
- filters
Get
Vpc Ips Filter[] - vpc
Id number - The id of the parent VPC for the list of VPC IPs.
filter
- (Optional) A set of filters used to select Linode VPC IPs that meet certain requirements.
- vpc
Ips GetVpc Ips Vpc Ip[]
- filters
Sequence[Get
Vpc Ips Filter] - vpc_
id int - The id of the parent VPC for the list of VPC IPs.
filter
- (Optional) A set of filters used to select Linode VPC IPs that meet certain requirements.
- vpc_
ips Sequence[GetVpc Ips Vpc Ip]
- filters List<Property Map>
- vpc
Id Number - The id of the parent VPC for the list of VPC IPs.
filter
- (Optional) A set of filters used to select Linode VPC IPs that meet certain requirements.
- vpc
Ips List<Property Map>
getVpcIps Result
The following output properties are available:
- Id string
- Filters
List<Get
Vpc Ips Filter> - Vpc
Id int - The unique globally general API entity identifier for the VPC.
- Vpc
Ips List<GetVpc Ips Vpc Ip>
- Id string
- Filters
[]Get
Vpc Ips Filter - Vpc
Id int - The unique globally general API entity identifier for the VPC.
- Vpc
Ips []GetVpc Ips Vpc Ip
- id String
- filters
List<Get
Vpc Ips Filter> - vpc
Id Integer - The unique globally general API entity identifier for the VPC.
- vpc
Ips List<GetVpc Ips Vpc Ip>
- id string
- filters
Get
Vpc Ips Filter[] - vpc
Id number - The unique globally general API entity identifier for the VPC.
- vpc
Ips GetVpc Ips Vpc Ip[]
- id str
- filters
Sequence[Get
Vpc Ips Filter] - vpc_
id int - The unique globally general API entity identifier for the VPC.
- vpc_
ips Sequence[GetVpc Ips Vpc Ip]
- id String
- filters List<Property Map>
- vpc
Id Number - The unique globally general API entity identifier for the VPC.
- vpc
Ips List<Property Map>
Supporting Types
GetVpcIpsFilter
- Name string
- The name of the field to filter by. See the Filterable Fields section for a complete list of filterable fields.
- Values List<string>
- A list of values for the filter to allow. These values should all be in string form.
- Match
By string - The method to match the field by. (
exact
,regex
,substring
; defaultexact
)
- Name string
- The name of the field to filter by. See the Filterable Fields section for a complete list of filterable fields.
- Values []string
- A list of values for the filter to allow. These values should all be in string form.
- Match
By string - The method to match the field by. (
exact
,regex
,substring
; defaultexact
)
- name String
- The name of the field to filter by. See the Filterable Fields section for a complete list of filterable fields.
- values List<String>
- A list of values for the filter to allow. These values should all be in string form.
- match
By String - The method to match the field by. (
exact
,regex
,substring
; defaultexact
)
- name string
- The name of the field to filter by. See the Filterable Fields section for a complete list of filterable fields.
- values string[]
- A list of values for the filter to allow. These values should all be in string form.
- match
By string - The method to match the field by. (
exact
,regex
,substring
; defaultexact
)
- name str
- The name of the field to filter by. See the Filterable Fields section for a complete list of filterable fields.
- values Sequence[str]
- A list of values for the filter to allow. These values should all be in string form.
- match_
by str - The method to match the field by. (
exact
,regex
,substring
; defaultexact
)
- name String
- The name of the field to filter by. See the Filterable Fields section for a complete list of filterable fields.
- values List<String>
- A list of values for the filter to allow. These values should all be in string form.
- match
By String - The method to match the field by. (
exact
,regex
,substring
; defaultexact
)
GetVpcIpsVpcIp
- Active bool
- True if the VPC interface is in use, meaning that the Linode was powered on using the config_id to which the interface belongs. Otherwise false.
- Address string
- An IPv4 address configured for this VPC interface. These follow the RFC 1918 private address format. Null if an address_range.
- Address
Range string - A range of IPv4 addresses configured for this VPC interface. Null if a single address.
- Config
Id int - The globally general entity identifier for the Linode configuration profile where the VPC is included.
- Gateway string
- The default gateway for the VPC subnet that the IP or IP range belongs to.
- Interface
Id int - The globally general API entity identifier for the Linode interface.
- Linode
Id int - The identifier for the Linode the VPC interface currently belongs to.
- Nat11 string
- The public IP address used for NAT 1:1 with the VPC. This is empty if NAT 1:1 isn't used.
- Prefix int
- The number of bits set in the subnet mask.
- Region string
- The region of the VPC.
- Subnet
Id int - The id of the VPC Subnet for this interface.
- Subnet
Mask string - The mask that separates host bits from network bits for the address or address_range.
- Vpc
Id int - The id of the parent VPC for the list of VPC IPs.
filter
- (Optional) A set of filters used to select Linode VPC IPs that meet certain requirements.
- Active bool
- True if the VPC interface is in use, meaning that the Linode was powered on using the config_id to which the interface belongs. Otherwise false.
- Address string
- An IPv4 address configured for this VPC interface. These follow the RFC 1918 private address format. Null if an address_range.
- Address
Range string - A range of IPv4 addresses configured for this VPC interface. Null if a single address.
- Config
Id int - The globally general entity identifier for the Linode configuration profile where the VPC is included.
- Gateway string
- The default gateway for the VPC subnet that the IP or IP range belongs to.
- Interface
Id int - The globally general API entity identifier for the Linode interface.
- Linode
Id int - The identifier for the Linode the VPC interface currently belongs to.
- Nat11 string
- The public IP address used for NAT 1:1 with the VPC. This is empty if NAT 1:1 isn't used.
- Prefix int
- The number of bits set in the subnet mask.
- Region string
- The region of the VPC.
- Subnet
Id int - The id of the VPC Subnet for this interface.
- Subnet
Mask string - The mask that separates host bits from network bits for the address or address_range.
- Vpc
Id int - The id of the parent VPC for the list of VPC IPs.
filter
- (Optional) A set of filters used to select Linode VPC IPs that meet certain requirements.
- active Boolean
- True if the VPC interface is in use, meaning that the Linode was powered on using the config_id to which the interface belongs. Otherwise false.
- address String
- An IPv4 address configured for this VPC interface. These follow the RFC 1918 private address format. Null if an address_range.
- address
Range String - A range of IPv4 addresses configured for this VPC interface. Null if a single address.
- config
Id Integer - The globally general entity identifier for the Linode configuration profile where the VPC is included.
- gateway String
- The default gateway for the VPC subnet that the IP or IP range belongs to.
- interface
Id Integer - The globally general API entity identifier for the Linode interface.
- linode
Id Integer - The identifier for the Linode the VPC interface currently belongs to.
- nat11 String
- The public IP address used for NAT 1:1 with the VPC. This is empty if NAT 1:1 isn't used.
- prefix Integer
- The number of bits set in the subnet mask.
- region String
- The region of the VPC.
- subnet
Id Integer - The id of the VPC Subnet for this interface.
- subnet
Mask String - The mask that separates host bits from network bits for the address or address_range.
- vpc
Id Integer - The id of the parent VPC for the list of VPC IPs.
filter
- (Optional) A set of filters used to select Linode VPC IPs that meet certain requirements.
- active boolean
- True if the VPC interface is in use, meaning that the Linode was powered on using the config_id to which the interface belongs. Otherwise false.
- address string
- An IPv4 address configured for this VPC interface. These follow the RFC 1918 private address format. Null if an address_range.
- address
Range string - A range of IPv4 addresses configured for this VPC interface. Null if a single address.
- config
Id number - The globally general entity identifier for the Linode configuration profile where the VPC is included.
- gateway string
- The default gateway for the VPC subnet that the IP or IP range belongs to.
- interface
Id number - The globally general API entity identifier for the Linode interface.
- linode
Id number - The identifier for the Linode the VPC interface currently belongs to.
- nat11 string
- The public IP address used for NAT 1:1 with the VPC. This is empty if NAT 1:1 isn't used.
- prefix number
- The number of bits set in the subnet mask.
- region string
- The region of the VPC.
- subnet
Id number - The id of the VPC Subnet for this interface.
- subnet
Mask string - The mask that separates host bits from network bits for the address or address_range.
- vpc
Id number - The id of the parent VPC for the list of VPC IPs.
filter
- (Optional) A set of filters used to select Linode VPC IPs that meet certain requirements.
- active bool
- True if the VPC interface is in use, meaning that the Linode was powered on using the config_id to which the interface belongs. Otherwise false.
- address str
- An IPv4 address configured for this VPC interface. These follow the RFC 1918 private address format. Null if an address_range.
- address_
range str - A range of IPv4 addresses configured for this VPC interface. Null if a single address.
- config_
id int - The globally general entity identifier for the Linode configuration profile where the VPC is included.
- gateway str
- The default gateway for the VPC subnet that the IP or IP range belongs to.
- interface_
id int - The globally general API entity identifier for the Linode interface.
- linode_
id int - The identifier for the Linode the VPC interface currently belongs to.
- nat11 str
- The public IP address used for NAT 1:1 with the VPC. This is empty if NAT 1:1 isn't used.
- prefix int
- The number of bits set in the subnet mask.
- region str
- The region of the VPC.
- subnet_
id int - The id of the VPC Subnet for this interface.
- subnet_
mask str - The mask that separates host bits from network bits for the address or address_range.
- vpc_
id int - The id of the parent VPC for the list of VPC IPs.
filter
- (Optional) A set of filters used to select Linode VPC IPs that meet certain requirements.
- active Boolean
- True if the VPC interface is in use, meaning that the Linode was powered on using the config_id to which the interface belongs. Otherwise false.
- address String
- An IPv4 address configured for this VPC interface. These follow the RFC 1918 private address format. Null if an address_range.
- address
Range String - A range of IPv4 addresses configured for this VPC interface. Null if a single address.
- config
Id Number - The globally general entity identifier for the Linode configuration profile where the VPC is included.
- gateway String
- The default gateway for the VPC subnet that the IP or IP range belongs to.
- interface
Id Number - The globally general API entity identifier for the Linode interface.
- linode
Id Number - The identifier for the Linode the VPC interface currently belongs to.
- nat11 String
- The public IP address used for NAT 1:1 with the VPC. This is empty if NAT 1:1 isn't used.
- prefix Number
- The number of bits set in the subnet mask.
- region String
- The region of the VPC.
- subnet
Id Number - The id of the VPC Subnet for this interface.
- subnet
Mask String - The mask that separates host bits from network bits for the address or address_range.
- vpc
Id Number - The id of the parent VPC for the list of VPC IPs.
filter
- (Optional) A set of filters used to select Linode VPC IPs that meet certain requirements.
Package Details
- Repository
- Linode pulumi/pulumi-linode
- License
- Apache-2.0
- Notes
- This Pulumi package is based on the
linode
Terraform Provider.