vcd 3.14.1 published on Monday, Apr 14, 2025 by vmware
vcd.getIpSpaceIpAllocation
Explore with Pulumi AI
Provides a data source to read IP Allocations within IP Spaces. It supports both - Floating IPs (IPs from IP Ranges) and IP Prefix (subnet) allocations with manual and automatic reservations.
IP Spaces require VCD 10.4.1+ with NSX-T.
Example Usage
IP Space IP Prefix Allocation)
import * as pulumi from "@pulumi/pulumi";
import * as vcd from "@pulumi/vcd";
const ip_prefix = vcd.getIpSpaceIpAllocation({
orgId: data.vcd_org.org1.id,
ipSpaceId: vcd_ip_space.space1.id,
type: "IP_PREFIX",
ipAddress: "192.168.1.1/24",
});
import pulumi
import pulumi_vcd as vcd
ip_prefix = vcd.get_ip_space_ip_allocation(org_id=data["vcd_org"]["org1"]["id"],
ip_space_id=vcd_ip_space["space1"]["id"],
type="IP_PREFIX",
ip_address="192.168.1.1/24")
package main
import (
"github.com/pulumi/pulumi-terraform-provider/sdks/go/vcd/v3/vcd"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
_, err := vcd.LookupIpSpaceIpAllocation(ctx, &vcd.LookupIpSpaceIpAllocationArgs{
OrgId: data.Vcd_org.Org1.Id,
IpSpaceId: vcd_ip_space.Space1.Id,
Type: "IP_PREFIX",
IpAddress: "192.168.1.1/24",
}, nil)
if err != nil {
return err
}
return nil
})
}
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Vcd = Pulumi.Vcd;
return await Deployment.RunAsync(() =>
{
var ip_prefix = Vcd.GetIpSpaceIpAllocation.Invoke(new()
{
OrgId = data.Vcd_org.Org1.Id,
IpSpaceId = vcd_ip_space.Space1.Id,
Type = "IP_PREFIX",
IpAddress = "192.168.1.1/24",
});
});
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.vcd.VcdFunctions;
import com.pulumi.vcd.inputs.GetIpSpaceIpAllocationArgs;
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 ip-prefix = VcdFunctions.getIpSpaceIpAllocation(GetIpSpaceIpAllocationArgs.builder()
.orgId(data.vcd_org().org1().id())
.ipSpaceId(vcd_ip_space.space1().id())
.type("IP_PREFIX")
.ipAddress("192.168.1.1/24")
.build());
}
}
variables:
ip-prefix:
fn::invoke:
function: vcd:getIpSpaceIpAllocation
arguments:
orgId: ${data.vcd_org.org1.id}
ipSpaceId: ${vcd_ip_space.space1.id}
type: IP_PREFIX
ipAddress: 192.168.1.1/24
IP Space Floating IP Allocation)
import * as pulumi from "@pulumi/pulumi";
import * as vcd from "@pulumi/vcd";
const floating_ip = vcd.getIpSpaceIpAllocation({
orgId: data.vcd_org.org1.id,
ipSpaceId: vcd_ip_space.space1.id,
type: "FLOATING_IP",
ipAddress: "192.168.1.1",
});
import pulumi
import pulumi_vcd as vcd
floating_ip = vcd.get_ip_space_ip_allocation(org_id=data["vcd_org"]["org1"]["id"],
ip_space_id=vcd_ip_space["space1"]["id"],
type="FLOATING_IP",
ip_address="192.168.1.1")
package main
import (
"github.com/pulumi/pulumi-terraform-provider/sdks/go/vcd/v3/vcd"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
_, err := vcd.LookupIpSpaceIpAllocation(ctx, &vcd.LookupIpSpaceIpAllocationArgs{
OrgId: data.Vcd_org.Org1.Id,
IpSpaceId: vcd_ip_space.Space1.Id,
Type: "FLOATING_IP",
IpAddress: "192.168.1.1",
}, nil)
if err != nil {
return err
}
return nil
})
}
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Vcd = Pulumi.Vcd;
return await Deployment.RunAsync(() =>
{
var floating_ip = Vcd.GetIpSpaceIpAllocation.Invoke(new()
{
OrgId = data.Vcd_org.Org1.Id,
IpSpaceId = vcd_ip_space.Space1.Id,
Type = "FLOATING_IP",
IpAddress = "192.168.1.1",
});
});
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.vcd.VcdFunctions;
import com.pulumi.vcd.inputs.GetIpSpaceIpAllocationArgs;
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 floating-ip = VcdFunctions.getIpSpaceIpAllocation(GetIpSpaceIpAllocationArgs.builder()
.orgId(data.vcd_org().org1().id())
.ipSpaceId(vcd_ip_space.space1().id())
.type("FLOATING_IP")
.ipAddress("192.168.1.1")
.build());
}
}
variables:
floating-ip:
fn::invoke:
function: vcd:getIpSpaceIpAllocation
arguments:
orgId: ${data.vcd_org.org1.id}
ipSpaceId: ${vcd_ip_space.space1.id}
type: FLOATING_IP
ipAddress: 192.168.1.1
Using getIpSpaceIpAllocation
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 getIpSpaceIpAllocation(args: GetIpSpaceIpAllocationArgs, opts?: InvokeOptions): Promise<GetIpSpaceIpAllocationResult>
function getIpSpaceIpAllocationOutput(args: GetIpSpaceIpAllocationOutputArgs, opts?: InvokeOptions): Output<GetIpSpaceIpAllocationResult>
def get_ip_space_ip_allocation(description: Optional[str] = None,
id: Optional[str] = None,
ip_address: Optional[str] = None,
ip_space_id: Optional[str] = None,
org_id: Optional[str] = None,
type: Optional[str] = None,
usage_state: Optional[str] = None,
opts: Optional[InvokeOptions] = None) -> GetIpSpaceIpAllocationResult
def get_ip_space_ip_allocation_output(description: Optional[pulumi.Input[str]] = None,
id: Optional[pulumi.Input[str]] = None,
ip_address: Optional[pulumi.Input[str]] = None,
ip_space_id: Optional[pulumi.Input[str]] = None,
org_id: Optional[pulumi.Input[str]] = None,
type: Optional[pulumi.Input[str]] = None,
usage_state: Optional[pulumi.Input[str]] = None,
opts: Optional[InvokeOptions] = None) -> Output[GetIpSpaceIpAllocationResult]
func LookupIpSpaceIpAllocation(ctx *Context, args *LookupIpSpaceIpAllocationArgs, opts ...InvokeOption) (*LookupIpSpaceIpAllocationResult, error)
func LookupIpSpaceIpAllocationOutput(ctx *Context, args *LookupIpSpaceIpAllocationOutputArgs, opts ...InvokeOption) LookupIpSpaceIpAllocationResultOutput
> Note: This function is named LookupIpSpaceIpAllocation
in the Go SDK.
public static class GetIpSpaceIpAllocation
{
public static Task<GetIpSpaceIpAllocationResult> InvokeAsync(GetIpSpaceIpAllocationArgs args, InvokeOptions? opts = null)
public static Output<GetIpSpaceIpAllocationResult> Invoke(GetIpSpaceIpAllocationInvokeArgs args, InvokeOptions? opts = null)
}
public static CompletableFuture<GetIpSpaceIpAllocationResult> getIpSpaceIpAllocation(GetIpSpaceIpAllocationArgs args, InvokeOptions options)
public static Output<GetIpSpaceIpAllocationResult> getIpSpaceIpAllocation(GetIpSpaceIpAllocationArgs args, InvokeOptions options)
fn::invoke:
function: vcd:index/getIpSpaceIpAllocation:getIpSpaceIpAllocation
arguments:
# arguments dictionary
The following arguments are supported:
- Ip
Address string - IP Address or CIDR of IP allocation (e.g. "192.168.1.1/24", "192.168.1.1")
- Ip
Space stringId - Parent IP Space ID of IP Allocation
- Org
Id string - Parent Org ID of IP Allocation
- Type string
- Type of IP Allocation. One of
FLOATING_IP
orIP_PREFIX
- Description string
- Id string
- Usage
State string
- Ip
Address string - IP Address or CIDR of IP allocation (e.g. "192.168.1.1/24", "192.168.1.1")
- Ip
Space stringId - Parent IP Space ID of IP Allocation
- Org
Id string - Parent Org ID of IP Allocation
- Type string
- Type of IP Allocation. One of
FLOATING_IP
orIP_PREFIX
- Description string
- Id string
- Usage
State string
- ip
Address String - IP Address or CIDR of IP allocation (e.g. "192.168.1.1/24", "192.168.1.1")
- ip
Space StringId - Parent IP Space ID of IP Allocation
- org
Id String - Parent Org ID of IP Allocation
- type String
- Type of IP Allocation. One of
FLOATING_IP
orIP_PREFIX
- description String
- id String
- usage
State String
- ip
Address string - IP Address or CIDR of IP allocation (e.g. "192.168.1.1/24", "192.168.1.1")
- ip
Space stringId - Parent IP Space ID of IP Allocation
- org
Id string - Parent Org ID of IP Allocation
- type string
- Type of IP Allocation. One of
FLOATING_IP
orIP_PREFIX
- description string
- id string
- usage
State string
- ip_
address str - IP Address or CIDR of IP allocation (e.g. "192.168.1.1/24", "192.168.1.1")
- ip_
space_ strid - Parent IP Space ID of IP Allocation
- org_
id str - Parent Org ID of IP Allocation
- type str
- Type of IP Allocation. One of
FLOATING_IP
orIP_PREFIX
- description str
- id str
- usage_
state str
- ip
Address String - IP Address or CIDR of IP allocation (e.g. "192.168.1.1/24", "192.168.1.1")
- ip
Space StringId - Parent IP Space ID of IP Allocation
- org
Id String - Parent Org ID of IP Allocation
- type String
- Type of IP Allocation. One of
FLOATING_IP
orIP_PREFIX
- description String
- id String
- usage
State String
getIpSpaceIpAllocation Result
The following output properties are available:
- Allocation
Date string - Description string
- Id string
- Ip string
- Ip
Address string - Ip
Space stringId - Org
Id string - Prefix
Length string - Type string
- Usage
State string - Used
By stringId
- Allocation
Date string - Description string
- Id string
- Ip string
- Ip
Address string - Ip
Space stringId - Org
Id string - Prefix
Length string - Type string
- Usage
State string - Used
By stringId
- allocation
Date String - description String
- id String
- ip String
- ip
Address String - ip
Space StringId - org
Id String - prefix
Length String - type String
- usage
State String - used
By StringId
- allocation
Date string - description string
- id string
- ip string
- ip
Address string - ip
Space stringId - org
Id string - prefix
Length string - type string
- usage
State string - used
By stringId
- allocation_
date str - description str
- id str
- ip str
- ip_
address str - ip_
space_ strid - org_
id str - prefix_
length str - type str
- usage_
state str - used_
by_ strid
- allocation
Date String - description String
- id String
- ip String
- ip
Address String - ip
Space StringId - org
Id String - prefix
Length String - type String
- usage
State String - used
By StringId
Package Details
- Repository
- vcd vmware/terraform-provider-vcd
- License
- Notes
- This Pulumi package is based on the
vcd
Terraform Provider.