1. Packages
  2. Ibm Provider
  3. API Docs
  4. CisWafPackage
ibm 1.77.1 published on Monday, Apr 14, 2025 by ibm-cloud

ibm.CisWafPackage

Explore with Pulumi AI

Provides an IBM Cloud Internet Services WAF package resource. This resource is associated with an IBM Cloud Internet Services instance and a CIS domain resource. It allows to change WAF package settings of a domain of an IBM Cloud Internet Services instance. It is also named as OWASP rule set. For more information, about WAF, see Web Application Firewall concepts.

Example Usage

The following example shows how you can add a WAF package resource to an IBM Cloud Internet Services domain.

import * as pulumi from "@pulumi/pulumi";
import * as ibm from "@pulumi/ibm";

// Change WAF Package settings of the domain
const wafPackage = new ibm.CisWafPackage("wafPackage", {
    cisId: data.ibm_cis.cis.id,
    domainId: data.ibm_cis_domain.cis_domain.domain_id,
    packageId: "c504870194831cd12c3fc0284f294abb",
    sensitivity: "low",
    actionMode: "block",
});
Copy
import pulumi
import pulumi_ibm as ibm

# Change WAF Package settings of the domain
waf_package = ibm.CisWafPackage("wafPackage",
    cis_id=data["ibm_cis"]["cis"]["id"],
    domain_id=data["ibm_cis_domain"]["cis_domain"]["domain_id"],
    package_id="c504870194831cd12c3fc0284f294abb",
    sensitivity="low",
    action_mode="block")
Copy
package main

import (
	"github.com/pulumi/pulumi-terraform-provider/sdks/go/ibm/ibm"
	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)

func main() {
	pulumi.Run(func(ctx *pulumi.Context) error {
		// Change WAF Package settings of the domain
		_, err := ibm.NewCisWafPackage(ctx, "wafPackage", &ibm.CisWafPackageArgs{
			CisId:       pulumi.Any(data.Ibm_cis.Cis.Id),
			DomainId:    pulumi.Any(data.Ibm_cis_domain.Cis_domain.Domain_id),
			PackageId:   pulumi.String("c504870194831cd12c3fc0284f294abb"),
			Sensitivity: pulumi.String("low"),
			ActionMode:  pulumi.String("block"),
		})
		if err != nil {
			return err
		}
		return nil
	})
}
Copy
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Ibm = Pulumi.Ibm;

return await Deployment.RunAsync(() => 
{
    // Change WAF Package settings of the domain
    var wafPackage = new Ibm.CisWafPackage("wafPackage", new()
    {
        CisId = data.Ibm_cis.Cis.Id,
        DomainId = data.Ibm_cis_domain.Cis_domain.Domain_id,
        PackageId = "c504870194831cd12c3fc0284f294abb",
        Sensitivity = "low",
        ActionMode = "block",
    });

});
Copy
package generated_program;

import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.ibm.CisWafPackage;
import com.pulumi.ibm.CisWafPackageArgs;
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) {
        // Change WAF Package settings of the domain
        var wafPackage = new CisWafPackage("wafPackage", CisWafPackageArgs.builder()
            .cisId(data.ibm_cis().cis().id())
            .domainId(data.ibm_cis_domain().cis_domain().domain_id())
            .packageId("c504870194831cd12c3fc0284f294abb")
            .sensitivity("low")
            .actionMode("block")
            .build());

    }
}
Copy
resources:
  # Change WAF Package settings of the domain
  wafPackage:
    type: ibm:CisWafPackage
    properties:
      cisId: ${data.ibm_cis.cis.id}
      domainId: ${data.ibm_cis_domain.cis_domain.domain_id}
      packageId: c504870194831cd12c3fc0284f294abb
      sensitivity: low
      actionMode: block
Copy

Create CisWafPackage Resource

Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.

Constructor syntax

new CisWafPackage(name: string, args: CisWafPackageArgs, opts?: CustomResourceOptions);
@overload
def CisWafPackage(resource_name: str,
                  args: CisWafPackageArgs,
                  opts: Optional[ResourceOptions] = None)

@overload
def CisWafPackage(resource_name: str,
                  opts: Optional[ResourceOptions] = None,
                  action_mode: Optional[str] = None,
                  cis_id: Optional[str] = None,
                  domain_id: Optional[str] = None,
                  package_id: Optional[str] = None,
                  sensitivity: Optional[str] = None,
                  cis_waf_package_id: Optional[str] = None)
