Viewing docs for vcd 3.14.1
published on Monday, Apr 14, 2025 by vmware
published on Monday, Apr 14, 2025 by vmware
Viewing docs for vcd 3.14.1
published on Monday, Apr 14, 2025 by vmware
published on Monday, Apr 14, 2025 by vmware
Provides a VMware Cloud Director firewall rule data source for advanced edge gateways (NSX-V). This can be used to read existing rules by ID and use its attributes in other resources.
Note: This data source requires advanced edge gateway.
Example Usage
import * as pulumi from "@pulumi/pulumi";
import * as vcd from "@pulumi/vcd";
const my_rule = vcd.getNsxvFirewallRule({
edgeGateway: "my-edge-gw",
org: "my-org",
ruleId: "133048",
vdc: "my-org-vdc",
});
import pulumi
import pulumi_vcd as vcd
my_rule = vcd.get_nsxv_firewall_rule(edge_gateway="my-edge-gw",
org="my-org",
rule_id="133048",
vdc="my-org-vdc")
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.LookupNsxvFirewallRule(ctx, &vcd.LookupNsxvFirewallRuleArgs{
EdgeGateway: "my-edge-gw",
Org: pulumi.StringRef("my-org"),
RuleId: "133048",
Vdc: pulumi.StringRef("my-org-vdc"),
}, 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_rule = Vcd.GetNsxvFirewallRule.Invoke(new()
{
EdgeGateway = "my-edge-gw",
Org = "my-org",
RuleId = "133048",
Vdc = "my-org-vdc",
});
});
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.GetNsxvFirewallRuleArgs;
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-rule = VcdFunctions.getNsxvFirewallRule(GetNsxvFirewallRuleArgs.builder()
.edgeGateway("my-edge-gw")
.org("my-org")
.ruleId("133048")
.vdc("my-org-vdc")
.build());
}
}
variables:
my-rule:
fn::invoke:
function: vcd:getNsxvFirewallRule
arguments:
edgeGateway: my-edge-gw
org: my-org
ruleId: '133048'
vdc: my-org-vdc
Using getNsxvFirewallRule
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 getNsxvFirewallRule(args: GetNsxvFirewallRuleArgs, opts?: InvokeOptions): Promise<GetNsxvFirewallRuleResult>
function getNsxvFirewallRuleOutput(args: GetNsxvFirewallRuleOutputArgs, opts?: InvokeOptions): Output<GetNsxvFirewallRuleResult>def get_nsxv_firewall_rule(edge_gateway: Optional[str] = None,
id: Optional[str] = None,
org: Optional[str] = None,
rule_id: Optional[str] = None,
vdc: Optional[str] = None,
opts: Optional[InvokeOptions] = None) -> GetNsxvFirewallRuleResult
def get_nsxv_firewall_rule_output(edge_gateway: Optional[pulumi.Input[str]] = None,
id: Optional[pulumi.Input[str]] = None,
org: Optional[pulumi.Input[str]] = None,
rule_id: Optional[pulumi.Input[str]] = None,
vdc: Optional[pulumi.Input[str]] = None,
opts: Optional[InvokeOptions] = None) -> Output[GetNsxvFirewallRuleResult]func LookupNsxvFirewallRule(ctx *Context, args *LookupNsxvFirewallRuleArgs, opts ...InvokeOption) (*LookupNsxvFirewallRuleResult, error)
func LookupNsxvFirewallRuleOutput(ctx *Context, args *LookupNsxvFirewallRuleOutputArgs, opts ...InvokeOption) LookupNsxvFirewallRuleResultOutput> Note: This function is named LookupNsxvFirewallRule in the Go SDK.
public static class GetNsxvFirewallRule
{
public static Task<GetNsxvFirewallRuleResult> InvokeAsync(GetNsxvFirewallRuleArgs args, InvokeOptions? opts = null)
public static Output<GetNsxvFirewallRuleResult> Invoke(GetNsxvFirewallRuleInvokeArgs args, InvokeOptions? opts = null)
}public static CompletableFuture<GetNsxvFirewallRuleResult> getNsxvFirewallRule(GetNsxvFirewallRuleArgs args, InvokeOptions options)
public static Output<GetNsxvFirewallRuleResult> getNsxvFirewallRule(GetNsxvFirewallRuleArgs args, InvokeOptions options)
fn::invoke:
function: vcd:index/getNsxvFirewallRule:getNsxvFirewallRule
arguments:
# arguments dictionaryThe following arguments are supported:
- Edge
Gateway string - The name of the edge gateway on which to apply the DNAT rule.
- Rule
Id string - ID of firewall rule (not UI number). See more information about firewall
rule ID in
vcd.NsxvFirewallRuleimport section. - Id string
- Org string
- The name of organization to use, optional if defined at provider level. Useful when connected as sysadmin working across different organisations.
- Vdc string
- The name of VDC to use, optional if defined at provider level.
- Edge
Gateway string - The name of the edge gateway on which to apply the DNAT rule.
- Rule
Id string - ID of firewall rule (not UI number). See more information about firewall
rule ID in
vcd.NsxvFirewallRuleimport section. - Id string
- Org string
- The name of organization to use, optional if defined at provider level. Useful when connected as sysadmin working across different organisations.
- Vdc string
- The name of VDC to use, optional if defined at provider level.
- edge
Gateway String - The name of the edge gateway on which to apply the DNAT rule.
- rule
Id String - ID of firewall rule (not UI number). See more information about firewall
rule ID in
vcd.NsxvFirewallRuleimport section. - id String
- org String
- The name of organization to use, optional if defined at provider level. Useful when connected as sysadmin working across different organisations.
- vdc String
- The name of VDC to use, optional if defined at provider level.
- edge
Gateway string - The name of the edge gateway on which to apply the DNAT rule.
- rule
Id string - ID of firewall rule (not UI number). See more information about firewall
rule ID in
vcd.NsxvFirewallRuleimport section. - id string
- org string
- The name of organization to use, optional if defined at provider level. Useful when connected as sysadmin working across different organisations.
- vdc string
- The name of VDC to use, optional if defined at provider level.
- edge_
gateway str - The name of the edge gateway on which to apply the DNAT rule.
- rule_
id str - ID of firewall rule (not UI number). See more information about firewall
rule ID in
vcd.NsxvFirewallRuleimport section. - id str
- org str
- The name of organization to use, optional if defined at provider level. Useful when connected as sysadmin working across different organisations.
- vdc str
- The name of VDC to use, optional if defined at provider level.
- edge
Gateway String - The name of the edge gateway on which to apply the DNAT rule.
- rule
Id String - ID of firewall rule (not UI number). See more information about firewall
rule ID in
vcd.NsxvFirewallRuleimport section. - id String
- org String
- The name of organization to use, optional if defined at provider level. Useful when connected as sysadmin working across different organisations.
- vdc String
- The name of VDC to use, optional if defined at provider level.
getNsxvFirewallRule Result
The following output properties are available:
- Action string
- Destinations
List<Get
Nsxv Firewall Rule Destination> - Edge
Gateway string - Enabled bool
- Id string
- Logging
Enabled bool - Name string
- Rule
Id string - Rule
Tag double - Rule
Type string - Services
List<Get
Nsxv Firewall Rule Service> - Sources
List<Get
Nsxv Firewall Rule Source> - Org string
- Vdc string
- Action string
- Destinations
[]Get
Nsxv Firewall Rule Destination - Edge
Gateway string - Enabled bool
- Id string
- Logging
Enabled bool - Name string
- Rule
Id string - Rule
Tag float64 - Rule
Type string - Services
[]Get
Nsxv Firewall Rule Service - Sources
[]Get
Nsxv Firewall Rule Source - Org string
- Vdc string
- action String
- destinations
List<Get
Nsxv Firewall Rule Destination> - edge
Gateway String - enabled Boolean
- id String
- logging
Enabled Boolean - name String
- rule
Id String - rule
Tag Double - rule
Type String - services
List<Get
Nsxv Firewall Rule Service> - sources
List<Get
Nsxv Firewall Rule Source> - org String
- vdc String
- action string
- destinations
Get
Nsxv Firewall Rule Destination[] - edge
Gateway string - enabled boolean
- id string
- logging
Enabled boolean - name string
- rule
Id string - rule
Tag number - rule
Type string - services
Get
Nsxv Firewall Rule Service[] - sources
Get
Nsxv Firewall Rule Source[] - org string
- vdc string
- action String
- destinations List<Property Map>
- edge
Gateway String - enabled Boolean
- id String
- logging
Enabled Boolean - name String
- rule
Id String - rule
Tag Number - rule
Type String - services List<Property Map>
- sources List<Property Map>
- org String
- vdc String
Supporting Types
GetNsxvFirewallRuleDestination
- Exclude bool
- Gateway
Interfaces List<string> - Ip
Addresses List<string> - Ip
Sets List<string> - Org
Networks List<string> - Vm
Ids List<string>
- Exclude bool
- Gateway
Interfaces []string - Ip
Addresses []string - Ip
Sets []string - Org
Networks []string - Vm
Ids []string
- exclude Boolean
- gateway
Interfaces List<String> - ip
Addresses List<String> - ip
Sets List<String> - org
Networks List<String> - vm
Ids List<String>
- exclude boolean
- gateway
Interfaces string[] - ip
Addresses string[] - ip
Sets string[] - org
Networks string[] - vm
Ids string[]
- exclude bool
- gateway_
interfaces Sequence[str] - ip_
addresses Sequence[str] - ip_
sets Sequence[str] - org_
networks Sequence[str] - vm_
ids Sequence[str]
- exclude Boolean
- gateway
Interfaces List<String> - ip
Addresses List<String> - ip
Sets List<String> - org
Networks List<String> - vm
Ids List<String>
GetNsxvFirewallRuleService
- Port string
- Protocol string
- Source
Port string
- Port string
- Protocol string
- Source
Port string
- port String
- protocol String
- source
Port String
- port string
- protocol string
- source
Port string
- port str
- protocol str
- source_
port str
- port String
- protocol String
- source
Port String
GetNsxvFirewallRuleSource
- Exclude bool
- Gateway
Interfaces List<string> - Ip
Addresses List<string> - Ip
Sets List<string> - Org
Networks List<string> - Vm
Ids List<string>
- Exclude bool
- Gateway
Interfaces []string - Ip
Addresses []string - Ip
Sets []string - Org
Networks []string - Vm
Ids []string
- exclude Boolean
- gateway
Interfaces List<String> - ip
Addresses List<String> - ip
Sets List<String> - org
Networks List<String> - vm
Ids List<String>
- exclude boolean
- gateway
Interfaces string[] - ip
Addresses string[] - ip
Sets string[] - org
Networks string[] - vm
Ids string[]
- exclude bool
- gateway_
interfaces Sequence[str] - ip_
addresses Sequence[str] - ip_
sets Sequence[str] - org_
networks Sequence[str] - vm_
ids Sequence[str]
- exclude Boolean
- gateway
Interfaces List<String> - ip
Addresses List<String> - ip
Sets List<String> - org
Networks List<String> - vm
Ids List<String>
Package Details
- Repository
- vcd vmware/terraform-provider-vcd
- License
- Notes
- This Pulumi package is based on the
vcdTerraform Provider.
Viewing docs for vcd 3.14.1
published on Monday, Apr 14, 2025 by vmware
published on Monday, Apr 14, 2025 by vmware
