vcd 3.14.1 published on Monday, Apr 14, 2025 by vmware
vcd.getNsxvDistributedFirewall
Explore with Pulumi AI
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:
getNsxvDistributedFirewall Result
The following output properties are available:
- Enabled bool
- Id string
- Rules
List<Get
Nsxv Distributed Firewall Rule> - Vdc
Id string
- Enabled bool
- Id string
- Rules
[]Get
Nsxv Distributed Firewall Rule - Vdc
Id string
- enabled Boolean
- id String
- rules
List<Get
Nsxv Distributed Firewall Rule> - vdc
Id String
- enabled boolean
- id string
- rules
Get
Nsxv Distributed Firewall Rule[] - vdc
Id string
- enabled Boolean
- id String
- rules List<Property Map>
- vdc
Id String
Supporting Types
GetNsxvDistributedFirewallRule
- Action string
- Applications
List<Get
Nsxv Distributed Firewall Rule Application> - Applied
Tos List<GetNsxv Distributed Firewall Rule Applied To> - Destinations
List<Get
Nsxv Distributed Firewall Rule Destination> - Direction string
- Enabled bool
- Exclude
Destination bool - Exclude
Source bool - Id double
- Logged bool
- Name string
- Packet
Type string - Sources
List<Get
Nsxv Distributed Firewall Rule Source>
- Action string
- Applications
[]Get
Nsxv Distributed Firewall Rule Application - Applied
Tos []GetNsxv Distributed Firewall Rule Applied To - Destinations
[]Get
Nsxv Distributed Firewall Rule Destination - Direction string
- Enabled bool
- Exclude
Destination bool - Exclude
Source bool - Id float64
- Logged bool
- Name string
- Packet
Type string - Sources
[]Get
Nsxv Distributed Firewall Rule Source
- action String
- applications
List<Get
Nsxv Distributed Firewall Rule Application> - applied
Tos List<GetNsxv Distributed Firewall Rule Applied To> - destinations
List<Get
Nsxv Distributed Firewall Rule Destination> - direction String
- enabled Boolean
- exclude
Destination Boolean - exclude
Source Boolean - id Double
- logged Boolean
- name String
- packet
Type String - sources
List<Get
Nsxv Distributed Firewall Rule Source>
- action string
- applications
Get
Nsxv Distributed Firewall Rule Application[] - applied
Tos GetNsxv Distributed Firewall Rule Applied To[] - destinations
Get
Nsxv Distributed Firewall Rule Destination[] - direction string
- enabled boolean
- exclude
Destination boolean - exclude
Source boolean - id number
- logged boolean
- name string
- packet
Type string - sources
Get
Nsxv Distributed Firewall Rule Source[]
- action str
- applications
Sequence[Get
Nsxv Distributed Firewall Rule Application] - applied_
tos Sequence[GetNsxv Distributed Firewall Rule Applied To] - destinations
Sequence[Get
Nsxv Distributed Firewall Rule Destination] - direction str
- enabled bool
- exclude_
destination bool - exclude_
source bool - id float
- logged bool
- name str
- packet_
type str - sources
Sequence[Get
Nsxv Distributed Firewall Rule Source]
- action String
- applications List<Property Map>
- applied
Tos List<Property Map> - destinations List<Property Map>
- direction String
- enabled Boolean
- exclude
Destination Boolean - exclude
Source Boolean - id Number
- logged Boolean
- name String
- packet
Type String - sources List<Property Map>
GetNsxvDistributedFirewallRuleApplication
- Destination
Port string - Name string
- Protocol string
- Source
Port string - Type string
- Value string
- Destination
Port string - Name string
- Protocol string
- Source
Port string - Type string
- Value string
- destination
Port String - name String
- protocol String
- source
Port String - type String
- value String
- destination
Port string - name string
- protocol string
- source
Port string - type string
- value string
- destination_
port str - name str
- protocol str
- source_
port str - type str
- value str
- destination
Port String - name String
- protocol String
- source
Port String - type String
- value String
GetNsxvDistributedFirewallRuleAppliedTo
GetNsxvDistributedFirewallRuleDestination
GetNsxvDistributedFirewallRuleSource
Package Details
- Repository
- vcd vmware/terraform-provider-vcd
- License
- Notes
- This Pulumi package is based on the
vcd
Terraform Provider.