func NewCisWafPackage(ctx *Context, name string, args CisWafPackageArgs, opts ...ResourceOption) (*CisWafPackage, error)
public CisWafPackage(string name, CisWafPackageArgs args, CustomResourceOptions? opts = null)
public CisWafPackage(String name, CisWafPackageArgs args)
public CisWafPackage(String name, CisWafPackageArgs args, CustomResourceOptions options)
type: ibm:CisWafPackage
properties: # The arguments to resource properties.
options: # Bag of options to control resource's behavior.

Parameters

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

Constructor example

The following reference example uses placeholder values for all input properties.

var cisWafPackageResource = new Ibm.CisWafPackage("cisWafPackageResource", new()
{
    ActionMode = "string",
    CisId = "string",
    DomainId = "string",
    PackageId = "string",
    Sensitivity = "string",
    CisWafPackageId = "string",
});
Copy
example, err := ibm.NewCisWafPackage(ctx, "cisWafPackageResource", &ibm.CisWafPackageArgs{
	ActionMode:      pulumi.String("string"),
	CisId:           pulumi.String("string"),
	DomainId:        pulumi.String("string"),
	PackageId:       pulumi.String("string"),
	Sensitivity:     pulumi.String("string"),
	CisWafPackageId: pulumi.String("string"),
})
Copy
var cisWafPackageResource = new CisWafPackage("cisWafPackageResource", CisWafPackageArgs.builder()
    .actionMode("string")
    .cisId("string")
    .domainId("string")
    .packageId("string")
    .sensitivity("string")
    .cisWafPackageId("string")
    .build());
Copy
cis_waf_package_resource = ibm.CisWafPackage("cisWafPackageResource",
    action_mode="string",
    cis_id="string",
    domain_id="string",
    package_id="string",
    sensitivity="string",
    cis_waf_package_id="string")
Copy
const cisWafPackageResource = new ibm.CisWafPackage("cisWafPackageResource", {
    actionMode: "string",
    cisId: "string",
    domainId: "string",
    packageId: "string",
    sensitivity: "string",
    cisWafPackageId: "string",
});
Copy
type: ibm:CisWafPackage
properties:
    actionMode: string
    cisId: string
    cisWafPackageId: string
    domainId: string
    packageId: string
    sensitivity: string
Copy

CisWafPackage Resource Properties

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

Inputs

In Python, inputs that are objects can be passed either as argument classes or as dictionary literals.

The CisWafPackage resource accepts the following input properties:

ActionMode This property is required. string
The WAF package action mode. Valid values are simulate, block, challenge.
CisId This property is required. string
The ID of the IBM Cloud Internet Services instance.
DomainId This property is required. string
The ID of the domain where you want to change TLS settings.
PackageId This property is required. string
The WAF package ID. This cannot be modified.
Sensitivity This property is required. string
The WAF package sensitivity. Valid values are high, medium, low, off.
CisWafPackageId string
(String) The WAF package ID. It is a combination of <package_id>:<domain_id>:<cis_id> attributes concatenated with :.
ActionMode This property is required. string
The WAF package action mode. Valid values are simulate, block, challenge.
CisId This property is required. string
The ID of the IBM Cloud Internet Services instance.
DomainId This property is required. string
The ID of the domain where you want to change TLS settings.
PackageId This property is required. string
The WAF package ID. This cannot be modified.
Sensitivity This property is required. string
The WAF package sensitivity. Valid values are high, medium, low, off.
CisWafPackageId string
(String) The WAF package ID. It is a combination of <package_id>:<domain_id>:<cis_id> attributes concatenated with :.
actionMode This property is required. String
The WAF package action mode. Valid values are simulate, block, challenge.
cisId This property is required. String
The ID of the IBM Cloud Internet Services instance.
domainId This property is required. String
The ID of the domain where you want to change TLS settings.
packageId This property is required. String
The WAF package ID. This cannot be modified.
sensitivity This property is required. String
The WAF package sensitivity. Valid values are high, medium, low, off.
cisWafPackageId String
(String) The WAF package ID. It is a combination of <package_id>:<domain_id>:<cis_id> attributes concatenated with :.
actionMode This property is required. string
The WAF package action mode. Valid values are simulate, block, challenge.
cisId This property is required. string
The ID of the IBM Cloud Internet Services instance.
domainId This property is required. string
The ID of the domain where you want to change TLS settings.
packageId This property is required. string
The WAF package ID. This cannot be modified.
sensitivity This property is required. string
The WAF package sensitivity. Valid values are high, medium, low, off.
cisWafPackageId string
(String) The WAF package ID. It is a combination of <package_id>:<domain_id>:<cis_id> attributes concatenated with :.
action_mode This property is required. str
The WAF package action mode. Valid values are simulate, block, challenge.
cis_id This property is required. str
The ID of the IBM Cloud Internet Services instance.
domain_id This property is required. str
The ID of the domain where you want to change TLS settings.
package_id This property is required. str
The WAF package ID. This cannot be modified.
sensitivity This property is required. str
The WAF package sensitivity. Valid values are high, medium, low, off.
cis_waf_package_id str
(String) The WAF package ID. It is a combination of <package_id>:<domain_id>:<cis_id> attributes concatenated with :.
actionMode This property is required. String
The WAF package action mode. Valid values are simulate, block, challenge.
cisId This property is required. String
The ID of the IBM Cloud Internet Services instance.
domainId This property is required. String
The ID of the domain where you want to change TLS settings.
packageId This property is required. String
The WAF package ID. This cannot be modified.
sensitivity This property is required. String
The WAF package sensitivity. Valid values are high, medium, low, off.
cisWafPackageId String
(String) The WAF package ID. It is a combination of <package_id>:<domain_id>:<cis_id> attributes concatenated with :.

