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

vcd.getNsxtFirewall

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 Edge Gateways.

    Provides a data source to read NSX-T Firewall configuration of an Edge Gateway. Firewalls allow user to control the incoming and outgoing network traffic to and from an NSX-T Data Center Edge Gateway.

    Example Usage

    Read A List Of Firewall Rules On Edge Gateway)

    import * as pulumi from "@pulumi/pulumi";
    import * as vcd from "@pulumi/vcd";
    
    const testing = vcd.getNsxtFirewall({
        org: "my-org",
        edgeGatewayId: data.vcd_nsxt_edgegateway.testing.id,
    });
    
    import pulumi
    import pulumi_vcd as vcd
    
    testing = vcd.get_nsxt_firewall(org="my-org",
        edge_gateway_id=data["vcd_nsxt_edgegateway"]["testing"]["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 {
    		_, err := vcd.LookupNsxtFirewall(ctx, &vcd.LookupNsxtFirewallArgs{
    			Org:           pulumi.StringRef("my-org"),
    			EdgeGatewayId: data.Vcd_nsxt_edgegateway.Testing.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 testing = Vcd.GetNsxtFirewall.Invoke(new()
        {
            Org = "my-org",
            EdgeGatewayId = data.Vcd_nsxt_edgegateway.Testing.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.GetNsxtFirewallArgs;
    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 testing = VcdFunctions.getNsxtFirewall(GetNsxtFirewallArgs.builder()
                .org("my-org")
                .edgeGatewayId(data.vcd_nsxt_edgegateway().testing().id())
                .build());
    
        }
    }
    
    variables:
      testing:
        fn::invoke:
          function: vcd:getNsxtFirewall
          arguments:
            org: my-org
            edgeGatewayId: ${data.vcd_nsxt_edgegateway.testing.id}
    

    Using getNsxtFirewall

    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 getNsxtFirewall(args: GetNsxtFirewallArgs, opts?: InvokeOptions): Promise<GetNsxtFirewallResult>
    function getNsxtFirewallOutput(args: GetNsxtFirewallOutputArgs, opts?: InvokeOptions): Output<GetNsxtFirewallResult>
    def get_nsxt_firewall(edge_gateway_id: Optional[str] = None,
                          id: Optional[str] = None,
                          org: Optional[str] = None,
                          vdc: Optional[str] = None,
                          opts: Optional[InvokeOptions] = None) -> GetNsxtFirewallResult
    def get_nsxt_firewall_output(edge_gateway_id: Optional[pulumi.Input[str]] = None,
                          id: Optional[pulumi.Input[str]] = None,
                          org: Optional[pulumi.Input[str]] = None,
                          vdc: Optional[pulumi.Input[str]] = None,
                          opts: Optional[InvokeOptions] = None) -> Output[GetNsxtFirewallResult]
    func LookupNsxtFirewall(ctx *Context, args *LookupNsxtFirewallArgs, opts ...InvokeOption) (*LookupNsxtFirewallResult, error)
    func LookupNsxtFirewallOutput(ctx *Context, args *LookupNsxtFirewallOutputArgs, opts ...InvokeOption) LookupNsxtFirewallResultOutput

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

    public static class GetNsxtFirewall 
    {
        public static Task<GetNsxtFirewallResult> InvokeAsync(GetNsxtFirewallArgs args, InvokeOptions? opts = null)
        public static Output<GetNsxtFirewallResult> Invoke(GetNsxtFirewallInvokeArgs args, InvokeOptions? opts = null)
    }
    public static CompletableFuture<GetNsxtFirewallResult> getNsxtFirewall(GetNsxtFirewallArgs args, InvokeOptions options)
    public static Output<GetNsxtFirewallResult> getNsxtFirewall(GetNsxtFirewallArgs args, InvokeOptions options)
    
    fn::invoke:
      function: vcd:index/getNsxtFirewall:getNsxtFirewall
      arguments:
        # arguments dictionary

    The following arguments are supported:

    EdgeGatewayId string
    The ID of the Edge Gateway (NSX-T only). Can be looked up using vcd.NsxtEdgegateway data source
    Id string
    Org string
    The name of organization to use, optional if defined at provider level. Useful when connected as sysadmin working across different organizations.
    Vdc string

    Deprecated: Deprecated

    EdgeGatewayId string
    The ID of the Edge Gateway (NSX-T only). Can be looked up using vcd.NsxtEdgegateway data source
    Id string
    Org string
    The name of organization to use, optional if defined at provider level. Useful when connected as sysadmin working across different organizations.
    Vdc string

    Deprecated: Deprecated

    edgeGatewayId String
    The ID of the Edge Gateway (NSX-T only). Can be looked up using vcd.NsxtEdgegateway data source
    id String
    org String
    The name of organization to use, optional if defined at provider level. Useful when connected as sysadmin working across different organizations.
    vdc String

    Deprecated: Deprecated

    edgeGatewayId string
    The ID of the Edge Gateway (NSX-T only). Can be looked up using vcd.NsxtEdgegateway data source
    id string
    org string
    The name of organization to use, optional if defined at provider level. Useful when connected as sysadmin working across different organizations.
    vdc string

    Deprecated: Deprecated

    edge_gateway_id str
    The ID of the Edge Gateway (NSX-T only). Can be looked up using vcd.NsxtEdgegateway data source
    id str
    org str
    The name of organization to use, optional if defined at provider level. Useful when connected as sysadmin working across different organizations.
    vdc str

    Deprecated: Deprecated

    edgeGatewayId String
    The ID of the Edge Gateway (NSX-T only). Can be looked up using vcd.NsxtEdgegateway data source
    id String
    org String
    The name of organization to use, optional if defined at provider level. Useful when connected as sysadmin working across different organizations.
    vdc String

    Deprecated: Deprecated

    getNsxtFirewall Result

    The following output properties are available:

    EdgeGatewayId string
    Id string
    Rules List<GetNsxtFirewallRule>
    Org string
    Vdc string

    Deprecated: Deprecated

    EdgeGatewayId string
    Id string
    Rules []GetNsxtFirewallRule
    Org string
    Vdc string

    Deprecated: Deprecated

    edgeGatewayId String
    id String
    rules List<GetNsxtFirewallRule>
    org String
    vdc String

    Deprecated: Deprecated

    edgeGatewayId string
    id string
    rules GetNsxtFirewallRule[]
    org string
    vdc string

    Deprecated: Deprecated

    edge_gateway_id str
    id str
    rules Sequence[GetNsxtFirewallRule]
    org str
    vdc str

    Deprecated: Deprecated

    edgeGatewayId String
    id String
    rules List<Property Map>
    org String
    vdc String

    Deprecated: Deprecated

    Supporting Types

    GetNsxtFirewallRule

    Action string
    AppPortProfileIds List<string>
    DestinationIds List<string>
    Direction string
    Enabled bool
    Id string
    IpProtocol string
    Logging bool
    Name string
    SourceIds List<string>
    Action string
    AppPortProfileIds []string
    DestinationIds []string
    Direction string
    Enabled bool
    Id string
    IpProtocol string
    Logging bool
    Name string
    SourceIds []string
    action String
    appPortProfileIds List<String>
    destinationIds List<String>
    direction String
    enabled Boolean
    id String
    ipProtocol String
    logging Boolean
    name String
    sourceIds List<String>
    action string
    appPortProfileIds string[]
    destinationIds string[]
    direction string
    enabled boolean
    id string
    ipProtocol string
    logging boolean
    name string
    sourceIds string[]
    action str
    app_port_profile_ids Sequence[str]
    destination_ids Sequence[str]
    direction str
    enabled bool
    id str
    ip_protocol str
    logging bool
    name str
    source_ids Sequence[str]
    action String
    appPortProfileIds List<String>
    destinationIds List<String>
    direction String
    enabled Boolean
    id String
    ipProtocol String
    logging Boolean
    name String
    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