vcd 3.14.1 published on Monday, Apr 14, 2025 by vmware
vcd.getNsxtIpSet
Explore with Pulumi AI
Supported in provider v3.3+ and VCD 10.1+ with NSX-T backed VDCs.
Provides a data source to read NSX-T IP Set. IP Sets are groups of objects to which the firewall rules apply. Combining multiple objects into IP Sets helps reduce the total number of firewall rules to be created.
Example Usage
import * as pulumi from "@pulumi/pulumi";
import * as vcd from "@pulumi/vcd";
const main = vcd.getNsxtEdgegateway({
org: "my-org",
name: "main-edge",
});
const my_set_1 = main.then(main => vcd.getNsxtIpSet({
org: "my-org",
edgeGatewayId: main.id,
name: "frontend-servers",
}));
import pulumi
import pulumi_vcd as vcd
main = vcd.get_nsxt_edgegateway(org="my-org",
name="main-edge")
my_set_1 = vcd.get_nsxt_ip_set(org="my-org",
edge_gateway_id=main.id,
name="frontend-servers")
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 {
main, err := vcd.LookupNsxtEdgegateway(ctx, &vcd.LookupNsxtEdgegatewayArgs{
Org: pulumi.StringRef("my-org"),
Name: "main-edge",
}, nil)
if err != nil {
return err
}
_, err = vcd.LookupNsxtIpSet(ctx, &vcd.LookupNsxtIpSetArgs{
Org: pulumi.StringRef("my-org"),
EdgeGatewayId: main.Id,
Name: "frontend-servers",
}, 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 main = Vcd.GetNsxtEdgegateway.Invoke(new()
{
Org = "my-org",
Name = "main-edge",
});
var my_set_1 = Vcd.GetNsxtIpSet.Invoke(new()
{
Org = "my-org",
EdgeGatewayId = main.Apply(getNsxtEdgegatewayResult => getNsxtEdgegatewayResult.Id),
Name = "frontend-servers",
});
});
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.GetNsxtEdgegatewayArgs;
import com.pulumi.vcd.inputs.GetNsxtIpSetArgs;
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 main = VcdFunctions.getNsxtEdgegateway(GetNsxtEdgegatewayArgs.builder()
.org("my-org")
.name("main-edge")
.build());
final var my-set-1 = VcdFunctions.getNsxtIpSet(GetNsxtIpSetArgs.builder()
.org("my-org")
.edgeGatewayId(main.applyValue(getNsxtEdgegatewayResult -> getNsxtEdgegatewayResult.id()))
.name("frontend-servers")
.build());
}
}
variables:
main:
fn::invoke:
function: vcd:getNsxtEdgegateway
arguments:
org: my-org
name: main-edge
my-set-1:
fn::invoke:
function: vcd:getNsxtIpSet
arguments:
org: my-org
edgeGatewayId: ${main.id}
name: frontend-servers
Using getNsxtIpSet
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 getNsxtIpSet(args: GetNsxtIpSetArgs, opts?: InvokeOptions): Promise<GetNsxtIpSetResult>
function getNsxtIpSetOutput(args: GetNsxtIpSetOutputArgs, opts?: InvokeOptions): Output<GetNsxtIpSetResult>
def get_nsxt_ip_set(edge_gateway_id: Optional[str] = None,
id: Optional[str] = None,
name: Optional[str] = None,
org: Optional[str] = None,
vdc: Optional[str] = None,
opts: Optional[InvokeOptions] = None) -> GetNsxtIpSetResult
def get_nsxt_ip_set_output(edge_gateway_id: Optional[pulumi.Input[str]] = None,
id: Optional[pulumi.Input[str]] = None,
name: Optional[pulumi.Input[str]] = None,
org: Optional[pulumi.Input[str]] = None,
vdc: Optional[pulumi.Input[str]] = None,
opts: Optional[InvokeOptions] = None) -> Output[GetNsxtIpSetResult]
func LookupNsxtIpSet(ctx *Context, args *LookupNsxtIpSetArgs, opts ...InvokeOption) (*LookupNsxtIpSetResult, error)
func LookupNsxtIpSetOutput(ctx *Context, args *LookupNsxtIpSetOutputArgs, opts ...InvokeOption) LookupNsxtIpSetResultOutput
> Note: This function is named LookupNsxtIpSet
in the Go SDK.
public static class GetNsxtIpSet
{
public static Task<GetNsxtIpSetResult> InvokeAsync(GetNsxtIpSetArgs args, InvokeOptions? opts = null)
public static Output<GetNsxtIpSetResult> Invoke(GetNsxtIpSetInvokeArgs args, InvokeOptions? opts = null)
}
public static CompletableFuture<GetNsxtIpSetResult> getNsxtIpSet(GetNsxtIpSetArgs args, InvokeOptions options)
public static Output<GetNsxtIpSetResult> getNsxtIpSet(GetNsxtIpSetArgs args, InvokeOptions options)
fn::invoke:
function: vcd:index/getNsxtIpSet:getNsxtIpSet
arguments:
# arguments dictionary
The following arguments are supported:
- Edge
Gateway stringId - The ID of the Edge Gateway (NSX-T only). Can be looked up using
- Name string
- Unique name of existing IP Set.
- Id string
- Org string
- The name of organization to use, optional if defined at provider level. Useful when connected as sysadmin working across different organisations.
- Vdc string
- The name of VDC to use, optional if defined at provider level. Deprecated
in favor of
edge_gateway_id
field.
- Edge
Gateway stringId - The ID of the Edge Gateway (NSX-T only). Can be looked up using
- Name string
- Unique name of existing IP Set.
- Id string
- Org string
- The name of organization to use, optional if defined at provider level. Useful when connected as sysadmin working across different organisations.
- Vdc string
- The name of VDC to use, optional if defined at provider level. Deprecated
in favor of
edge_gateway_id
field.
- edge
Gateway StringId - The ID of the Edge Gateway (NSX-T only). Can be looked up using
- name String
- Unique name of existing IP Set.
- id String
- org String
- The name of organization to use, optional if defined at provider level. Useful when connected as sysadmin working across different organisations.
- vdc String
- The name of VDC to use, optional if defined at provider level. Deprecated
in favor of
edge_gateway_id
field.
- edge
Gateway stringId - The ID of the Edge Gateway (NSX-T only). Can be looked up using
- name string
- Unique name of existing IP Set.
- id string
- org string
- The name of organization to use, optional if defined at provider level. Useful when connected as sysadmin working across different organisations.
- vdc string
- The name of VDC to use, optional if defined at provider level. Deprecated
in favor of
edge_gateway_id
field.
- edge_
gateway_ strid - The ID of the Edge Gateway (NSX-T only). Can be looked up using
- name str
- Unique name of existing IP Set.
- id str
- org str
- The name of organization to use, optional if defined at provider level. Useful when connected as sysadmin working across different organisations.
- vdc str
- The name of VDC to use, optional if defined at provider level. Deprecated
in favor of
edge_gateway_id
field.
- edge
Gateway StringId - The ID of the Edge Gateway (NSX-T only). Can be looked up using
- name String
- Unique name of existing IP Set.
- id String
- org String
- The name of organization to use, optional if defined at provider level. Useful when connected as sysadmin working across different organisations.
- vdc String
- The name of VDC to use, optional if defined at provider level. Deprecated
in favor of
edge_gateway_id
field.
getNsxtIpSet Result
The following output properties are available:
- Description string
- Edge
Gateway stringId - Id string
- Ip
Addresses List<string> - Name string
- Owner
Id string - Parent VDC or VDC Group ID.
- Org string
- Vdc string
- Description string
- Edge
Gateway stringId - Id string
- Ip
Addresses []string - Name string
- Owner
Id string - Parent VDC or VDC Group ID.
- Org string
- Vdc string
- description String
- edge
Gateway StringId - id String
- ip
Addresses List<String> - name String
- owner
Id String - Parent VDC or VDC Group ID.
- org String
- vdc String
- description string
- edge
Gateway stringId - id string
- ip
Addresses string[] - name string
- owner
Id string - Parent VDC or VDC Group ID.
- org string
- vdc string
- description str
- edge_
gateway_ strid - id str
- ip_
addresses Sequence[str] - name str
- owner_
id str - Parent VDC or VDC Group ID.
- org str
- vdc str
- description String
- edge
Gateway StringId - id String
- ip
Addresses List<String> - name String
- owner
Id String - Parent VDC or VDC Group ID.
- org String
- vdc String
Package Details
- Repository
- vcd vmware/terraform-provider-vcd
- License
- Notes
- This Pulumi package is based on the
vcd
Terraform Provider.