Outputs

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

Description string
The WAF package description.
DetectionMode string
Thw WAF package detection mode.
Id string
The provider-assigned unique ID for this managed resource.
Name string
WAF pakcage name
Description string
The WAF package description.
DetectionMode string
Thw WAF package detection mode.
Id string
The provider-assigned unique ID for this managed resource.
Name string
WAF pakcage name
description String
The WAF package description.
detectionMode String
Thw WAF package detection mode.
id String
The provider-assigned unique ID for this managed resource.
name String
WAF pakcage name
description string
The WAF package description.
detectionMode string
Thw WAF package detection mode.
id string
The provider-assigned unique ID for this managed resource.
name string
WAF pakcage name
description str
The WAF package description.
detection_mode str
Thw WAF package detection mode.
id str
The provider-assigned unique ID for this managed resource.
name str
WAF pakcage name
description String
The WAF package description.
detectionMode String
Thw WAF package detection mode.
id String
The provider-assigned unique ID for this managed resource.
name String
WAF pakcage name

Look up Existing CisWafPackage Resource

Get an existing CisWafPackage 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?: CisWafPackageState, opts?: CustomResourceOptions): CisWafPackage
@staticmethod
def get(resource_name: str,
        id: str,
        opts: Optional[ResourceOptions] = None,
        action_mode: Optional[str] = None,
        cis_id: Optional[str] = None,
        cis_waf_package_id: Optional[str] = None,
        description: Optional[str] = None,
        detection_mode: Optional[str] = None,
        domain_id: Optional[str] = None,
        name: Optional[str] = None,
        package_id: Optional[str] = None,
        sensitivity: Optional[str] = None) -> CisWafPackage
