Oracle Cloud Infrastructure v3.9.0 published on Wednesday, Sep 24, 2025 by Pulumi
oci.Waf.getFirewalls
This data source provides the list of Web App Firewalls in Oracle Cloud Infrastructure Waf service.
Gets a list of all WebAppFirewalls in a compartment.
Example Usage
import * as pulumi from "@pulumi/pulumi";
import * as oci from "@pulumi/oci";
const testWebAppFirewalls = oci.Waf.getFirewalls({
    compartmentId: compartmentId,
    displayName: webAppFirewallDisplayName,
    id: webAppFirewallId,
    states: webAppFirewallState,
    webAppFirewallPolicyId: testWebAppFirewallPolicy.id,
});
import pulumi
import pulumi_oci as oci
test_web_app_firewalls = oci.Waf.get_firewalls(compartment_id=compartment_id,
    display_name=web_app_firewall_display_name,
    id=web_app_firewall_id,
    states=web_app_firewall_state,
    web_app_firewall_policy_id=test_web_app_firewall_policy["id"])
package main
import (
	"github.com/pulumi/pulumi-oci/sdk/v3/go/oci/waf"
	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
	pulumi.Run(func(ctx *pulumi.Context) error {
		_, err := waf.GetFirewalls(ctx, &waf.GetFirewallsArgs{
			CompartmentId:          compartmentId,
			DisplayName:            pulumi.StringRef(webAppFirewallDisplayName),
			Id:                     pulumi.StringRef(webAppFirewallId),
			States:                 webAppFirewallState,
			WebAppFirewallPolicyId: pulumi.StringRef(testWebAppFirewallPolicy.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 testWebAppFirewalls = Oci.Waf.GetFirewalls.Invoke(new()
    {
        CompartmentId = compartmentId,
        DisplayName = webAppFirewallDisplayName,
        Id = webAppFirewallId,
        States = webAppFirewallState,
        WebAppFirewallPolicyId = testWebAppFirewallPolicy.Id,
    });
});
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.oci.Waf.WafFunctions;
import com.pulumi.oci.Waf.inputs.GetFirewallsArgs;
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 testWebAppFirewalls = WafFunctions.getFirewalls(GetFirewallsArgs.builder()
            .compartmentId(compartmentId)
            .displayName(webAppFirewallDisplayName)
            .id(webAppFirewallId)
            .states(webAppFirewallState)
            .webAppFirewallPolicyId(testWebAppFirewallPolicy.id())
            .build());
    }
}
variables:
  testWebAppFirewalls:
    fn::invoke:
      function: oci:Waf:getFirewalls
      arguments:
        compartmentId: ${compartmentId}
        displayName: ${webAppFirewallDisplayName}
        id: ${webAppFirewallId}
        states: ${webAppFirewallState}
        webAppFirewallPolicyId: ${testWebAppFirewallPolicy.id}
Using getFirewalls
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 getFirewalls(args: GetFirewallsArgs, opts?: InvokeOptions): Promise<GetFirewallsResult>
function getFirewallsOutput(args: GetFirewallsOutputArgs, opts?: InvokeOptions): Output<GetFirewallsResult>def get_firewalls(compartment_id: Optional[str] = None,
                  display_name: Optional[str] = None,
                  filters: Optional[Sequence[GetFirewallsFilter]] = None,
                  id: Optional[str] = None,
                  states: Optional[Sequence[str]] = None,
                  web_app_firewall_policy_id: Optional[str] = None,
                  opts: Optional[InvokeOptions] = None) -> GetFirewallsResult
def get_firewalls_output(compartment_id: Optional[pulumi.Input[str]] = None,
                  display_name: Optional[pulumi.Input[str]] = None,
                  filters: Optional[pulumi.Input[Sequence[pulumi.Input[GetFirewallsFilterArgs]]]] = None,
                  id: Optional[pulumi.Input[str]] = None,
                  states: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None,
                  web_app_firewall_policy_id: Optional[pulumi.Input[str]] = None,
                  opts: Optional[InvokeOptions] = None) -> Output[GetFirewallsResult]func GetFirewalls(ctx *Context, args *GetFirewallsArgs, opts ...InvokeOption) (*GetFirewallsResult, error)
func GetFirewallsOutput(ctx *Context, args *GetFirewallsOutputArgs, opts ...InvokeOption) GetFirewallsResultOutput> Note: This function is named GetFirewalls in the Go SDK.
public static class GetFirewalls 
{
    public static Task<GetFirewallsResult> InvokeAsync(GetFirewallsArgs args, InvokeOptions? opts = null)
    public static Output<GetFirewallsResult> Invoke(GetFirewallsInvokeArgs args, InvokeOptions? opts = null)
}public static CompletableFuture<GetFirewallsResult> getFirewalls(GetFirewallsArgs args, InvokeOptions options)
public static Output<GetFirewallsResult> getFirewalls(GetFirewallsArgs args, InvokeOptions options)
fn::invoke:
  function: oci:Waf/getFirewalls:getFirewalls
  arguments:
    # arguments dictionaryThe following arguments are supported:
- CompartmentId string
- The OCID of the compartment in which to list resources.
- DisplayName string
- A filter to return only resources that match the entire display name given.
- Filters
List<GetFirewalls Filter> 
- Id string
- A filter to return only the WebAppFirewall with the given OCID.
- States List<string>
- A filter to return only resources that match the given lifecycleState.
- WebApp stringFirewall Policy Id 
- A filter to return only the WebAppFirewall with the given OCID of related WebAppFirewallPolicy.
- CompartmentId string
- The OCID of the compartment in which to list resources.
- DisplayName string
- A filter to return only resources that match the entire display name given.
- Filters
[]GetFirewalls Filter 
- Id string
- A filter to return only the WebAppFirewall with the given OCID.
- States []string
- A filter to return only resources that match the given lifecycleState.
- WebApp stringFirewall Policy Id 
- A filter to return only the WebAppFirewall with the given OCID of related WebAppFirewallPolicy.
- compartmentId String
- The OCID of the compartment in which to list resources.
- displayName String
- A filter to return only resources that match the entire display name given.
- filters
List<GetFirewalls Filter> 
- id String
- A filter to return only the WebAppFirewall with the given OCID.
- states List<String>
- A filter to return only resources that match the given lifecycleState.
- webApp StringFirewall Policy Id 
- A filter to return only the WebAppFirewall with the given OCID of related WebAppFirewallPolicy.
- compartmentId string
- The OCID of the compartment in which to list resources.
- displayName string
- A filter to return only resources that match the entire display name given.
- filters
GetFirewalls Filter[] 
- id string
- A filter to return only the WebAppFirewall with the given OCID.
- states string[]
- A filter to return only resources that match the given lifecycleState.
- webApp stringFirewall Policy Id 
- A filter to return only the WebAppFirewall with the given OCID of related WebAppFirewallPolicy.
- compartment_id str
- The OCID of the compartment in which to list resources.
- display_name str
- A filter to return only resources that match the entire display name given.
- filters
Sequence[GetFirewalls Filter] 
- id str
- A filter to return only the WebAppFirewall with the given OCID.
- states Sequence[str]
- A filter to return only resources that match the given lifecycleState.
- web_app_ strfirewall_ policy_ id 
- A filter to return only the WebAppFirewall with the given OCID of related WebAppFirewallPolicy.
- compartmentId String
- The OCID of the compartment in which to list resources.
- displayName String
- A filter to return only resources that match the entire display name given.
- filters List<Property Map>
- id String
- A filter to return only the WebAppFirewall with the given OCID.
- states List<String>
- A filter to return only resources that match the given lifecycleState.
- webApp StringFirewall Policy Id 
- A filter to return only the WebAppFirewall with the given OCID of related WebAppFirewallPolicy.
getFirewalls Result
The following output properties are available:
- CompartmentId string
- The OCID of the compartment.
- WebApp List<GetFirewall Collections Firewalls Web App Firewall Collection> 
- The list of web_app_firewall_collection.
- DisplayName string
- WebAppFirewall display name, can be renamed.
- Filters
List<GetFirewalls Filter> 
- Id string
- The OCID of the WebAppFirewall.
- States List<string>
- The current state of the WebAppFirewall.
- WebApp stringFirewall Policy Id 
- The OCID of WebAppFirewallPolicy, which is attached to the resource.
- CompartmentId string
- The OCID of the compartment.
- WebApp []GetFirewall Collections Firewalls Web App Firewall Collection 
- The list of web_app_firewall_collection.
- DisplayName string
- WebAppFirewall display name, can be renamed.
- Filters
[]GetFirewalls Filter 
- Id string
- The OCID of the WebAppFirewall.
- States []string
- The current state of the WebAppFirewall.
- WebApp stringFirewall Policy Id 
- The OCID of WebAppFirewallPolicy, which is attached to the resource.
- compartmentId String
- The OCID of the compartment.
- webApp List<GetFirewall Collections Firewalls Web App Firewall Collection> 
- The list of web_app_firewall_collection.
- displayName String
- WebAppFirewall display name, can be renamed.
- filters
List<GetFirewalls Filter> 
- id String
- The OCID of the WebAppFirewall.
- states List<String>
- The current state of the WebAppFirewall.
- webApp StringFirewall Policy Id 
- The OCID of WebAppFirewallPolicy, which is attached to the resource.
- compartmentId string
- The OCID of the compartment.
- webApp GetFirewall Collections Firewalls Web App Firewall Collection[] 
- The list of web_app_firewall_collection.
- displayName string
- WebAppFirewall display name, can be renamed.
- filters
GetFirewalls Filter[] 
- id string
- The OCID of the WebAppFirewall.
- states string[]
- The current state of the WebAppFirewall.
- webApp stringFirewall Policy Id 
- The OCID of WebAppFirewallPolicy, which is attached to the resource.
- compartment_id str
- The OCID of the compartment.
- web_app_ Sequence[Getfirewall_ collections Firewalls Web App Firewall Collection] 
- The list of web_app_firewall_collection.
- display_name str
- WebAppFirewall display name, can be renamed.
- filters
Sequence[GetFirewalls Filter] 
- id str
- The OCID of the WebAppFirewall.
- states Sequence[str]
- The current state of the WebAppFirewall.
- web_app_ strfirewall_ policy_ id 
- The OCID of WebAppFirewallPolicy, which is attached to the resource.
- compartmentId String
- The OCID of the compartment.
- webApp List<Property Map>Firewall Collections 
- The list of web_app_firewall_collection.
- displayName String
- WebAppFirewall display name, can be renamed.
- filters List<Property Map>
- id String
- The OCID of the WebAppFirewall.
- states List<String>
- The current state of the WebAppFirewall.
- webApp StringFirewall Policy Id 
- The OCID of WebAppFirewallPolicy, which is attached to the resource.
Supporting Types
GetFirewallsFilter  
GetFirewallsWebAppFirewallCollection     
GetFirewallsWebAppFirewallCollectionItem      
- BackendType string
- Type of the WebAppFirewall, as example LOAD_BALANCER.
- CompartmentId string
- The OCID of the compartment in which to list resources.
- Dictionary<string, string>
- Defined tags for this resource. Each key is predefined and scoped to a namespace. Example: {"foo-namespace.bar-key": "value"}
- DisplayName string
- A filter to return only resources that match the entire display name given.
- Dictionary<string, string>
- Simple key-value pair that is applied without any predefined name, type or scope. Exists for cross-compatibility only. Example: {"bar-key": "value"}
- Id string
- A filter to return only the WebAppFirewall with the given OCID.
- LifecycleDetails string
- A message describing the current state in more detail. For example, can be used to provide actionable information for a resource in FAILED state.
- LoadBalancer stringId 
- LoadBalancer OCID to which the WebAppFirewallPolicy is attached to.
- State string
- A filter to return only resources that match the given lifecycleState.
- 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 the WebAppFirewall was created. An RFC3339 formatted datetime string.
- TimeUpdated string
- The time the WebAppFirewall was updated. An RFC3339 formatted datetime string.
- WebApp stringFirewall Policy Id 
- A filter to return only the WebAppFirewall with the given OCID of related WebAppFirewallPolicy.
- BackendType string
- Type of the WebAppFirewall, as example LOAD_BALANCER.
- CompartmentId string
- The OCID of the compartment in which to list resources.
- map[string]string
- Defined tags for this resource. Each key is predefined and scoped to a namespace. Example: {"foo-namespace.bar-key": "value"}
- DisplayName string
- A filter to return only resources that match the entire display name given.
- map[string]string
- Simple key-value pair that is applied without any predefined name, type or scope. Exists for cross-compatibility only. Example: {"bar-key": "value"}
- Id string
- A filter to return only the WebAppFirewall with the given OCID.
- LifecycleDetails string
- A message describing the current state in more detail. For example, can be used to provide actionable information for a resource in FAILED state.
- LoadBalancer stringId 
- LoadBalancer OCID to which the WebAppFirewallPolicy is attached to.
- State string
- A filter to return only resources that match the given lifecycleState.
- 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 the WebAppFirewall was created. An RFC3339 formatted datetime string.
- TimeUpdated string
- The time the WebAppFirewall was updated. An RFC3339 formatted datetime string.
- WebApp stringFirewall Policy Id 
- A filter to return only the WebAppFirewall with the given OCID of related WebAppFirewallPolicy.
- backendType String
- Type of the WebAppFirewall, as example LOAD_BALANCER.
- compartmentId String
- The OCID of the compartment in which to list resources.
- Map<String,String>
- Defined tags for this resource. Each key is predefined and scoped to a namespace. Example: {"foo-namespace.bar-key": "value"}
- displayName String
- A filter to return only resources that match the entire display name given.
- Map<String,String>
- Simple key-value pair that is applied without any predefined name, type or scope. Exists for cross-compatibility only. Example: {"bar-key": "value"}
- id String
- A filter to return only the WebAppFirewall with the given OCID.
- lifecycleDetails String
- A message describing the current state in more detail. For example, can be used to provide actionable information for a resource in FAILED state.
- loadBalancer StringId 
- LoadBalancer OCID to which the WebAppFirewallPolicy is attached to.
- state String
- A filter to return only resources that match the given lifecycleState.
- 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 the WebAppFirewall was created. An RFC3339 formatted datetime string.
- timeUpdated String
- The time the WebAppFirewall was updated. An RFC3339 formatted datetime string.
- webApp StringFirewall Policy Id 
- A filter to return only the WebAppFirewall with the given OCID of related WebAppFirewallPolicy.
- backendType string
- Type of the WebAppFirewall, as example LOAD_BALANCER.
- compartmentId string
- The OCID of the compartment in which to list resources.
- {[key: string]: string}
- Defined tags for this resource. Each key is predefined and scoped to a namespace. Example: {"foo-namespace.bar-key": "value"}
- displayName string
- A filter to return only resources that match the entire display name given.
- {[key: string]: string}
- Simple key-value pair that is applied without any predefined name, type or scope. Exists for cross-compatibility only. Example: {"bar-key": "value"}
- id string
- A filter to return only the WebAppFirewall with the given OCID.
- lifecycleDetails string
- A message describing the current state in more detail. For example, can be used to provide actionable information for a resource in FAILED state.
- loadBalancer stringId 
- LoadBalancer OCID to which the WebAppFirewallPolicy is attached to.
- state string
- A filter to return only resources that match the given lifecycleState.
- {[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 the WebAppFirewall was created. An RFC3339 formatted datetime string.
- timeUpdated string
- The time the WebAppFirewall was updated. An RFC3339 formatted datetime string.
- webApp stringFirewall Policy Id 
- A filter to return only the WebAppFirewall with the given OCID of related WebAppFirewallPolicy.
- backend_type str
- Type of the WebAppFirewall, as example LOAD_BALANCER.
- compartment_id str
- The OCID of the compartment in which to list resources.
- Mapping[str, str]
- Defined tags for this resource. Each key is predefined and scoped to a namespace. Example: {"foo-namespace.bar-key": "value"}
- display_name str
- A filter to return only resources that match the entire display name given.
- Mapping[str, str]
- Simple key-value pair that is applied without any predefined name, type or scope. Exists for cross-compatibility only. Example: {"bar-key": "value"}
- id str
- A filter to return only the WebAppFirewall with the given OCID.
- lifecycle_details str
- A message describing the current state in more detail. For example, can be used to provide actionable information for a resource in FAILED state.
- load_balancer_ strid 
- LoadBalancer OCID to which the WebAppFirewallPolicy is attached to.
- state str
- A filter to return only resources that match the given lifecycleState.
- 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 the WebAppFirewall was created. An RFC3339 formatted datetime string.
- time_updated str
- The time the WebAppFirewall was updated. An RFC3339 formatted datetime string.
- web_app_ strfirewall_ policy_ id 
- A filter to return only the WebAppFirewall with the given OCID of related WebAppFirewallPolicy.
- backendType String
- Type of the WebAppFirewall, as example LOAD_BALANCER.
- compartmentId String
- The OCID of the compartment in which to list resources.
- Map<String>
- Defined tags for this resource. Each key is predefined and scoped to a namespace. Example: {"foo-namespace.bar-key": "value"}
- displayName String
- A filter to return only resources that match the entire display name given.
- Map<String>
- Simple key-value pair that is applied without any predefined name, type or scope. Exists for cross-compatibility only. Example: {"bar-key": "value"}
- id String
- A filter to return only the WebAppFirewall with the given OCID.
- lifecycleDetails String
- A message describing the current state in more detail. For example, can be used to provide actionable information for a resource in FAILED state.
- loadBalancer StringId 
- LoadBalancer OCID to which the WebAppFirewallPolicy is attached to.
- state String
- A filter to return only resources that match the given lifecycleState.
- 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 the WebAppFirewall was created. An RFC3339 formatted datetime string.
- timeUpdated String
- The time the WebAppFirewall was updated. An RFC3339 formatted datetime string.
- webApp StringFirewall Policy Id 
- A filter to return only the WebAppFirewall with the given OCID of related WebAppFirewallPolicy.
Package Details
- Repository
- oci pulumi/pulumi-oci
- License
- Apache-2.0
- Notes
- This Pulumi package is based on the ociTerraform Provider.
