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

vcd.getNsxvDistributedFirewall

Explore with Pulumi AI

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

    The NSX-V Distributed Firewall data source reads all defined rules for a particular VDC.

    Supported in provider v3.9+

    Example Usage

    import * as pulumi from "@pulumi/pulumi";
    import * as vcd from "@pulumi/vcd";
    
    const my_vdc = vcd.getOrgVdc({
        org: "my-org",
        name: "my-vdc",
    });
    const dfw1 = my_vdc.then(my_vdc => vcd.getNsxvDistributedFirewall({
        vdcId: my_vdc.id,
    }));
    
    import pulumi
    import pulumi_vcd as vcd
    
    my_vdc = vcd.get_org_vdc(org="my-org",
        name="my-vdc")
    dfw1 = vcd.get_nsxv_distributed_firewall(vdc_id=my_vdc.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 {
    		my_vdc, err := vcd.LookupOrgVdc(ctx, &vcd.LookupOrgVdcArgs{
    			Org:  pulumi.StringRef("my-org"),
    			Name: "my-vdc",
    		}, nil)
    		if err != nil {
    			return err
    		}
    		_, err = vcd.LookupNsxvDistributedFirewall(ctx, &vcd.LookupNsxvDistributedFirewallArgs{
    			VdcId: my_vdc.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 my_vdc = Vcd.GetOrgVdc.Invoke(new()
        {
            Org = "my-org",
            Name = "my-vdc",
        });
    
        var dfw1 = Vcd.GetNsxvDistributedFirewall.Invoke(new()
        {
            VdcId = my_vdc.Apply(getOrgVdcResult => getOrgVdcResult.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.GetOrgVdcArgs;
    import com.pulumi.vcd.inputs.GetNsxvDistributedFirewallArgs;
    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 my-vdc = VcdFunctions.getOrgVdc(GetOrgVdcArgs.builder()
                .org("my-org")
                .name("my-vdc")
                .build());
    
            final var dfw1 = VcdFunctions.getNsxvDistributedFirewall(GetNsxvDistributedFirewallArgs.builder()
                .vdcId(my_vdc.id())
                .build());
    
        }
    }
    
    variables:
      my-vdc:
        fn::invoke:
          function: vcd:getOrgVdc
          arguments:
            org: my-org
            name: my-vdc
      dfw1:
        fn::invoke:
          function: vcd:getNsxvDistributedFirewall
          arguments:
            vdcId: ${["my-vdc"].id}
    

    Attributes reference

    All the arguments and attributes defined for the vcd.NsxvDistributedFirewall resource are reported as attributes for this data source.

    Using getNsxvDistributedFirewall

    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 getNsxvDistributedFirewall(args: GetNsxvDistributedFirewallArgs, opts?: InvokeOptions): Promise<GetNsxvDistributedFirewallResult>
    function getNsxvDistributedFirewallOutput(args: GetNsxvDistributedFirewallOutputArgs, opts?: InvokeOptions): Output<GetNsxvDistributedFirewallResult>
    def get_nsxv_distributed_firewall(id: Optional[str] = None,
                                      vdc_id: Optional[str] = None,
                                      opts: Optional[InvokeOptions] = None) -> GetNsxvDistributedFirewallResult
    def get_nsxv_distributed_firewall_output(id: Optional[pulumi.Input[str]] = None,
                                      vdc_id: Optional[pulumi.Input[str]] = None,
                                      opts: Optional[InvokeOptions] = None) -> Output[GetNsxvDistributedFirewallResult]
    func LookupNsxvDistributedFirewall(ctx *Context, args *LookupNsxvDistributedFirewallArgs, opts ...InvokeOption) (*LookupNsxvDistributedFirewallResult, error)
    func LookupNsxvDistributedFirewallOutput(ctx *Context, args *LookupNsxvDistributedFirewallOutputArgs, opts ...InvokeOption) LookupNsxvDistributedFirewallResultOutput

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

    public static class GetNsxvDistributedFirewall 
    {
        public static Task<GetNsxvDistributedFirewallResult> InvokeAsync(GetNsxvDistributedFirewallArgs args, InvokeOptions? opts = null)
        public static Output<GetNsxvDistributedFirewallResult> Invoke(GetNsxvDistributedFirewallInvokeArgs args, InvokeOptions? opts = null)
    }
    public static CompletableFuture<GetNsxvDistributedFirewallResult> getNsxvDistributedFirewall(GetNsxvDistributedFirewallArgs args, InvokeOptions options)
    public static Output<GetNsxvDistributedFirewallResult> getNsxvDistributedFirewall(GetNsxvDistributedFirewallArgs args, InvokeOptions options)
    
    fn::invoke:
      function: vcd:index/getNsxvDistributedFirewall:getNsxvDistributedFirewall
      arguments:
        # arguments dictionary

    The following arguments are supported:

    VdcId string
    The ID of VDC to manage the Distributed Firewall in. Can be looked up using a vcd.OrgVdc data source
    Id string
    VdcId string
    The ID of VDC to manage the Distributed Firewall in. Can be looked up using a vcd.OrgVdc data source
    Id string
    vdcId String
    The ID of VDC to manage the Distributed Firewall in. Can be looked up using a vcd.OrgVdc data source
    id String
    vdcId string
    The ID of VDC to manage the Distributed Firewall in. Can be looked up using a vcd.OrgVdc data source
    id string
    vdc_id str
    The ID of VDC to manage the Distributed Firewall in. Can be looked up using a vcd.OrgVdc data source
    id str
    vdcId String
    The ID of VDC to manage the Distributed Firewall in. Can be looked up using a vcd.OrgVdc data source
    id String

    getNsxvDistributedFirewall Result

    The following output properties are available:

    Supporting Types

    GetNsxvDistributedFirewallRule

    GetNsxvDistributedFirewallRuleApplication

    DestinationPort string
    Name string
    Protocol string
    SourcePort string
    Type string
    Value string
    DestinationPort string
    Name string
    Protocol string
    SourcePort string
    Type string
    Value string
    destinationPort String
    name String
    protocol String
    sourcePort String
    type String
    value String
    destinationPort string
    name string
    protocol string
    sourcePort string
    type string
    value string
    destinationPort String
    name String
    protocol String
    sourcePort String
    type String
    value String

    GetNsxvDistributedFirewallRuleAppliedTo

    Name string
    Type string
    Value string
    Name string
    Type string
    Value string
    name String
    type String
    value String
    name string
    type string
    value string
    name str
    type str
    value str
    name String
    type String
    value String

    GetNsxvDistributedFirewallRuleDestination

    Name string
    Type string
    Value string
    Name string
    Type string
    Value string
    name String
    type String
    value String
    name string
    type string
    value string
    name str
    type str
    value str
    name String
    type String
    value String

    GetNsxvDistributedFirewallRuleSource

    Name string
    Type string
    Value string
    Name string
    Type string
    Value string
    name String
    type String
    value String
    name string
    type string
    value string
    name str
    type str
    value str
    name String
    type String
    value 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