func GetCisWafPackage(ctx *Context, name string, id IDInput, state *CisWafPackageState, opts ...ResourceOption) (*CisWafPackage, error)
public static CisWafPackage Get(string name, Input<string> id, CisWafPackageState? state, CustomResourceOptions? opts = null)
public static CisWafPackage get(String name, Output<String> id, CisWafPackageState state, CustomResourceOptions options)
resources:  _:    type: ibm:CisWafPackage    get:      id: ${id}
name This property is required.
The unique name of the resulting resource.
id This property is required.
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 This property is required.
The unique name of the resulting resource.
id This property is required.
The unique provider ID of the resource to lookup.
name This property is required.
The unique name of the resulting resource.
id This property is required.
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 This property is required.
The unique name of the resulting resource.
id This property is required.
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 This property is required.
The unique name of the resulting resource.
id This property is required.
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:
ActionMode string
The WAF package action mode. Valid values are simulate, block, challenge.
CisId string
The ID of the IBM Cloud Internet Services instance.
CisWafPackageId string
(String) The WAF package ID. It is a combination of <package_id>:<domain_id>:<cis_id> attributes concatenated with :.
Description string
The WAF package description.
DetectionMode string
Thw WAF package detection mode.
DomainId string
The ID of the domain where you want to change TLS settings.
Name string
WAF pakcage name
PackageId string
The WAF package ID. This cannot be modified.
Sensitivity string
The WAF package sensitivity. Valid values are high, medium, low, off.
ActionMode string
The WAF package action mode. Valid values are simulate, block, challenge.
CisId string
The ID of the IBM Cloud Internet Services instance.
CisWafPackageId string
(String) The WAF package ID. It is a combination of <package_id>:<domain_id>:<cis_id> attributes concatenated with :.
Description string
The WAF package description.
DetectionMode string
Thw WAF package detection mode.
DomainId string
The ID of the domain where you want to change TLS settings.
Name string
WAF pakcage name
PackageId string
The WAF package ID. This cannot be modified.
Sensitivity string
The WAF package sensitivity. Valid values are high, medium, low, off.
actionMode String
The WAF package action mode. Valid values are simulate, block, challenge.
cisId String
The ID of the IBM Cloud Internet Services instance.
cisWafPackageId String
(String) The WAF package ID. It is a combination of <package_id>:<domain_id>:<cis_id> attributes concatenated with :.
description String
The WAF package description.
detectionMode String
Thw WAF package detection mode.
domainId String
The ID of the domain where you want to change TLS settings.
name String
WAF pakcage name
packageId String
The WAF package ID. This cannot be modified.
sensitivity String
The WAF package sensitivity. Valid values are high, medium, low, off.
actionMode string
The WAF package action mode. Valid values are simulate, block, challenge.
cisId string
The ID of the IBM Cloud Internet Services instance.
cisWafPackageId string
(String) The WAF package ID. It is a combination of <package_id>:<domain_id>:<cis_id> attributes concatenated with :.
description string
The WAF package description.
detectionMode string
Thw WAF package detection mode.
domainId string
The ID of the domain where you want to change TLS settings.
name string
WAF pakcage name
packageId string
The WAF package ID. This cannot be modified.
sensitivity string
The WAF package sensitivity. Valid values are high, medium, low, off.
action_mode str
The WAF package action mode. Valid values are simulate, block, challenge.
cis_id str
The ID of the IBM Cloud Internet Services instance.
cis_waf_package_id str
(String) The WAF package ID. It is a combination of <package_id>:<domain_id>:<cis_id> attributes concatenated with :.
description str
The WAF package description.
detection_mode str
Thw WAF package detection mode.
domain_id str
The ID of the domain where you want to change TLS settings.
name str
WAF pakcage name
package_id str
The WAF package ID. This cannot be modified.
sensitivity str
The WAF package sensitivity. Valid values are high, medium, low, off.
actionMode String
The WAF package action mode. Valid values are simulate, block, challenge.
cisId String
The ID of the IBM Cloud Internet Services instance.
cisWafPackageId String
(String) The WAF package ID. It is a combination of <package_id>:<domain_id>:<cis_id> attributes concatenated with :.
description String
The WAF package description.
detectionMode String
Thw WAF package detection mode.
domainId String
The ID of the domain where you want to change TLS settings.
name String
WAF pakcage name
packageId String
The WAF package ID. This cannot be modified.
sensitivity String
The WAF package sensitivity. Valid values are high, medium, low, off.

Import

The ibm_cis_waf_package resource can be imported by using the ID. The ID is formed from the package ID, domain ID of the domain and the Cloud Resource Name (CRN) concatenated by using a : character.

The domain ID and CRN will be located on the Overview page of the Internet Services instance of the Domain heading of the console, or by using the ibmcloud cis command line commands.

  • Domain ID is a 32 digit character string of the form: 9caf68812ae9b3f0377fdf986751a78f

  • CRN is a 120 digit character string of the form: crn:v1:bluemix:public:internet-svcs:global:a/4ea1882a2d3401ed1e459979941966ea:31fa970d-51d0-4b05-893e-251cba75a7b3::

  • WAF Package ID is a 32 digit character string of the form: 489d96f0da6ed76251b475971b097205c.

Syntax

$ pulumi import ibm:index/cisWafPackage:CisWafPackage waf_package <package-id>:<domain-id>:<crn>
Copy

Example

$ pulumi import ibm:index/cisWafPackage:CisWafPackage waf_package 489d96f0da6ed76251b475971b097205c:9caf68812ae9b3f0377fdf986751a78f:crn:v1:bluemix:public:internet-svcs:global:a/4ea1882a2d3401ed1e459979941966ea:31fa970d-51d0-4b05-893e-251cba75a7b3::
Copy

To learn more about importing existing cloud resources, see Importing resources.

Package Details

Repository
ibm ibm-cloud/terraform-provider-ibm
License
Notes
This Pulumi package is based on the ibm Terraform Provider.