Oracle Cloud Infrastructure

Pulumi Official
Package maintained by Pulumi
v0.1.1 published on Tuesday, May 3, 2022 by Pulumi

AppFirewall

This resource provides the Web App Firewall resource in Oracle Cloud Infrastructure Waf service.

Creates a new WebAppFirewall.

Example Usage

using Pulumi;
using Oci = Pulumi.Oci;

class MyStack : Stack
{
    public MyStack()
    {
        var testWebAppFirewall = new Oci.Waf.AppFirewall("testWebAppFirewall", new Oci.Waf.AppFirewallArgs
        {
            BackendType = @var.Web_app_firewall_backend_type,
            CompartmentId = @var.Compartment_id,
            LoadBalancerId = oci_load_balancer_load_balancer.Test_load_balancer.Id,
            WebAppFirewallPolicyId = oci_waf_web_app_firewall_policy.Test_web_app_firewall_policy.Id,
            DefinedTags = 
            {
                { "foo-namespace.bar-key", "value" },
            },
            DisplayName = @var.Web_app_firewall_display_name,
            FreeformTags = 
            {
                { "bar-key", "value" },
            },
            SystemTags = @var.Web_app_firewall_system_tags,
        });
    }

}
package main

import (
	"github.com/pulumi/pulumi-oci/sdk/go/oci/Waf"
	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)

func main() {
	pulumi.Run(func(ctx *pulumi.Context) error {
		_, err := Waf.NewAppFirewall(ctx, "testWebAppFirewall", &Waf.AppFirewallArgs{
			BackendType:            pulumi.Any(_var.Web_app_firewall_backend_type),
			CompartmentId:          pulumi.Any(_var.Compartment_id),
			LoadBalancerId:         pulumi.Any(oci_load_balancer_load_balancer.Test_load_balancer.Id),
			WebAppFirewallPolicyId: pulumi.Any(oci_waf_web_app_firewall_policy.Test_web_app_firewall_policy.Id),
			DefinedTags: pulumi.AnyMap{
				"foo-namespace.bar-key": pulumi.Any("value"),
			},
			DisplayName: pulumi.Any(_var.Web_app_firewall_display_name),
			FreeformTags: pulumi.AnyMap{
				"bar-key": pulumi.Any("value"),
			},
			SystemTags: pulumi.Any(_var.Web_app_firewall_system_tags),
		})
		if err != nil {
			return err
		}
		return nil
	})
}

Coming soon!

import pulumi
import pulumi_oci as oci

test_web_app_firewall = oci.waf.AppFirewall("testWebAppFirewall",
    backend_type=var["web_app_firewall_backend_type"],
    compartment_id=var["compartment_id"],
    load_balancer_id=oci_load_balancer_load_balancer["test_load_balancer"]["id"],
    web_app_firewall_policy_id=oci_waf_web_app_firewall_policy["test_web_app_firewall_policy"]["id"],
    defined_tags={
        "foo-namespace.bar-key": "value",
    },
    display_name=var["web_app_firewall_display_name"],
    freeform_tags={
        "bar-key": "value",
    },
    system_tags=var["web_app_firewall_system_tags"])
import * as pulumi from "@pulumi/pulumi";
import * as oci from "@pulumi/oci";

const testWebAppFirewall = new oci.waf.AppFirewall("testWebAppFirewall", {
    backendType: _var.web_app_firewall_backend_type,
    compartmentId: _var.compartment_id,
    loadBalancerId: oci_load_balancer_load_balancer.test_load_balancer.id,
    webAppFirewallPolicyId: oci_waf_web_app_firewall_policy.test_web_app_firewall_policy.id,
    definedTags: {
        "foo-namespace.bar-key": "value",
    },
    displayName: _var.web_app_firewall_display_name,
    freeformTags: {
        "bar-key": "value",
    },
    systemTags: _var.web_app_firewall_system_tags,
});

Coming soon!

Create a AppFirewall Resource

