1. Packages
  2. Vcd Provider
  3. API Docs
  4. getNsxtIpSet
vcd 3.14.1 published on Monday, Apr 14, 2025 by vmware

vcd.getNsxtIpSet

Explore with Pulumi AI

vcd logo
vcd 3.14.1 published on Monday, Apr 14, 2025 by vmware

    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:

    EdgeGatewayId string
    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.

    Deprecated: Deprecated

    EdgeGatewayId string
    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.

    Deprecated: Deprecated

    edgeGatewayId String
    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.

    Deprecated: Deprecated

    edgeGatewayId string
    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.

    Deprecated: Deprecated

    edge_gateway_id str
    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.

    Deprecated: Deprecated

    edgeGatewayId String
    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.

    Deprecated: Deprecated

    getNsxtIpSet Result

    The following output properties are available:

    Description string
    EdgeGatewayId string
    Id string
    IpAddresses List<string>
    Name string
    OwnerId string
    Parent VDC or VDC Group ID.
    Org string
    Vdc string

    Deprecated: Deprecated

    Description string
    EdgeGatewayId string
    Id string
    IpAddresses []string
    Name string
    OwnerId string
    Parent VDC or VDC Group ID.
    Org string
    Vdc string

    Deprecated: Deprecated

    description String
    edgeGatewayId String
    id String
    ipAddresses List<String>
    name String
    ownerId String
    Parent VDC or VDC Group ID.
    org String
    vdc String

    Deprecated: Deprecated

    description string
    edgeGatewayId string
    id string
    ipAddresses string[]
    name string
    ownerId string
    Parent VDC or VDC Group ID.
    org string
    vdc string

    Deprecated: Deprecated

    description str
    edge_gateway_id str
    id str
    ip_addresses Sequence[str]
    name str
    owner_id str
    Parent VDC or VDC Group ID.
    org str
    vdc str

    Deprecated: Deprecated

    description String
    edgeGatewayId String
    id String
    ipAddresses List<String>
    name String
    ownerId String
    Parent VDC or VDC Group ID.
    org String
    vdc String

    Deprecated: Deprecated

    Package Details

    Repository
    vcd vmware/terraform-provider-vcd
    License
    Notes
    This Pulumi package is based on the vcd Terraform Provider.
    vcd logo
    vcd 3.14.1 published on Monday, Apr 14, 2025 by vmware