1. Packages
  2. Oracle Cloud Infrastructure
  3. API Docs
  4. NetworkFirewall
  5. getNetworkFirewall
Viewing docs for Oracle Cloud Infrastructure v4.2.0
published on Friday, Mar 6, 2026 by Pulumi
oci logo
Viewing docs for Oracle Cloud Infrastructure v4.2.0
published on Friday, Mar 6, 2026 by Pulumi

    This data source provides details about a specific Network Firewall resource in Oracle Cloud Infrastructure Network Firewall service.

    Gets a NetworkFirewall by identifier

    Example Usage

    import * as pulumi from "@pulumi/pulumi";
    import * as oci from "@pulumi/oci";
    
    const testNetworkFirewall = oci.NetworkFirewall.getNetworkFirewall({
        networkFirewallId: testNetworkFirewallOciNetworkFirewallNetworkFirewall.id,
    });
    
    import pulumi
    import pulumi_oci as oci
    
    test_network_firewall = oci.NetworkFirewall.get_network_firewall(network_firewall_id=test_network_firewall_oci_network_firewall_network_firewall["id"])
    
    package main
    
    import (
    	"github.com/pulumi/pulumi-oci/sdk/v4/go/oci/networkfirewall"
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		_, err := networkfirewall.GetNetworkFirewall(ctx, &networkfirewall.GetNetworkFirewallArgs{
    			NetworkFirewallId: testNetworkFirewallOciNetworkFirewallNetworkFirewall.Id,
    		}, nil)
    		if err != nil {
    			return err
    		}
    		return nil
    	})
    }
    
    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using Oci = Pulumi.Oci;
    
    return await Deployment.RunAsync(() => 
    {
        var testNetworkFirewall = Oci.NetworkFirewall.GetNetworkFirewall.Invoke(new()
        {
            NetworkFirewallId = testNetworkFirewallOciNetworkFirewallNetworkFirewall.Id,
        });
    
    });
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.oci.NetworkFirewall.NetworkFirewallFunctions;
    import com.pulumi.oci.NetworkFirewall.inputs.GetNetworkFirewallArgs;
    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 testNetworkFirewall = NetworkFirewallFunctions.getNetworkFirewall(GetNetworkFirewallArgs.builder()
                .networkFirewallId(testNetworkFirewallOciNetworkFirewallNetworkFirewall.id())
                .build());
    
        }
    }
    
    variables:
      testNetworkFirewall:
        fn::invoke:
          function: oci:NetworkFirewall:getNetworkFirewall
          arguments:
            networkFirewallId: ${testNetworkFirewallOciNetworkFirewallNetworkFirewall.id}
    

    Using getNetworkFirewall

    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 getNetworkFirewall(args: GetNetworkFirewallArgs, opts?: InvokeOptions): Promise<GetNetworkFirewallResult>
    function getNetworkFirewallOutput(args: GetNetworkFirewallOutputArgs, opts?: InvokeOptions): Output<GetNetworkFirewallResult>
    def get_network_firewall(network_firewall_id: Optional[str] = None,
                             opts: Optional[InvokeOptions] = None) -> GetNetworkFirewallResult
    def get_network_firewall_output(network_firewall_id: Optional[pulumi.Input[str]] = None,
                             opts: Optional[InvokeOptions] = None) -> Output[GetNetworkFirewallResult]
    func LookupNetworkFirewall(ctx *Context, args *LookupNetworkFirewallArgs, opts ...InvokeOption) (*LookupNetworkFirewallResult, error)
    func LookupNetworkFirewallOutput(ctx *Context, args *LookupNetworkFirewallOutputArgs, opts ...InvokeOption) LookupNetworkFirewallResultOutput

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

    public static class GetNetworkFirewall 
    {
        public static Task<GetNetworkFirewallResult> InvokeAsync(GetNetworkFirewallArgs args, InvokeOptions? opts = null)
        public static Output<GetNetworkFirewallResult> Invoke(GetNetworkFirewallInvokeArgs args, InvokeOptions? opts = null)
    }
    public static CompletableFuture<GetNetworkFirewallResult> getNetworkFirewall(GetNetworkFirewallArgs args, InvokeOptions options)
    public static Output<GetNetworkFirewallResult> getNetworkFirewall(GetNetworkFirewallArgs args, InvokeOptions options)
    
    fn::invoke:
      function: oci:NetworkFirewall/getNetworkFirewall:getNetworkFirewall
      arguments:
        # arguments dictionary

    The following arguments are supported:

    NetworkFirewallId string
    The OCID of the Network Firewall resource.
    NetworkFirewallId string
    The OCID of the Network Firewall resource.
    networkFirewallId String
    The OCID of the Network Firewall resource.
    networkFirewallId string
    The OCID of the Network Firewall resource.
    network_firewall_id str
    The OCID of the Network Firewall resource.
    networkFirewallId String
    The OCID of the Network Firewall resource.

    getNetworkFirewall Result

    The following output properties are available:

    AvailabilityDomain string
    Availability Domain where Network Firewall instance is created. To get a list of availability domains for a tenancy, use the ListAvailabilityDomains operation. Example: kIdk:PHX-AD-1
    CompartmentId string
    The OCID of the compartment containing the Network Firewall.
    DefinedTags Dictionary<string, string>
    Defined tags for this resource. Each key is predefined and scoped to a namespace. For more information, see Resource Tags. Example: {"Operations.CostCenter": "42"}
    DisplayName string
    A user-friendly name for the Network Firewall. Does not have to be unique, and it's changeable. Avoid entering confidential information.
    FreeformTags Dictionary<string, string>
    Free-form tags for this resource. Each tag is a simple key-value pair with no predefined name, type, or namespace. For more information, see Resource Tags. Example: {"Department": "Finance"}
    Id string
    The OCID of the Network Firewall resource.
    Ipv4address string
    IPv4 address for the Network Firewall.
    Ipv6address string
    IPv6 address for the Network Firewall.
    LifecycleDetails string
    A message describing the current state in more detail. For example, it can be used to provide actionable information for a resource in 'FAILED' state.
    NatConfigurations List<GetNetworkFirewallNatConfiguration>
    Response to a request to configure Network Address Translation (NAT) on a firewall. To perform NAT on traffic passing the private NAT IPs to the firewall, the attached network firewall policy must also have NAT rules and NAT configuration must be enabled. If NAT configuration is enabled and the attached firewall policy does not contain NAT rule then NAT IPs will get allocated but NAT will not be performed on any traffic.
    NetworkFirewallId string
    NetworkFirewallPolicyId string
    The OCID of the Network Firewall Policy.
    NetworkSecurityGroupIds List<string>
    An array of network security groups OCID associated with the Network Firewall.
    Shape string
    The shape of a firewall to determine the bandwidth that the firewall allows.
    State string
    The current state of the Network Firewall.
    SubnetId string
    The OCID of the subnet associated with the Network Firewall.
    SystemTags Dictionary<string, string>
    Usage of system tag keys. These predefined keys are scoped to namespaces. Example: {"orcl-cloud.free-tier-retained": "true"}
    TimeCreated string
    The time at which the Network Firewall was created in the format defined by RFC3339. Example: 2016-08-25T21:10:29.600Z
    TimeUpdated string
    The time at which the Network Firewall was updated in the format defined by RFC3339. Example: 2016-08-25T21:10:29.600Z
    AvailabilityDomain string
    Availability Domain where Network Firewall instance is created. To get a list of availability domains for a tenancy, use the ListAvailabilityDomains operation. Example: kIdk:PHX-AD-1
    CompartmentId string
    The OCID of the compartment containing the Network Firewall.
    DefinedTags map[string]string
    Defined tags for this resource. Each key is predefined and scoped to a namespace. For more information, see Resource Tags. Example: {"Operations.CostCenter": "42"}
    DisplayName string
    A user-friendly name for the Network Firewall. Does not have to be unique, and it's changeable. Avoid entering confidential information.
    FreeformTags map[string]string
    Free-form tags for this resource. Each tag is a simple key-value pair with no predefined name, type, or namespace. For more information, see Resource Tags. Example: {"Department": "Finance"}
    Id string
    The OCID of the Network Firewall resource.
    Ipv4address string
    IPv4 address for the Network Firewall.
    Ipv6address string
    IPv6 address for the Network Firewall.
    LifecycleDetails string
    A message describing the current state in more detail. For example, it can be used to provide actionable information for a resource in 'FAILED' state.
    NatConfigurations []GetNetworkFirewallNatConfiguration
    Response to a request to configure Network Address Translation (NAT) on a firewall. To perform NAT on traffic passing the private NAT IPs to the firewall, the attached network firewall policy must also have NAT rules and NAT configuration must be enabled. If NAT configuration is enabled and the attached firewall policy does not contain NAT rule then NAT IPs will get allocated but NAT will not be performed on any traffic.
    NetworkFirewallId string
    NetworkFirewallPolicyId string
    The OCID of the Network Firewall Policy.
    NetworkSecurityGroupIds []string
    An array of network security groups OCID associated with the Network Firewall.
    Shape string
    The shape of a firewall to determine the bandwidth that the firewall allows.
    State string
    The current state of the Network Firewall.
    SubnetId string
    The OCID of the subnet associated with the Network Firewall.
    SystemTags map[string]string
    Usage of system tag keys. These predefined keys are scoped to namespaces. Example: {"orcl-cloud.free-tier-retained": "true"}
    TimeCreated string
    The time at which the Network Firewall was created in the format defined by RFC3339. Example: 2016-08-25T21:10:29.600Z
    TimeUpdated string
    The time at which the Network Firewall was updated in the format defined by RFC3339. Example: 2016-08-25T21:10:29.600Z
    availabilityDomain String
    Availability Domain where Network Firewall instance is created. To get a list of availability domains for a tenancy, use the ListAvailabilityDomains operation. Example: kIdk:PHX-AD-1
    compartmentId String
    The OCID of the compartment containing the Network Firewall.
    definedTags Map<String,String>
    Defined tags for this resource. Each key is predefined and scoped to a namespace. For more information, see Resource Tags. Example: {"Operations.CostCenter": "42"}
    displayName String
    A user-friendly name for the Network Firewall. Does not have to be unique, and it's changeable. Avoid entering confidential information.
    freeformTags Map<String,String>
    Free-form tags for this resource. Each tag is a simple key-value pair with no predefined name, type, or namespace. For more information, see Resource Tags. Example: {"Department": "Finance"}
    id String
    The OCID of the Network Firewall resource.
    ipv4address String
    IPv4 address for the Network Firewall.
    ipv6address String
    IPv6 address for the Network Firewall.
    lifecycleDetails String
    A message describing the current state in more detail. For example, it can be used to provide actionable information for a resource in 'FAILED' state.
    natConfigurations List<GetNatConfiguration>
    Response to a request to configure Network Address Translation (NAT) on a firewall. To perform NAT on traffic passing the private NAT IPs to the firewall, the attached network firewall policy must also have NAT rules and NAT configuration must be enabled. If NAT configuration is enabled and the attached firewall policy does not contain NAT rule then NAT IPs will get allocated but NAT will not be performed on any traffic.
    networkFirewallId String
    networkFirewallPolicyId String
    The OCID of the Network Firewall Policy.
    networkSecurityGroupIds List<String>
    An array of network security groups OCID associated with the Network Firewall.
    shape String
    The shape of a firewall to determine the bandwidth that the firewall allows.
    state String
    The current state of the Network Firewall.
    subnetId String
    The OCID of the subnet associated with the Network Firewall.
    systemTags Map<String,String>
    Usage of system tag keys. These predefined keys are scoped to namespaces. Example: {"orcl-cloud.free-tier-retained": "true"}
    timeCreated String
    The time at which the Network Firewall was created in the format defined by RFC3339. Example: 2016-08-25T21:10:29.600Z
    timeUpdated String
    The time at which the Network Firewall was updated in the format defined by RFC3339. Example: 2016-08-25T21:10:29.600Z
    availabilityDomain string
    Availability Domain where Network Firewall instance is created. To get a list of availability domains for a tenancy, use the ListAvailabilityDomains operation. Example: kIdk:PHX-AD-1
    compartmentId string
    The OCID of the compartment containing the Network Firewall.
    definedTags {[key: string]: string}
    Defined tags for this resource. Each key is predefined and scoped to a namespace. For more information, see Resource Tags. Example: {"Operations.CostCenter": "42"}
    displayName string
    A user-friendly name for the Network Firewall. Does not have to be unique, and it's changeable. Avoid entering confidential information.
    freeformTags {[key: string]: string}
    Free-form tags for this resource. Each tag is a simple key-value pair with no predefined name, type, or namespace. For more information, see Resource Tags. Example: {"Department": "Finance"}
    id string
    The OCID of the Network Firewall resource.
    ipv4address string
    IPv4 address for the Network Firewall.
    ipv6address string
    IPv6 address for the Network Firewall.
    lifecycleDetails string
    A message describing the current state in more detail. For example, it can be used to provide actionable information for a resource in 'FAILED' state.
    natConfigurations GetNetworkFirewallNatConfiguration[]
    Response to a request to configure Network Address Translation (NAT) on a firewall. To perform NAT on traffic passing the private NAT IPs to the firewall, the attached network firewall policy must also have NAT rules and NAT configuration must be enabled. If NAT configuration is enabled and the attached firewall policy does not contain NAT rule then NAT IPs will get allocated but NAT will not be performed on any traffic.
    networkFirewallId string
    networkFirewallPolicyId string
    The OCID of the Network Firewall Policy.
    networkSecurityGroupIds string[]
    An array of network security groups OCID associated with the Network Firewall.
    shape string
    The shape of a firewall to determine the bandwidth that the firewall allows.
    state string
    The current state of the Network Firewall.
    subnetId string
    The OCID of the subnet associated with the Network Firewall.
    systemTags {[key: string]: string}
    Usage of system tag keys. These predefined keys are scoped to namespaces. Example: {"orcl-cloud.free-tier-retained": "true"}
    timeCreated string
    The time at which the Network Firewall was created in the format defined by RFC3339. Example: 2016-08-25T21:10:29.600Z
    timeUpdated string
    The time at which the Network Firewall was updated in the format defined by RFC3339. Example: 2016-08-25T21:10:29.600Z
    availability_domain str
    Availability Domain where Network Firewall instance is created. To get a list of availability domains for a tenancy, use the ListAvailabilityDomains operation. Example: kIdk:PHX-AD-1
    compartment_id str
    The OCID of the compartment containing the Network Firewall.
    defined_tags Mapping[str, str]
    Defined tags for this resource. Each key is predefined and scoped to a namespace. For more information, see Resource Tags. Example: {"Operations.CostCenter": "42"}
    display_name str
    A user-friendly name for the Network Firewall. Does not have to be unique, and it's changeable. Avoid entering confidential information.
    freeform_tags Mapping[str, str]
    Free-form tags for this resource. Each tag is a simple key-value pair with no predefined name, type, or namespace. For more information, see Resource Tags. Example: {"Department": "Finance"}
    id str
    The OCID of the Network Firewall resource.
    ipv4address str
    IPv4 address for the Network Firewall.
    ipv6address str
    IPv6 address for the Network Firewall.
    lifecycle_details str
    A message describing the current state in more detail. For example, it can be used to provide actionable information for a resource in 'FAILED' state.
    nat_configurations Sequence[GetNetworkFirewallNatConfiguration]
    Response to a request to configure Network Address Translation (NAT) on a firewall. To perform NAT on traffic passing the private NAT IPs to the firewall, the attached network firewall policy must also have NAT rules and NAT configuration must be enabled. If NAT configuration is enabled and the attached firewall policy does not contain NAT rule then NAT IPs will get allocated but NAT will not be performed on any traffic.
    network_firewall_id str
    network_firewall_policy_id str
    The OCID of the Network Firewall Policy.
    network_security_group_ids Sequence[str]
    An array of network security groups OCID associated with the Network Firewall.
    shape str
    The shape of a firewall to determine the bandwidth that the firewall allows.
    state str
    The current state of the Network Firewall.
    subnet_id str
    The OCID of the subnet associated with the Network Firewall.
    system_tags Mapping[str, str]
    Usage of system tag keys. These predefined keys are scoped to namespaces. Example: {"orcl-cloud.free-tier-retained": "true"}
    time_created str
    The time at which the Network Firewall was created in the format defined by RFC3339. Example: 2016-08-25T21:10:29.600Z
    time_updated str
    The time at which the Network Firewall was updated in the format defined by RFC3339. Example: 2016-08-25T21:10:29.600Z
    availabilityDomain String
    Availability Domain where Network Firewall instance is created. To get a list of availability domains for a tenancy, use the ListAvailabilityDomains operation. Example: kIdk:PHX-AD-1
    compartmentId String
    The OCID of the compartment containing the Network Firewall.
    definedTags Map<String>
    Defined tags for this resource. Each key is predefined and scoped to a namespace. For more information, see Resource Tags. Example: {"Operations.CostCenter": "42"}
    displayName String
    A user-friendly name for the Network Firewall. Does not have to be unique, and it's changeable. Avoid entering confidential information.
    freeformTags Map<String>
    Free-form tags for this resource. Each tag is a simple key-value pair with no predefined name, type, or namespace. For more information, see Resource Tags. Example: {"Department": "Finance"}
    id String
    The OCID of the Network Firewall resource.
    ipv4address String
    IPv4 address for the Network Firewall.
    ipv6address String
    IPv6 address for the Network Firewall.
    lifecycleDetails String
    A message describing the current state in more detail. For example, it can be used to provide actionable information for a resource in 'FAILED' state.
    natConfigurations List<Property Map>
    Response to a request to configure Network Address Translation (NAT) on a firewall. To perform NAT on traffic passing the private NAT IPs to the firewall, the attached network firewall policy must also have NAT rules and NAT configuration must be enabled. If NAT configuration is enabled and the attached firewall policy does not contain NAT rule then NAT IPs will get allocated but NAT will not be performed on any traffic.
    networkFirewallId String
    networkFirewallPolicyId String
    The OCID of the Network Firewall Policy.
    networkSecurityGroupIds List<String>
    An array of network security groups OCID associated with the Network Firewall.
    shape String
    The shape of a firewall to determine the bandwidth that the firewall allows.
    state String
    The current state of the Network Firewall.
    subnetId String
    The OCID of the subnet associated with the Network Firewall.
    systemTags Map<String>
    Usage of system tag keys. These predefined keys are scoped to namespaces. Example: {"orcl-cloud.free-tier-retained": "true"}
    timeCreated String
    The time at which the Network Firewall was created in the format defined by RFC3339. Example: 2016-08-25T21:10:29.600Z
    timeUpdated String
    The time at which the Network Firewall was updated in the format defined by RFC3339. Example: 2016-08-25T21:10:29.600Z

    Supporting Types

    GetNetworkFirewallNatConfiguration

    MustEnablePrivateNat bool
    True indicates that NAT configuration is enabled. False indicates NAT configuration is disabled.
    NatIpAddressLists List<string>
    An array of Private NAT IP addresses that are associated with the Network Firewall. These IP addresses are reserved for NAT and shouldn't be used for any other purpose in the subnet. This list contains IP addresses when NAT configuration is enabled. This list is empty or null IP when NAT configuration is disabled.
    MustEnablePrivateNat bool
    True indicates that NAT configuration is enabled. False indicates NAT configuration is disabled.
    NatIpAddressLists []string
    An array of Private NAT IP addresses that are associated with the Network Firewall. These IP addresses are reserved for NAT and shouldn't be used for any other purpose in the subnet. This list contains IP addresses when NAT configuration is enabled. This list is empty or null IP when NAT configuration is disabled.
    mustEnablePrivateNat Boolean
    True indicates that NAT configuration is enabled. False indicates NAT configuration is disabled.
    natIpAddressLists List<String>
    An array of Private NAT IP addresses that are associated with the Network Firewall. These IP addresses are reserved for NAT and shouldn't be used for any other purpose in the subnet. This list contains IP addresses when NAT configuration is enabled. This list is empty or null IP when NAT configuration is disabled.
    mustEnablePrivateNat boolean
    True indicates that NAT configuration is enabled. False indicates NAT configuration is disabled.
    natIpAddressLists string[]
    An array of Private NAT IP addresses that are associated with the Network Firewall. These IP addresses are reserved for NAT and shouldn't be used for any other purpose in the subnet. This list contains IP addresses when NAT configuration is enabled. This list is empty or null IP when NAT configuration is disabled.
    must_enable_private_nat bool
    True indicates that NAT configuration is enabled. False indicates NAT configuration is disabled.
    nat_ip_address_lists Sequence[str]
    An array of Private NAT IP addresses that are associated with the Network Firewall. These IP addresses are reserved for NAT and shouldn't be used for any other purpose in the subnet. This list contains IP addresses when NAT configuration is enabled. This list is empty or null IP when NAT configuration is disabled.
    mustEnablePrivateNat Boolean
    True indicates that NAT configuration is enabled. False indicates NAT configuration is disabled.
    natIpAddressLists List<String>
    An array of Private NAT IP addresses that are associated with the Network Firewall. These IP addresses are reserved for NAT and shouldn't be used for any other purpose in the subnet. This list contains IP addresses when NAT configuration is enabled. This list is empty or null IP when NAT configuration is disabled.

    Package Details

    Repository
    oci pulumi/pulumi-oci
    License
    Apache-2.0
    Notes
    This Pulumi package is based on the oci Terraform Provider.
    oci logo
    Viewing docs for Oracle Cloud Infrastructure v4.2.0
    published on Friday, Mar 6, 2026 by Pulumi
      Try Pulumi Cloud free. Your team will thank you.