new AppFirewall(name: string, args: AppFirewallArgs, opts?: CustomResourceOptions);
@overload
def AppFirewall(resource_name: str,
                opts: Optional[ResourceOptions] = None,
                backend_type: Optional[str] = None,
                compartment_id: Optional[str] = None,
                defined_tags: Optional[Mapping[str, Any]] = None,
                display_name: Optional[str] = None,
                freeform_tags: Optional[Mapping[str, Any]] = None,
                load_balancer_id: Optional[str] = None,
                system_tags: Optional[Mapping[str, Any]] = None,
                web_app_firewall_policy_id: Optional[str] = None)
@overload
def AppFirewall(resource_name: str,
                args: AppFirewallArgs,
                opts: Optional[ResourceOptions] = None)
func NewAppFirewall(ctx *Context, name string, args AppFirewallArgs, opts ...ResourceOption) (*AppFirewall, error)
public AppFirewall(string name, AppFirewallArgs args, CustomResourceOptions? opts = null)
public AppFirewall(String name, AppFirewallArgs args)
public AppFirewall(String name, AppFirewallArgs args, CustomResourceOptions options)
type: oci:Waf:AppFirewall
properties: # The arguments to resource properties.
options: # Bag of options to control resource's behavior.

name string
The unique name of the resource.
args AppFirewallArgs
The arguments to resource properties.
opts CustomResourceOptions
Bag of options to control resource's behavior.
resource_name str
The unique name of the resource.
args AppFirewallArgs
The arguments to resource properties.
opts ResourceOptions
Bag of options to control resource's behavior.
ctx Context
Context object for the current deployment.
name string
The unique name of the resource.
args AppFirewallArgs
The arguments to resource properties.
opts ResourceOption
Bag of options to control resource's behavior.
name string
The unique name of the resource.
args AppFirewallArgs
The arguments to resource properties.
opts CustomResourceOptions
Bag of options to control resource's behavior.
name String
The unique name of the resource.
args AppFirewallArgs
The arguments to resource properties.
options CustomResourceOptions
Bag of options to control resource's behavior.

AppFirewall Resource Properties

To learn more about resource properties and how to use them, see Inputs and Outputs in the Architecture and Concepts docs.

Inputs

The AppFirewall resource accepts the following input properties:

BackendType string

Type of the WebAppFirewall, as example LOAD_BALANCER.

CompartmentId string

(Updatable) The OCID of the compartment.

LoadBalancerId string

LoadBalancer OCID to which the WebAppFirewallPolicy is attached to.

WebAppFirewallPolicyId string

(Updatable) The OCID of WebAppFirewallPolicy, which is attached to the resource.

DefinedTags Dictionary<string, object>

(Updatable) Defined tags for this resource. Each key is predefined and scoped to a namespace. Example: {"foo-namespace.bar-key": "value"}

DisplayName string

(Updatable) WebAppFirewall display name, can be renamed.

FreeformTags Dictionary<string, object>

(Updatable) Simple key-value pair that is applied without any predefined name, type or scope. Exists for cross-compatibility only. Example: {"bar-key": "value"}

SystemTags Dictionary<string, object>

(Updatable) Usage of system tag keys. These predefined keys are scoped to namespaces. Example: {"orcl-cloud.free-tier-retained": "true"}

BackendType string

Type of the WebAppFirewall, as example LOAD_BALANCER.

CompartmentId string

(Updatable) The OCID of the compartment.

LoadBalancerId string

LoadBalancer OCID to which the WebAppFirewallPolicy is attached to.

WebAppFirewallPolicyId string

(Updatable) The OCID of WebAppFirewallPolicy, which is attached to the resource.

DefinedTags map[string]interface{}

(Updatable) Defined tags for this resource. Each key is predefined and scoped to a namespace. Example: {"foo-namespace.bar-key": "value"}

DisplayName string

(Updatable) WebAppFirewall display name, can be renamed.

FreeformTags map[string]interface{}

(Updatable) Simple key-value pair that is applied without any predefined name, type or scope. Exists for cross-compatibility only. Example: {"bar-key": "value"}

SystemTags map[string]interface{}

(Updatable) Usage of system tag keys. These predefined keys are scoped to namespaces. Example: {"orcl-cloud.free-tier-retained": "true"}

backendType String

Type of the WebAppFirewall, as example LOAD_BALANCER.

compartmentId String

(Updatable) The OCID of the compartment.

loadBalancerId String

