crowdstrike.PreventionPolicyAttachment
Explore with Pulumi AI

This resource allows managing the host groups and ioa rule groups attached to a prevention policy. This resource takes exclusive ownership over the host groups and ioa rule groups assigned to a prevention policy. If you want to fully create or manage a prevention policy please use the prevention_policy_*
resource for the platform you want to manage.
API Scopes
The following API scopes are required:
- Prevention policies | Read & Write
Example Usage
import * as pulumi from "@pulumi/pulumi";
import * as crowdstrike from "@crowdstrike/pulumi";
const example = new crowdstrike.PreventionPolicyAttachment("example", {
idProperty: "16c0eecfeebb47ce95185fda2e5b3112",
hostGroups: ["df868c936cd443e5a95b2603e2483602"],
ioaRuleGroups: ["507117bc669d41bb93d0a009f557bb23"],
});
export const preventionPolicyAttachment = example;
import pulumi
import crowdstrike_pulumi as crowdstrike
example = crowdstrike.PreventionPolicyAttachment("example",
id_property="16c0eecfeebb47ce95185fda2e5b3112",
host_groups=["df868c936cd443e5a95b2603e2483602"],
ioa_rule_groups=["507117bc669d41bb93d0a009f557bb23"])
pulumi.export("preventionPolicyAttachment", example)
package main
import (
"github.com/crowdstrike/pulumi-crowdstrike/sdk/go/crowdstrike"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
example, err := crowdstrike.NewPreventionPolicyAttachment(ctx, "example", &crowdstrike.PreventionPolicyAttachmentArgs{
IdProperty: pulumi.String("16c0eecfeebb47ce95185fda2e5b3112"),
HostGroups: pulumi.StringArray{
pulumi.String("df868c936cd443e5a95b2603e2483602"),
},
IoaRuleGroups: pulumi.StringArray{
pulumi.String("507117bc669d41bb93d0a009f557bb23"),
},
})
if err != nil {
return err
}
ctx.Export("preventionPolicyAttachment", example)
return nil
})
}
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Crowdstrike = CrowdStrike.Crowdstrike;
return await Deployment.RunAsync(() =>
{
var example = new Crowdstrike.PreventionPolicyAttachment("example", new()
{
IdProperty = "16c0eecfeebb47ce95185fda2e5b3112",
HostGroups = new[]
{
"df868c936cd443e5a95b2603e2483602",
},
IoaRuleGroups = new[]
{
"507117bc669d41bb93d0a009f557bb23",
},
});
return new Dictionary<string, object?>
{
["preventionPolicyAttachment"] = example,
};
});
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.crowdstrike.crowdstrike.PreventionPolicyAttachment;
import com.crowdstrike.crowdstrike.PreventionPolicyAttachmentArgs;
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 example = new PreventionPolicyAttachment("example", PreventionPolicyAttachmentArgs.builder()
.idProperty("16c0eecfeebb47ce95185fda2e5b3112")
.hostGroups("df868c936cd443e5a95b2603e2483602")
.ioaRuleGroups("507117bc669d41bb93d0a009f557bb23")
.build());
ctx.export("preventionPolicyAttachment", example);
}
}
resources:
example:
type: crowdstrike:PreventionPolicyAttachment
properties:
idProperty: 16c0eecfeebb47ce95185fda2e5b3112
hostGroups:
- df868c936cd443e5a95b2603e2483602
ioaRuleGroups:
- 507117bc669d41bb93d0a009f557bb23
outputs:
preventionPolicyAttachment: ${example}
Create PreventionPolicyAttachment Resource
Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.
Constructor syntax
new PreventionPolicyAttachment(name: string, args: PreventionPolicyAttachmentArgs, opts?: CustomResourceOptions);
@overload
def PreventionPolicyAttachment(resource_name: str,
args: PreventionPolicyAttachmentArgs,
opts: Optional[ResourceOptions] = None)
@overload
def PreventionPolicyAttachment(resource_name: str,
opts: Optional[ResourceOptions] = None,
id_property: Optional[str] = None,
host_groups: Optional[Sequence[str]] = None,
ioa_rule_groups: Optional[Sequence[str]] = None)
func NewPreventionPolicyAttachment(ctx *Context, name string, args PreventionPolicyAttachmentArgs, opts ...ResourceOption) (*PreventionPolicyAttachment, error)
public PreventionPolicyAttachment(string name, PreventionPolicyAttachmentArgs args, CustomResourceOptions? opts = null)
public PreventionPolicyAttachment(String name, PreventionPolicyAttachmentArgs args)
public PreventionPolicyAttachment(String name, PreventionPolicyAttachmentArgs args, CustomResourceOptions options)
type: crowdstrike:PreventionPolicyAttachment
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 PreventionPolicyAttachmentArgs
- 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 PreventionPolicyAttachmentArgs
- 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 PreventionPolicyAttachmentArgs
- The arguments to resource properties.
- opts ResourceOption
- Bag of options to control resource's behavior.
- name string
- The unique name of the resource.
- args PreventionPolicyAttachmentArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- name String
- The unique name of the resource.
- args PreventionPolicyAttachmentArgs
- 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 preventionPolicyAttachmentResource = new Crowdstrike.PreventionPolicyAttachment("preventionPolicyAttachmentResource", new()
{
IdProperty = "string",
HostGroups = new[]
{
"string",
},
IoaRuleGroups = new[]
{
"string",
},
});
example, err := crowdstrike.NewPreventionPolicyAttachment(ctx, "preventionPolicyAttachmentResource", &crowdstrike.PreventionPolicyAttachmentArgs{
IdProperty: pulumi.String("string"),
HostGroups: pulumi.StringArray{
pulumi.String("string"),
},
IoaRuleGroups: pulumi.StringArray{
pulumi.String("string"),
},
})
var preventionPolicyAttachmentResource = new PreventionPolicyAttachment("preventionPolicyAttachmentResource", PreventionPolicyAttachmentArgs.builder()
.idProperty("string")
.hostGroups("string")
.ioaRuleGroups("string")
.build());
prevention_policy_attachment_resource = crowdstrike.PreventionPolicyAttachment("preventionPolicyAttachmentResource",
id_property="string",
host_groups=["string"],
ioa_rule_groups=["string"])
const preventionPolicyAttachmentResource = new crowdstrike.PreventionPolicyAttachment("preventionPolicyAttachmentResource", {
idProperty: "string",
hostGroups: ["string"],
ioaRuleGroups: ["string"],
});
type: crowdstrike:PreventionPolicyAttachment
properties:
hostGroups:
- string
idProperty: string
ioaRuleGroups:
- string
PreventionPolicyAttachment 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 PreventionPolicyAttachment resource accepts the following input properties:
- Id
Property string - The prevention policy id you want to attach to.
- Host
Groups List<string> - Host Group ids to attach to the prevention policy.
- Ioa
Rule List<string>Groups - IOA Rule Group to attach to the prevention policy.
- Id
Property string - The prevention policy id you want to attach to.
- Host
Groups []string - Host Group ids to attach to the prevention policy.
- Ioa
Rule []stringGroups - IOA Rule Group to attach to the prevention policy.
- id
Property String - The prevention policy id you want to attach to.
- host
Groups List<String> - Host Group ids to attach to the prevention policy.
- ioa
Rule List<String>Groups - IOA Rule Group to attach to the prevention policy.
- id
Property string - The prevention policy id you want to attach to.
- host
Groups string[] - Host Group ids to attach to the prevention policy.
- ioa
Rule string[]Groups - IOA Rule Group to attach to the prevention policy.
- id_
property str - The prevention policy id you want to attach to.
- host_
groups Sequence[str] - Host Group ids to attach to the prevention policy.
- ioa_
rule_ Sequence[str]groups - IOA Rule Group to attach to the prevention policy.
- id
Property String - The prevention policy id you want to attach to.
- host
Groups List<String> - Host Group ids to attach to the prevention policy.
- ioa
Rule List<String>Groups - IOA Rule Group to attach to the prevention policy.
Outputs
All input properties are implicitly available as output properties. Additionally, the PreventionPolicyAttachment resource produces the following output properties:
- Id string
- The provider-assigned unique ID for this managed resource.
- Last
Updated string
- Id string
- The provider-assigned unique ID for this managed resource.
- Last
Updated string
- id String
- The provider-assigned unique ID for this managed resource.
- last
Updated String
- id string
- The provider-assigned unique ID for this managed resource.
- last
Updated string
- id str
- The provider-assigned unique ID for this managed resource.
- last_
updated str
- id String
- The provider-assigned unique ID for this managed resource.
- last
Updated String
Look up Existing PreventionPolicyAttachment Resource
Get an existing PreventionPolicyAttachment 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?: PreventionPolicyAttachmentState, opts?: CustomResourceOptions): PreventionPolicyAttachment
@staticmethod
def get(resource_name: str,
id: str,
opts: Optional[ResourceOptions] = None,
host_groups: Optional[Sequence[str]] = None,
id_property: Optional[str] = None,
ioa_rule_groups: Optional[Sequence[str]] = None,
last_updated: Optional[str] = None) -> PreventionPolicyAttachment
func GetPreventionPolicyAttachment(ctx *Context, name string, id IDInput, state *PreventionPolicyAttachmentState, opts ...ResourceOption) (*PreventionPolicyAttachment, error)
public static PreventionPolicyAttachment Get(string name, Input<string> id, PreventionPolicyAttachmentState? state, CustomResourceOptions? opts = null)
public static PreventionPolicyAttachment get(String name, Output<String> id, PreventionPolicyAttachmentState state, CustomResourceOptions options)
resources: _: type: crowdstrike:PreventionPolicyAttachment 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.
- Host
Groups List<string> - Host Group ids to attach to the prevention policy.
- Id
Property string - The prevention policy id you want to attach to.
- Ioa
Rule List<string>Groups - IOA Rule Group to attach to the prevention policy.
- Last
Updated string
- Host
Groups []string - Host Group ids to attach to the prevention policy.
- Id
Property string - The prevention policy id you want to attach to.
- Ioa
Rule []stringGroups - IOA Rule Group to attach to the prevention policy.
- Last
Updated string
- host
Groups List<String> - Host Group ids to attach to the prevention policy.
- id
Property String - The prevention policy id you want to attach to.
- ioa
Rule List<String>Groups - IOA Rule Group to attach to the prevention policy.
- last
Updated String
- host
Groups string[] - Host Group ids to attach to the prevention policy.
- id
Property string - The prevention policy id you want to attach to.
- ioa
Rule string[]Groups - IOA Rule Group to attach to the prevention policy.
- last
Updated string
- host_
groups Sequence[str] - Host Group ids to attach to the prevention policy.
- id_
property str - The prevention policy id you want to attach to.
- ioa_
rule_ Sequence[str]groups - IOA Rule Group to attach to the prevention policy.
- last_
updated str
- host
Groups List<String> - Host Group ids to attach to the prevention policy.
- id
Property String - The prevention policy id you want to attach to.
- ioa
Rule List<String>Groups - IOA Rule Group to attach to the prevention policy.
- last
Updated String
Import
Prevention Policy Attachment can be imported by specifying the id.
$ pulumi import crowdstrike:index/preventionPolicyAttachment:PreventionPolicyAttachment example 7fb858a949034a0cbca175f660f1e769
To learn more about importing existing cloud resources, see Importing resources.
Package Details
- Repository
- crowdstrike crowdstrike/pulumi-crowdstrike
- License
- Apache-2.0
- Notes
- This Pulumi package is based on the
crowdstrike
Terraform Provider.
