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

vcd.getNsxtDistributedFirewall

Explore with Pulumi AI

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

    The Distributed Firewall data source reads all defined rules for a particular VDC Group.

    There is a different data source vcd.NsxtDistributedFirewallRule resource are available that can fetch a single firewall rule by name.

    Example Usage

    import * as pulumi from "@pulumi/pulumi";
    import * as vcd from "@pulumi/vcd";
    
    const g1 = vcd.getVdcGroup({
        org: "my-org",
        name: "my-vdc-group",
    });
    const t1 = g1.then(g1 => vcd.getNsxtDistributedFirewall({
        org: "my-org",
        vdcGroupId: g1.id,
    }));
    
    import pulumi
    import pulumi_vcd as vcd
    
    g1 = vcd.get_vdc_group(org="my-org",
        name="my-vdc-group")
    t1 = vcd.get_nsxt_distributed_firewall(org="my-org",
        vdc_group_id=g1.id)
    
    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 {
    		g1, err := vcd.LookupVdcGroup(ctx, &vcd.LookupVdcGroupArgs{
    			Org:  pulumi.StringRef("my-org"),
    			Name: pulumi.StringRef("my-vdc-group"),
    		}, nil)
    		if err != nil {
    			return err
    		}
    		_, err = vcd.LookupNsxtDistributedFirewall(ctx, &vcd.LookupNsxtDistributedFirewallArgs{
    			Org:        pulumi.StringRef("my-org"),
    			VdcGroupId: g1.Id,
    		}, 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 g1 = Vcd.GetVdcGroup.Invoke(new()
        {
            Org = "my-org",
            Name = "my-vdc-group",
        });
    
        var t1 = Vcd.GetNsxtDistributedFirewall.Invoke(new()
        {
            Org = "my-org",
            VdcGroupId = g1.Apply(getVdcGroupResult => getVdcGroupResult.Id),
        });
    
    });
    
    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.GetVdcGroupArgs;
    import com.pulumi.vcd.inputs.GetNsxtDistributedFirewallArgs;
    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 g1 = VcdFunctions.getVdcGroup(GetVdcGroupArgs.builder()
                .org("my-org")
                .name("my-vdc-group")
                .build());
    
            final var t1 = VcdFunctions.getNsxtDistributedFirewall(GetNsxtDistributedFirewallArgs.builder()
                .org("my-org")
                .vdcGroupId(g1.applyValue(getVdcGroupResult -> getVdcGroupResult.id()))
                .build());
    
        }
    }
    
    variables:
      g1:
        fn::invoke:
          function: vcd:getVdcGroup
          arguments:
            org: my-org
            name: my-vdc-group
      t1:
        fn::invoke:
          function: vcd:getNsxtDistributedFirewall
          arguments:
            org: my-org
            vdcGroupId: ${g1.id}
    

    Using getNsxtDistributedFirewall

    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 getNsxtDistributedFirewall(args: GetNsxtDistributedFirewallArgs, opts?: InvokeOptions): Promise<GetNsxtDistributedFirewallResult>
    function getNsxtDistributedFirewallOutput(args: GetNsxtDistributedFirewallOutputArgs, opts?: InvokeOptions): Output<GetNsxtDistributedFirewallResult>
    def get_nsxt_distributed_firewall(id: Optional[str] = None,
                                      org: Optional[str] = None,
                                      vdc_group_id: Optional[str] = None,
                                      opts: Optional[InvokeOptions] = None) -> GetNsxtDistributedFirewallResult
    def get_nsxt_distributed_firewall_output(id: Optional[pulumi.Input[str]] = None,
                                      org: Optional[pulumi.Input[str]] = None,
                                      vdc_group_id: Optional[pulumi.Input[str]] = None,
                                      opts: Optional[InvokeOptions] = None) -> Output[GetNsxtDistributedFirewallResult]
    func LookupNsxtDistributedFirewall(ctx *Context, args *LookupNsxtDistributedFirewallArgs, opts ...InvokeOption) (*LookupNsxtDistributedFirewallResult, error)
    func LookupNsxtDistributedFirewallOutput(ctx *Context, args *LookupNsxtDistributedFirewallOutputArgs, opts ...InvokeOption) LookupNsxtDistributedFirewallResultOutput

    > Note: This function is named LookupNsxtDistributedFirewall in the Go SDK.

    public static class GetNsxtDistributedFirewall 
    {
        public static Task<GetNsxtDistributedFirewallResult> InvokeAsync(GetNsxtDistributedFirewallArgs args, InvokeOptions? opts = null)
        public static Output<GetNsxtDistributedFirewallResult> Invoke(GetNsxtDistributedFirewallInvokeArgs args, InvokeOptions? opts = null)
    }
    public static CompletableFuture<GetNsxtDistributedFirewallResult> getNsxtDistributedFirewall(GetNsxtDistributedFirewallArgs args, InvokeOptions options)
    public static Output<GetNsxtDistributedFirewallResult> getNsxtDistributedFirewall(GetNsxtDistributedFirewallArgs args, InvokeOptions options)
    
    fn::invoke:
      function: vcd:index/getNsxtDistributedFirewall:getNsxtDistributedFirewall
      arguments:
        # arguments dictionary

    The following arguments are supported:

    VdcGroupId string
    The ID of a VDC Group
    Id string
    Org string
    The name of organization in which Distributed Firewall is located. Optional if defined at provider level.
    VdcGroupId string
    The ID of a VDC Group
    Id string
    Org string
    The name of organization in which Distributed Firewall is located. Optional if defined at provider level.
    vdcGroupId String
    The ID of a VDC Group
    id String
    org String
    The name of organization in which Distributed Firewall is located. Optional if defined at provider level.
    vdcGroupId string
    The ID of a VDC Group
    id string
    org string
    The name of organization in which Distributed Firewall is located. Optional if defined at provider level.
    vdc_group_id str
    The ID of a VDC Group
    id str
    org str
    The name of organization in which Distributed Firewall is located. Optional if defined at provider level.
    vdcGroupId String
    The ID of a VDC Group
    id String
    org String
    The name of organization in which Distributed Firewall is located. Optional if defined at provider level.

    getNsxtDistributedFirewall Result

    The following output properties are available:

    Supporting Types

    GetNsxtDistributedFirewallRule

    Action string
    AppPortProfileIds List<string>
    Comment string
    Description string
    DestinationGroupsExcluded bool
    DestinationIds List<string>
    Direction string
    Enabled bool
    Id string
    IpProtocol string
    Logging bool
    Name string
    NetworkContextProfileIds List<string>
    SourceGroupsExcluded bool
    SourceIds List<string>
    action String
    appPortProfileIds List<String>
    comment String
    description String
    destinationGroupsExcluded Boolean
    destinationIds List<String>
    direction String
    enabled Boolean
    id String
    ipProtocol String
    logging Boolean
    name String
    networkContextProfileIds List<String>
    sourceGroupsExcluded Boolean
    sourceIds List<String>
    action string
    appPortProfileIds string[]
    comment string
    description string
    destinationGroupsExcluded boolean
    destinationIds string[]
    direction string
    enabled boolean
    id string
    ipProtocol string
    logging boolean
    name string
    networkContextProfileIds string[]
    sourceGroupsExcluded boolean
    sourceIds string[]
    action String
    appPortProfileIds List<String>
    comment String
    description String
    destinationGroupsExcluded Boolean
    destinationIds List<String>
    direction String
    enabled Boolean
    id String
    ipProtocol String
    logging Boolean
    name String
    networkContextProfileIds List<String>
    sourceGroupsExcluded Boolean
    sourceIds List<String>

    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