LoadBalancer OCID to which the WebAppFirewallPolicy is attached to.

webAppFirewallPolicyId String

(Updatable) The OCID of WebAppFirewallPolicy, which is attached to the resource.

definedTags Map<String,Object>

(Updatable) Defined tags for this resource. Each key is predefined and scoped to a namespace. Example: {"foo-namespace.bar-key": "value"}

displayName String

(Updatable) WebAppFirewall display name, can be renamed.

freeformTags Map<String,Object>

(Updatable) Simple key-value pair that is applied without any predefined name, type or scope. Exists for cross-compatibility only. Example: {"bar-key": "value"}

systemTags Map<String,Object>

(Updatable) Usage of system tag keys. These predefined keys are scoped to namespaces. Example: {"orcl-cloud.free-tier-retained": "true"}

backendType string

Type of the WebAppFirewall, as example LOAD_BALANCER.

compartmentId string

(Updatable) The OCID of the compartment.

loadBalancerId string

LoadBalancer OCID to which the WebAppFirewallPolicy is attached to.

webAppFirewallPolicyId string

(Updatable) The OCID of WebAppFirewallPolicy, which is attached to the resource.

definedTags {[key: string]: any}

(Updatable) Defined tags for this resource. Each key is predefined and scoped to a namespace. Example: {"foo-namespace.bar-key": "value"}

displayName string

(Updatable) WebAppFirewall display name, can be renamed.

freeformTags {[key: string]: any}

(Updatable) Simple key-value pair that is applied without any predefined name, type or scope. Exists for cross-compatibility only. Example: {"bar-key": "value"}

systemTags {[key: string]: any}

(Updatable) Usage of system tag keys. These predefined keys are scoped to namespaces. Example: {"orcl-cloud.free-tier-retained": "true"}

backend_type str

Type of the WebAppFirewall, as example LOAD_BALANCER.

compartment_id str

(Updatable) The OCID of the compartment.

load_balancer_id str

LoadBalancer OCID to which the WebAppFirewallPolicy is attached to.

web_app_firewall_policy_id str

(Updatable) The OCID of WebAppFirewallPolicy, which is attached to the resource.

defined_tags Mapping[str, Any]

(Updatable) Defined tags for this resource. Each key is predefined and scoped to a namespace. Example: {"foo-namespace.bar-key": "value"}

display_name str

(Updatable) WebAppFirewall display name, can be renamed.

freeform_tags Mapping[str, Any]

(Updatable) Simple key-value pair that is applied without any predefined name, type or scope. Exists for cross-compatibility only. Example: {"bar-key": "value"}

system_tags Mapping[str, Any]

(Updatable) Usage of system tag keys. These predefined keys are scoped to namespaces. Example: {"orcl-cloud.free-tier-retained": "true"}

backendType String

Type of the WebAppFirewall, as example LOAD_BALANCER.

compartmentId String

(Updatable) The OCID of the compartment.

loadBalancerId String

LoadBalancer OCID to which the WebAppFirewallPolicy is attached to.

webAppFirewallPolicyId String

(Updatable) The OCID of WebAppFirewallPolicy, which is attached to the resource.

definedTags Map<Any>

(Updatable) Defined tags for this resource. Each key is predefined and scoped to a namespace. Example: {"foo-namespace.bar-key": "value"}

displayName String

(Updatable) WebAppFirewall display name, can be renamed.

freeformTags Map<Any>

(Updatable) Simple key-value pair that is applied without any predefined name, type or scope. Exists for cross-compatibility only. Example: {"bar-key": "value"}

systemTags Map<Any>

(Updatable) Usage of system tag keys. These predefined keys are scoped to namespaces. Example: {"orcl-cloud.free-tier-retained": "true"}

Outputs

All input properties are implicitly available as output properties. Additionally, the AppFirewall resource produces the following output properties:

Id string

The provider-assigned unique ID for this managed resource.

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.

State string

The current state of the WebAppFirewall.

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.

Id string

The provider-assigned unique ID for this managed resource.

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.

State string

The current state of the WebAppFirewall.

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.

id String

The provider-assigned unique ID for this managed resource.

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.

state String

The current state of the WebAppFirewall.

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.

