1. Packages
  2. Ibm Provider
  3. API Docs
  4. CisWafGroup
ibm 1.78.0 published on Wednesday, Apr 30, 2025 by ibm-cloud

ibm.CisWafGroup

Explore with Pulumi AI

ibm logo
ibm 1.78.0 published on Wednesday, Apr 30, 2025 by ibm-cloud

    Create, update, or delete an IBM Cloud Internet Services instance and a CIS Domain resource. It allows to change WAF Groups mode of a domain of a CIS instance. It is also named as CIS rule set. Find OWASP rule set set tab in WAF of your instance console. For more information, refer to IBM Cloud Internet Services rule sets.

    Example Usage

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

    import * as pulumi from "@pulumi/pulumi";
    import * as ibm from "@pulumi/ibm";
    
    const test = new ibm.CisWafGroup("test", {
        cisId: data.ibm_cis.cis.id,
        domainId: data.ibm_cis_domain.cis_domain.domain_id,
        packageId: "c504870194831cd12c3fc0284f294abb",
        groupId: "3d8fb0c18b5a6ba7682c80e94c7937b2",
        mode: "on",
    });
    
    import pulumi
    import pulumi_ibm as ibm
    
    test = ibm.CisWafGroup("test",
        cis_id=data["ibm_cis"]["cis"]["id"],
        domain_id=data["ibm_cis_domain"]["cis_domain"]["domain_id"],
        package_id="c504870194831cd12c3fc0284f294abb",
        group_id="3d8fb0c18b5a6ba7682c80e94c7937b2",
        mode="on")
    
    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 {
    		_, err := ibm.NewCisWafGroup(ctx, "test", &ibm.CisWafGroupArgs{
    			CisId:     pulumi.Any(data.Ibm_cis.Cis.Id),
    			DomainId:  pulumi.Any(data.Ibm_cis_domain.Cis_domain.Domain_id),
    			PackageId: pulumi.String("c504870194831cd12c3fc0284f294abb"),
    			GroupId:   pulumi.String("3d8fb0c18b5a6ba7682c80e94c7937b2"),
    			Mode:      pulumi.String("on"),
    		})
    		if err != nil {
    			return err
    		}
    		return nil
    	})
    }
    
    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using Ibm = Pulumi.Ibm;
    
    return await Deployment.RunAsync(() => 
    {
        var test = new Ibm.CisWafGroup("test", new()
        {
            CisId = data.Ibm_cis.Cis.Id,
            DomainId = data.Ibm_cis_domain.Cis_domain.Domain_id,
            PackageId = "c504870194831cd12c3fc0284f294abb",
            GroupId = "3d8fb0c18b5a6ba7682c80e94c7937b2",
            Mode = "on",
        });
    
    });
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.ibm.CisWafGroup;
    import com.pulumi.ibm.CisWafGroupArgs;
    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) {
            var test = new CisWafGroup("test", CisWafGroupArgs.builder()
                .cisId(data.ibm_cis().cis().id())
                .domainId(data.ibm_cis_domain().cis_domain().domain_id())
                .packageId("c504870194831cd12c3fc0284f294abb")
                .groupId("3d8fb0c18b5a6ba7682c80e94c7937b2")
                .mode("on")
                .build());
    
        }
    }
    
    resources:
      test:
        type: ibm:CisWafGroup
        properties:
          cisId: ${data.ibm_cis.cis.id}
          domainId: ${data.ibm_cis_domain.cis_domain.domain_id}
          packageId: c504870194831cd12c3fc0284f294abb
          groupId: 3d8fb0c18b5a6ba7682c80e94c7937b2
          mode: on
    

    Create CisWafGroup Resource

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

    Constructor syntax

    new CisWafGroup(name: string, args: CisWafGroupArgs, opts?: CustomResourceOptions);
    @overload
    def CisWafGroup(resource_name: str,
                    args: CisWafGroupArgs,
                    opts: Optional[ResourceOptions] = None)
    
    @overload
    def CisWafGroup(resource_name: str,
                    opts: Optional[ResourceOptions] = None,
                    cis_id: Optional[str] = None,
                    domain_id: Optional[str] = None,
                    group_id: Optional[str] = None,
                    mode: Optional[str] = None,
                    package_id: Optional[str] = None,
                    check_mode: Optional[bool] = None,
                    cis_waf_group_id: Optional[str] = None)
    func NewCisWafGroup(ctx *Context, name string, args CisWafGroupArgs, opts ...ResourceOption) (*CisWafGroup, error)
    public CisWafGroup(string name, CisWafGroupArgs args, CustomResourceOptions? opts = null)
    public CisWafGroup(String name, CisWafGroupArgs args)
    public CisWafGroup(String name, CisWafGroupArgs args, CustomResourceOptions options)
    
    type: ibm:CisWafGroup
    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 CisWafGroupArgs
    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 CisWafGroupArgs
    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 CisWafGroupArgs
    The arguments to resource properties.
    opts ResourceOption
    Bag of options to control resource's behavior.
    name string
    The unique name of the resource.
    args CisWafGroupArgs
    The arguments to resource properties.
    opts CustomResourceOptions
    Bag of options to control resource's behavior.
    name String
    The unique name of the resource.
    args CisWafGroupArgs
    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 cisWafGroupResource = new Ibm.CisWafGroup("cisWafGroupResource", new()
    {
        CisId = "string",
        DomainId = "string",
        GroupId = "string",
        Mode = "string",
        PackageId = "string",
        CheckMode = false,
        CisWafGroupId = "string",
    });
    
    example, err := ibm.NewCisWafGroup(ctx, "cisWafGroupResource", &ibm.CisWafGroupArgs{
    	CisId:         pulumi.String("string"),
    	DomainId:      pulumi.String("string"),
    	GroupId:       pulumi.String("string"),
    	Mode:          pulumi.String("string"),
    	PackageId:     pulumi.String("string"),
    	CheckMode:     pulumi.Bool(false),
    	CisWafGroupId: pulumi.String("string"),
    })
    
    var cisWafGroupResource = new CisWafGroup("cisWafGroupResource", CisWafGroupArgs.builder()
        .cisId("string")
        .domainId("string")
        .groupId("string")
        .mode("string")
        .packageId("string")
        .checkMode(false)
        .cisWafGroupId("string")
        .build());
    
    cis_waf_group_resource = ibm.CisWafGroup("cisWafGroupResource",
        cis_id="string",
        domain_id="string",
        group_id="string",
        mode="string",
        package_id="string",
        check_mode=False,
        cis_waf_group_id="string")
    
    const cisWafGroupResource = new ibm.CisWafGroup("cisWafGroupResource", {
        cisId: "string",
        domainId: "string",
        groupId: "string",
        mode: "string",
        packageId: "string",
        checkMode: false,
        cisWafGroupId: "string",
    });
    
    type: ibm:CisWafGroup
    properties:
        checkMode: false
        cisId: string
        cisWafGroupId: string
        domainId: string
        groupId: string
        mode: string
        packageId: string
    

    CisWafGroup 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 CisWafGroup resource accepts the following input properties:

    CisId string
    The ID of the IBM Cloud Internet Services instance.
    DomainId string
    The ID of the domain to change WAF rule group mode.
    GroupId string
    The WAF rule group ID.
    Mode string
    The WAF group mode. Valid values are on and off.
    PackageId string
    The WAF rule group package ID.
    CheckMode bool
    (Boolean) If true, then updating the mode with same ON>ON or OFF>OFF value, will be skipped. By default, check_mode attribute is false, and it won't check the backend value before update.
    CisWafGroupId string
    (String) The WAF rule group ID. It is a combination of <group_id>:<package_id>:<domain-id>:<crn> attributes concatenated with :.
    CisId string
    The ID of the IBM Cloud Internet Services instance.
    DomainId string
    The ID of the domain to change WAF rule group mode.
    GroupId string
    The WAF rule group ID.
    Mode string
    The WAF group mode. Valid values are on and off.
    PackageId string
    The WAF rule group package ID.
    CheckMode bool
    (Boolean) If true, then updating the mode with same ON>ON or OFF>OFF value, will be skipped. By default, check_mode attribute is false, and it won't check the backend value before update.
    CisWafGroupId string
    (String) The WAF rule group ID. It is a combination of <group_id>:<package_id>:<domain-id>:<crn> attributes concatenated with :.
    cisId String
    The ID of the IBM Cloud Internet Services instance.
    domainId String
    The ID of the domain to change WAF rule group mode.
    groupId String
    The WAF rule group ID.
    mode String
    The WAF group mode. Valid values are on and off.
    packageId String
    The WAF rule group package ID.
    checkMode Boolean
    (Boolean) If true, then updating the mode with same ON>ON or OFF>OFF value, will be skipped. By default, check_mode attribute is false, and it won't check the backend value before update.
    cisWafGroupId String
    (String) The WAF rule group ID. It is a combination of <group_id>:<package_id>:<domain-id>:<crn> attributes concatenated with :.
    cisId string
    The ID of the IBM Cloud Internet Services instance.
    domainId string
    The ID of the domain to change WAF rule group mode.
    groupId string
    The WAF rule group ID.
    mode string
    The WAF group mode. Valid values are on and off.
    packageId string
    The WAF rule group package ID.
    checkMode boolean
    (Boolean) If true, then updating the mode with same ON>ON or OFF>OFF value, will be skipped. By default, check_mode attribute is false, and it won't check the backend value before update.
    cisWafGroupId string
    (String) The WAF rule group ID. It is a combination of <group_id>:<package_id>:<domain-id>:<crn> attributes concatenated with :.
    cis_id str
    The ID of the IBM Cloud Internet Services instance.
    domain_id str
    The ID of the domain to change WAF rule group mode.
    group_id str
    The WAF rule group ID.
    mode str
    The WAF group mode. Valid values are on and off.
    package_id str
    The WAF rule group package ID.
    check_mode bool
    (Boolean) If true, then updating the mode with same ON>ON or OFF>OFF value, will be skipped. By default, check_mode attribute is false, and it won't check the backend value before update.
    cis_waf_group_id str
    (String) The WAF rule group ID. It is a combination of <group_id>:<package_id>:<domain-id>:<crn> attributes concatenated with :.
    cisId String
    The ID of the IBM Cloud Internet Services instance.
    domainId String
    The ID of the domain to change WAF rule group mode.
    groupId String
    The WAF rule group ID.
    mode String
    The WAF group mode. Valid values are on and off.
    packageId String
    The WAF rule group package ID.
    checkMode Boolean
    (Boolean) If true, then updating the mode with same ON>ON or OFF>OFF value, will be skipped. By default, check_mode attribute is false, and it won't check the backend value before update.
    cisWafGroupId String
    (String) The WAF rule group ID. It is a combination of <group_id>:<package_id>:<domain-id>:<crn> attributes concatenated with :.

    Outputs

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

    Description string
    (String) The WAF rule group description.
    Id string
    The provider-assigned unique ID for this managed resource.
    ModifiedRulesCount double
    (Integer) Number of rules modified in WAF Group.
    Name string
    (String) The WAF rule group name.
    RulesCount double
    (Integer) Number of rules in WAF Group.
    Description string
    (String) The WAF rule group description.
    Id string
    The provider-assigned unique ID for this managed resource.
    ModifiedRulesCount float64
    (Integer) Number of rules modified in WAF Group.
    Name string
    (String) The WAF rule group name.
    RulesCount float64
    (Integer) Number of rules in WAF Group.
    description String
    (String) The WAF rule group description.
    id String
    The provider-assigned unique ID for this managed resource.
    modifiedRulesCount Double
    (Integer) Number of rules modified in WAF Group.
    name String
    (String) The WAF rule group name.
    rulesCount Double
    (Integer) Number of rules in WAF Group.
    description string
    (String) The WAF rule group description.
    id string
    The provider-assigned unique ID for this managed resource.
    modifiedRulesCount number
    (Integer) Number of rules modified in WAF Group.
    name string
    (String) The WAF rule group name.
    rulesCount number
    (Integer) Number of rules in WAF Group.
    description str
    (String) The WAF rule group description.
    id str
    The provider-assigned unique ID for this managed resource.
    modified_rules_count float
    (Integer) Number of rules modified in WAF Group.
    name str
    (String) The WAF rule group name.
    rules_count float
    (Integer) Number of rules in WAF Group.
    description String
    (String) The WAF rule group description.
    id String
    The provider-assigned unique ID for this managed resource.
    modifiedRulesCount Number
    (Integer) Number of rules modified in WAF Group.
    name String
    (String) The WAF rule group name.
    rulesCount Number
    (Integer) Number of rules in WAF Group.

    Look up Existing CisWafGroup Resource

    Get an existing CisWafGroup 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?: CisWafGroupState, opts?: CustomResourceOptions): CisWafGroup
    @staticmethod
    def get(resource_name: str,
            id: str,
            opts: Optional[ResourceOptions] = None,
            check_mode: Optional[bool] = None,
            cis_id: Optional[str] = None,
            cis_waf_group_id: Optional[str] = None,
            description: Optional[str] = None,
            domain_id: Optional[str] = None,
            group_id: Optional[str] = None,
            mode: Optional[str] = None,
            modified_rules_count: Optional[float] = None,
            name: Optional[str] = None,
            package_id: Optional[str] = None,
            rules_count: Optional[float] = None) -> CisWafGroup
    func GetCisWafGroup(ctx *Context, name string, id IDInput, state *CisWafGroupState, opts ...ResourceOption) (*CisWafGroup, error)
    public static CisWafGroup Get(string name, Input<string> id, CisWafGroupState? state, CustomResourceOptions? opts = null)
    public static CisWafGroup get(String name, Output<String> id, CisWafGroupState state, CustomResourceOptions options)
    resources:  _:    type: ibm:CisWafGroup    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.
    The following state arguments are supported:
    CheckMode bool
    (Boolean) If true, then updating the mode with same ON>ON or OFF>OFF value, will be skipped. By default, check_mode attribute is false, and it won't check the backend value before update.
    CisId string
    The ID of the IBM Cloud Internet Services instance.
    CisWafGroupId string
    (String) The WAF rule group ID. It is a combination of <group_id>:<package_id>:<domain-id>:<crn> attributes concatenated with :.
    Description string
    (String) The WAF rule group description.
    DomainId string
    The ID of the domain to change WAF rule group mode.
    GroupId string
    The WAF rule group ID.
    Mode string
    The WAF group mode. Valid values are on and off.
    ModifiedRulesCount double
    (Integer) Number of rules modified in WAF Group.
    Name string
    (String) The WAF rule group name.
    PackageId string
    The WAF rule group package ID.
    RulesCount double
    (Integer) Number of rules in WAF Group.
    CheckMode bool
    (Boolean) If true, then updating the mode with same ON>ON or OFF>OFF value, will be skipped. By default, check_mode attribute is false, and it won't check the backend value before update.
    CisId string
    The ID of the IBM Cloud Internet Services instance.
    CisWafGroupId string
    (String) The WAF rule group ID. It is a combination of <group_id>:<package_id>:<domain-id>:<crn> attributes concatenated with :.
    Description string
    (String) The WAF rule group description.
    DomainId string
    The ID of the domain to change WAF rule group mode.
    GroupId string
    The WAF rule group ID.
    Mode string
    The WAF group mode. Valid values are on and off.
    ModifiedRulesCount float64
    (Integer) Number of rules modified in WAF Group.
    Name string
    (String) The WAF rule group name.
    PackageId string
    The WAF rule group package ID.
    RulesCount float64
    (Integer) Number of rules in WAF Group.
    checkMode Boolean
    (Boolean) If true, then updating the mode with same ON>ON or OFF>OFF value, will be skipped. By default, check_mode attribute is false, and it won't check the backend value before update.
    cisId String
    The ID of the IBM Cloud Internet Services instance.
    cisWafGroupId String
    (String) The WAF rule group ID. It is a combination of <group_id>:<package_id>:<domain-id>:<crn> attributes concatenated with :.
    description String
    (String) The WAF rule group description.
    domainId String
    The ID of the domain to change WAF rule group mode.
    groupId String
    The WAF rule group ID.
    mode String
    The WAF group mode. Valid values are on and off.
    modifiedRulesCount Double
    (Integer) Number of rules modified in WAF Group.
    name String
    (String) The WAF rule group name.
    packageId String
    The WAF rule group package ID.
    rulesCount Double
    (Integer) Number of rules in WAF Group.
    checkMode boolean
    (Boolean) If true, then updating the mode with same ON>ON or OFF>OFF value, will be skipped. By default, check_mode attribute is false, and it won't check the backend value before update.
    cisId string
    The ID of the IBM Cloud Internet Services instance.
    cisWafGroupId string
    (String) The WAF rule group ID. It is a combination of <group_id>:<package_id>:<domain-id>:<crn> attributes concatenated with :.
    description string
    (String) The WAF rule group description.
    domainId string
    The ID of the domain to change WAF rule group mode.
    groupId string
    The WAF rule group ID.
    mode string
    The WAF group mode. Valid values are on and off.
    modifiedRulesCount number
    (Integer) Number of rules modified in WAF Group.
    name string
    (String) The WAF rule group name.
    packageId string
    The WAF rule group package ID.
    rulesCount number
    (Integer) Number of rules in WAF Group.
    check_mode bool
    (Boolean) If true, then updating the mode with same ON>ON or OFF>OFF value, will be skipped. By default, check_mode attribute is false, and it won't check the backend value before update.
    cis_id str
    The ID of the IBM Cloud Internet Services instance.
    cis_waf_group_id str
    (String) The WAF rule group ID. It is a combination of <group_id>:<package_id>:<domain-id>:<crn> attributes concatenated with :.
    description str
    (String) The WAF rule group description.
    domain_id str
    The ID of the domain to change WAF rule group mode.
    group_id str
    The WAF rule group ID.
    mode str
    The WAF group mode. Valid values are on and off.
    modified_rules_count float
    (Integer) Number of rules modified in WAF Group.
    name str
    (String) The WAF rule group name.
    package_id str
    The WAF rule group package ID.
    rules_count float
    (Integer) Number of rules in WAF Group.
    checkMode Boolean
    (Boolean) If true, then updating the mode with same ON>ON or OFF>OFF value, will be skipped. By default, check_mode attribute is false, and it won't check the backend value before update.
    cisId String
    The ID of the IBM Cloud Internet Services instance.
    cisWafGroupId String
    (String) The WAF rule group ID. It is a combination of <group_id>:<package_id>:<domain-id>:<crn> attributes concatenated with :.
    description String
    (String) The WAF rule group description.
    domainId String
    The ID of the domain to change WAF rule group mode.
    groupId String
    The WAF rule group ID.
    mode String
    The WAF group mode. Valid values are on and off.
    modifiedRulesCount Number
    (Integer) Number of rules modified in WAF Group.
    name String
    (String) The WAF rule group name.
    packageId String
    The WAF rule group package ID.
    rulesCount Number
    (Integer) Number of rules in WAF Group.

    Import

    The ibm_cis_waf_group resource can be imported by using the ID. The ID is formed from the WAF Rule Group ID, the WAF rule package ID, the domain ID of the domain and the Cloud Resource Name (CRN) Concatenated by using : 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::

    • Group ID is a 32 digit character string of the form: 57d96f0da6ed76251b475971b097205c. The id of an existing WAF Rule Group is not avaiable via the UI. It can be retrieved programatically via the CIS API or via the CLI using the CIS command to list the defined WAF Groups: ibmcloud cis waf-groups <domain_id> <waf_package_id>

    Syntax

    $ pulumi import ibm:index/cisWafGroup:CisWafGroup myorg <group_id>:<package_id>:<domain-id>:<crn>
    

    Example

    $ pulumi import ibm:index/cisWafGroup:CisWafGroup myorg 3d8fb0c18b5a6ba7682c80e94c7937b2:57d96f0da6ed76251b475971b097205c: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.
    ibm logo
    ibm 1.78.0 published on Wednesday, Apr 30, 2025 by ibm-cloud