vcd 3.14.1 published on Monday, Apr 14, 2025 by vmware
vcd.getNsxtDistributedFirewall
Explore with Pulumi AI
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:
- Vdc
Group stringId - 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 stringId - 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 StringId - 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 stringId - 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_ strid - 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.
- vdc
Group StringId - 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:
- Id string
- Rules
List<Get
Nsxt Distributed Firewall Rule> - Vdc
Group stringId - Org string
- Id string
- Rules
[]Get
Nsxt Distributed Firewall Rule Type - Vdc
Group stringId - Org string
- id String
- rules
List<Get
Nsxt Distributed Firewall Rule> - vdc
Group StringId - org String
- id string
- rules
Get
Nsxt Distributed Firewall Rule[] - vdc
Group stringId - org string
- id String
- rules List<Property Map>
- vdc
Group StringId - org String
Supporting Types
GetNsxtDistributedFirewallRule
- Action string
- App
Port List<string>Profile Ids - Comment string
- Description string
- Destination
Groups boolExcluded - Destination
Ids List<string> - Direction string
- Enabled bool
- Id string
- Ip
Protocol string - Logging bool
- Name string
- Network
Context List<string>Profile Ids - Source
Groups boolExcluded - Source
Ids List<string>
- Action string
- App
Port []stringProfile Ids - Comment string
- Description string
- Destination
Groups boolExcluded - Destination
Ids []string - Direction string
- Enabled bool
- Id string
- Ip
Protocol string - Logging bool
- Name string
- Network
Context []stringProfile Ids - Source
Groups boolExcluded - Source
Ids []string
- action String
- app
Port List<String>Profile Ids - comment String
- description String
- destination
Groups BooleanExcluded - destination
Ids List<String> - direction String
- enabled Boolean
- id String
- ip
Protocol String - logging Boolean
- name String
- network
Context List<String>Profile Ids - source
Groups BooleanExcluded - source
Ids List<String>
- action string
- app
Port string[]Profile Ids - comment string
- description string
- destination
Groups booleanExcluded - destination
Ids string[] - direction string
- enabled boolean
- id string
- ip
Protocol string - logging boolean
- name string
- network
Context string[]Profile Ids - source
Groups booleanExcluded - source
Ids string[]
- action str
- app_
port_ Sequence[str]profile_ ids - comment str
- description str
- destination_
groups_ boolexcluded - destination_
ids Sequence[str] - direction str
- enabled bool
- id str
- ip_
protocol str - logging bool
- name str
- network_
context_ Sequence[str]profile_ ids - source_
groups_ boolexcluded - source_
ids Sequence[str]
- action String
- app
Port List<String>Profile Ids - comment String
- description String
- destination
Groups BooleanExcluded - destination
Ids List<String> - direction String
- enabled Boolean
- id String
- ip
Protocol String - logging Boolean
- name String
- network
Context List<String>Profile Ids - source
Groups BooleanExcluded - source
Ids List<String>
Package Details
- Repository
- vcd vmware/terraform-provider-vcd
- License
- Notes
- This Pulumi package is based on the
vcd
Terraform Provider.