id string

The provider-assigned unique ID for this managed resource.

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.

state string

The current state of the WebAppFirewall.

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.

id str

The provider-assigned unique ID for this managed resource.

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.

state str

The current state of the WebAppFirewall.

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.

id String

The provider-assigned unique ID for this managed resource.

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.

state String

The current state of the WebAppFirewall.

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.

Look up an Existing AppFirewall Resource

Get an existing AppFirewall resource’s state with the given name, ID, and optional extra properties used to qualify the lookup.

public static get(name: string, id: Input<ID>, state?: AppFirewallState, opts?: CustomResourceOptions): AppFirewall
@staticmethod
def get(resource_name: str,
        id: str,
        opts: Optional[ResourceOptions] = None,
        backend_type: Optional[str] = None,
        compartment_id: Optional[str] = None,
        defined_tags: Optional[Mapping[str, Any]] = None,
        display_name: Optional[str] = None,
        freeform_tags: Optional[Mapping[str, Any]] = None,
        lifecycle_details: Optional[str] = None,
        load_balancer_id: Optional[str] = None,
        state: Optional[str] = None,
        system_tags: Optional[Mapping[str, Any]] = None,
        time_created: Optional[str] = None,
        time_updated: Optional[str] = None,
        web_app_firewall_policy_id: Optional[str] = None) -> AppFirewall
func GetAppFirewall(ctx *Context, name string, id IDInput, state *AppFirewallState, opts ...ResourceOption) (*AppFirewall, error)
public static AppFirewall Get(string name, Input<string> id, AppFirewallState? state, CustomResourceOptions? opts = null)
public static AppFirewall get(String name, Output<String> id, AppFirewallState state, CustomResourceOptions options)
Resource lookup is not supported in YAML
name
The unique name of the resulting resource.
id
The unique provider ID of the resource to lookup.
state
Any extra arguments used during the lookup.
opts
A bag of options that control this resource's behavior.
resource_name
The unique name of the resulting resource.
id
The unique provider ID of the resource to lookup.
name
The unique name of the resulting resource.
id
The unique provider ID of the resource to lookup.
state
Any extra arguments used during the lookup.
opts
A bag of options that control this resource's behavior.
name
The unique name of the resulting resource.
id
The unique provider ID of the resource to lookup.
state
Any extra arguments used during the lookup.
opts
A bag of options that control this resource's behavior.
name
The unique name of the resulting resource.
id
The unique provider ID of the resource to lookup.
state
Any extra arguments used during the lookup.
opts
A bag of options that control this resource's behavior.
The following state arguments are supported:
BackendType string

Type of the WebAppFirewall, as example LOAD_BALANCER.

CompartmentId string

(Updatable) The OCID of the compartment.

DefinedTags Dictionary<string, object>

(Updatable) Defined tags for this resource. Each key is predefined and scoped to a namespace. Example: {"foo-namespace.bar-key": "value"}

DisplayName string

(Updatable) WebAppFirewall display name, can be renamed.

FreeformTags Dictionary<string, object>

(Updatable) Simple key-value pair that is applied without any predefined name, type or scope. Exists for cross-compatibility only. Example: {"bar-key": "value"}

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.

LoadBalancerId string

LoadBalancer OCID to which the WebAppFirewallPolicy is attached to.

State string

The current state of the WebAppFirewall.

SystemTags Dictionary<string, object>

(Updatable) 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.

WebAppFirewallPolicyId string

(Updatable) The OCID of WebAppFirewallPolicy, which is attached to the resource.

BackendType string

Type of the WebAppFirewall, as example LOAD_BALANCER.

CompartmentId string

(Updatable) The OCID of the compartment.

DefinedTags map[string]interface{}

(Updatable) Defined tags for this resource. Each key is predefined and scoped to a namespace. Example: {"foo-namespace.bar-key": "value"}

DisplayName string

(Updatable) WebAppFirewall display name, can be renamed.

FreeformTags map[string]interface{}

(Updatable) Simple key-value pair that is applied without any predefined name, type or scope. Exists for cross-compatibility only. Example: {"bar-key": "value"}

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.

LoadBalancerId string

