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",
});
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")
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
})
}
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",
});
});
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());
}
}
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
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 string
- The unique name of the resource.
- args CisWafPackageArgs
- 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 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 string
- The unique name of the resource.
- args CisWafPackageArgs
- The arguments to resource properties.
- opts ResourceOption
- Bag of options to control resource's behavior.
- name string
- The unique name of the resource.
- args CisWafPackageArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- name String
- The unique name of the resource.
- args 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",
});
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"),
})
var cisWafPackageResource = new CisWafPackage("cisWafPackageResource", CisWafPackageArgs.builder()
.actionMode("string")
.cisId("string")
.domainId("string")
.packageId("string")
.sensitivity("string")
.cisWafPackageId("string")
.build());
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")
const cisWafPackageResource = new ibm.CisWafPackage("cisWafPackageResource", {
actionMode: "string",
cisId: "string",
domainId: "string",
packageId: "string",
sensitivity: "string",
cisWafPackageId: "string",
});
type: ibm:CisWafPackage
properties:
actionMode: string
cisId: string
cisWafPackageId: string
domainId: string
packageId: string
sensitivity: string
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:
- Action
Mode string - The WAF package action mode. Valid values are
simulate
,block
,challenge
. - Cis
Id string - The ID of the IBM Cloud Internet Services instance.
- Domain
Id string - The ID of the domain where you want to change TLS settings.
- Package
Id string - The WAF package ID. This cannot be modified.
- Sensitivity string
- The WAF package sensitivity. Valid values are
high
,medium
,low
,off
. - Cis
Waf stringPackage Id - (String) The WAF package ID. It is a combination of
<package_id>:<domain_id>:<cis_id>
attributes concatenated with:
.
- Action
Mode string - The WAF package action mode. Valid values are
simulate
,block
,challenge
. - Cis
Id string - The ID of the IBM Cloud Internet Services instance.
- Domain
Id string - The ID of the domain where you want to change TLS settings.
- Package
Id string - The WAF package ID. This cannot be modified.
- Sensitivity string
- The WAF package sensitivity. Valid values are
high
,medium
,low
,off
. - Cis
Waf stringPackage Id - (String) The WAF package ID. It is a combination of
<package_id>:<domain_id>:<cis_id>
attributes concatenated with:
.
- action
Mode String - The WAF package action mode. Valid values are
simulate
,block
,challenge
. - cis
Id String - The ID of the IBM Cloud Internet Services instance.
- domain
Id String - The ID of the domain where you want to change TLS settings.
- package
Id String - The WAF package ID. This cannot be modified.
- sensitivity String
- The WAF package sensitivity. Valid values are
high
,medium
,low
,off
. - cis
Waf StringPackage Id - (String) The WAF package ID. It is a combination of
<package_id>:<domain_id>:<cis_id>
attributes concatenated with:
.
- action
Mode string - The WAF package action mode. Valid values are
simulate
,block
,challenge
. - cis
Id string - The ID of the IBM Cloud Internet Services instance.
- domain
Id string - The ID of the domain where you want to change TLS settings.
- package
Id string - The WAF package ID. This cannot be modified.
- sensitivity string
- The WAF package sensitivity. Valid values are
high
,medium
,low
,off
. - cis
Waf stringPackage Id - (String) The WAF package ID. It is a combination of
<package_id>:<domain_id>:<cis_id>
attributes concatenated with:
.
- 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.
- domain_
id str - The ID of the domain where you want to change TLS settings.
- package_
id str - The WAF package ID. This cannot be modified.
- sensitivity str
- The WAF package sensitivity. Valid values are
high
,medium
,low
,off
. - cis_
waf_ strpackage_ id - (String) The WAF package ID. It is a combination of
<package_id>:<domain_id>:<cis_id>
attributes concatenated with:
.
- action
Mode String - The WAF package action mode. Valid values are
simulate
,block
,challenge
. - cis
Id String - The ID of the IBM Cloud Internet Services instance.
- domain
Id String - The ID of the domain where you want to change TLS settings.
- package
Id String - The WAF package ID. This cannot be modified.
- sensitivity String
- The WAF package sensitivity. Valid values are
high
,medium
,low
,off
. - cis
Waf StringPackage Id - (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.
- Detection
Mode 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.
- Detection
Mode 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.
- detection
Mode 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.
- detection
Mode 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.
- detection
Mode 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
- 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.
- Action
Mode string - The WAF package action mode. Valid values are
simulate
,block
,challenge
. - Cis
Id string - The ID of the IBM Cloud Internet Services instance.
- Cis
Waf stringPackage Id - (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.
- Detection
Mode string - Thw WAF package detection mode.
- Domain
Id string - The ID of the domain where you want to change TLS settings.
- Name string
- WAF pakcage name
- Package
Id string - The WAF package ID. This cannot be modified.
- Sensitivity string
- The WAF package sensitivity. Valid values are
high
,medium
,low
,off
.
- Action
Mode string - The WAF package action mode. Valid values are
simulate
,block
,challenge
. - Cis
Id string - The ID of the IBM Cloud Internet Services instance.
- Cis
Waf stringPackage Id - (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.
- Detection
Mode string - Thw WAF package detection mode.
- Domain
Id string - The ID of the domain where you want to change TLS settings.
- Name string
- WAF pakcage name
- Package
Id string - The WAF package ID. This cannot be modified.
- Sensitivity string
- The WAF package sensitivity. Valid values are
high
,medium
,low
,off
.
- action
Mode String - The WAF package action mode. Valid values are
simulate
,block
,challenge
. - cis
Id String - The ID of the IBM Cloud Internet Services instance.
- cis
Waf StringPackage Id - (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.
- detection
Mode String - Thw WAF package detection mode.
- domain
Id String - The ID of the domain where you want to change TLS settings.
- name String
- WAF pakcage name
- package
Id String - The WAF package ID. This cannot be modified.
- sensitivity String
- The WAF package sensitivity. Valid values are
high
,medium
,low
,off
.
- action
Mode string - The WAF package action mode. Valid values are
simulate
,block
,challenge
. - cis
Id string - The ID of the IBM Cloud Internet Services instance.
- cis
Waf stringPackage Id - (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.
- detection
Mode string - Thw WAF package detection mode.
- domain
Id string - The ID of the domain where you want to change TLS settings.
- name string
- WAF pakcage name
- package
Id 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_ strpackage_ id - (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
.
- action
Mode String - The WAF package action mode. Valid values are
simulate
,block
,challenge
. - cis
Id String - The ID of the IBM Cloud Internet Services instance.
- cis
Waf StringPackage Id - (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.
- detection
Mode String - Thw WAF package detection mode.
- domain
Id String - The ID of the domain where you want to change TLS settings.
- name String
- WAF pakcage name
- package
Id 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>
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::
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.