LoadBalancer OCID to which the WebAppFirewallPolicy is attached to.

State string

The current state of the WebAppFirewall.

SystemTags map[string]interface{}

(Updatable) 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.

WebAppFirewallPolicyId string

(Updatable) The OCID of WebAppFirewallPolicy, which is attached to the resource.

backendType String

Type of the WebAppFirewall, as example LOAD_BALANCER.

compartmentId String

(Updatable) The OCID of the compartment.

definedTags Map<String,Object>

(Updatable) Defined tags for this resource. Each key is predefined and scoped to a namespace. Example: {"foo-namespace.bar-key": "value"}

displayName String

(Updatable) WebAppFirewall display name, can be renamed.

freeformTags Map<String,Object>

(Updatable) Simple key-value pair that is applied without any predefined name, type or scope. Exists for cross-compatibility only. Example: {"bar-key": "value"}

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.

loadBalancerId String

LoadBalancer OCID to which the WebAppFirewallPolicy is attached to.

state String

The current state of the WebAppFirewall.

systemTags Map<String,Object>

(Updatable) 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.

webAppFirewallPolicyId String

(Updatable) The OCID of WebAppFirewallPolicy, which is attached to the resource.

backendType string

Type of the WebAppFirewall, as example LOAD_BALANCER.

compartmentId string

(Updatable) The OCID of the compartment.

definedTags {[key: string]: any}

(Updatable) Defined tags for this resource. Each key is predefined and scoped to a namespace. Example: {"foo-namespace.bar-key": "value"}

displayName string

(Updatable) WebAppFirewall display name, can be renamed.

freeformTags {[key: string]: any}

(Updatable) Simple key-value pair that is applied without any predefined name, type or scope. Exists for cross-compatibility only. Example: {"bar-key": "value"}

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.

loadBalancerId string

LoadBalancer OCID to which the WebAppFirewallPolicy is attached to.

state string

The current state of the WebAppFirewall.

systemTags {[key: string]: any}

(Updatable) 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.

webAppFirewallPolicyId string

(Updatable) The OCID of WebAppFirewallPolicy, which is attached to the resource.

backend_type str

Type of the WebAppFirewall, as example LOAD_BALANCER.

compartment_id str

(Updatable) The OCID of the compartment.

defined_tags Mapping[str, Any]

(Updatable) Defined tags for this resource. Each key is predefined and scoped to a namespace. Example: {"foo-namespace.bar-key": "value"}

display_name str

(Updatable) WebAppFirewall display name, can be renamed.

freeform_tags Mapping[str, Any]

(Updatable) Simple key-value pair that is applied without any predefined name, type or scope. Exists for cross-compatibility only. Example: {"bar-key": "value"}

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_id str

LoadBalancer OCID to which the WebAppFirewallPolicy is attached to.

state str

The current state of the WebAppFirewall.

system_tags Mapping[str, Any]

(Updatable) 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_firewall_policy_id str

(Updatable) The OCID of WebAppFirewallPolicy, which is attached to the resource.

backendType String

Type of the WebAppFirewall, as example LOAD_BALANCER.

compartmentId String

(Updatable) The OCID of the compartment.

definedTags Map<Any>

(Updatable) Defined tags for this resource. Each key is predefined and scoped to a namespace. Example: {"foo-namespace.bar-key": "value"}

displayName String

(Updatable) WebAppFirewall display name, can be renamed.

freeformTags Map<Any>

(Updatable) Simple key-value pair that is applied without any predefined name, type or scope. Exists for cross-compatibility only. Example: {"bar-key": "value"}

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.

loadBalancerId String

LoadBalancer OCID to which the WebAppFirewallPolicy is attached to.

state String

The current state of the WebAppFirewall.

systemTags Map<Any>

(Updatable) 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.

webAppFirewallPolicyId String

(Updatable) The OCID of WebAppFirewallPolicy, which is attached to the resource.

Import

WebAppFirewalls can be imported using the id, e.g.

 $ pulumi import oci:Waf/appFirewall:AppFirewall test_web_app_firewall "id"

Package Details

Repository
https://github.com/pulumi/pulumi-oci
License
Apache-2.0
Notes

This Pulumi package is based on the oci Terraform Provider.