1. Packages
  2. CrowdStrike
  3. API Docs
  4. SensorUpdatePolicyHostGroupAttachment
CrowdStrike v0.0.13 published on Tuesday, Apr 22, 2025 by CrowdStrike

crowdstrike.SensorUpdatePolicyHostGroupAttachment

Explore with Pulumi AI

crowdstrike logo
CrowdStrike v0.0.13 published on Tuesday, Apr 22, 2025 by CrowdStrike

    This resource allows managing the host groups attached to a sensor update policy. This resource takes exclusive ownership over the host groups assigned to a sensor update policy. If you want to fully create or manage a sensor update policy please use the sensor_update_policy resource.

    API Scopes

    The following API scopes are required:

    • Sensor update policies | Read & Write

    Example Usage

    import * as pulumi from "@pulumi/pulumi";
    import * as crowdstrike from "@crowdstrike/pulumi";
    
    const example = new crowdstrike.SensorUpdatePolicyHostGroupAttachment("example", {
        idProperty: "34ef8e65eb1b4642861e389da3f7e82f",
        hostGroups: ["ff1ca3nfr7899j1abf61c0448db28be5"],
    });
    export const sensorUpdatePolicyHostGroupAttachment = example;
    
    import pulumi
    import crowdstrike_pulumi as crowdstrike
    
    example = crowdstrike.SensorUpdatePolicyHostGroupAttachment("example",
        id_property="34ef8e65eb1b4642861e389da3f7e82f",
        host_groups=["ff1ca3nfr7899j1abf61c0448db28be5"])
    pulumi.export("sensorUpdatePolicyHostGroupAttachment", 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.NewSensorUpdatePolicyHostGroupAttachment(ctx, "example", &crowdstrike.SensorUpdatePolicyHostGroupAttachmentArgs{
    			IdProperty: pulumi.String("34ef8e65eb1b4642861e389da3f7e82f"),
    			HostGroups: pulumi.StringArray{
    				pulumi.String("ff1ca3nfr7899j1abf61c0448db28be5"),
    			},
    		})
    		if err != nil {
    			return err
    		}
    		ctx.Export("sensorUpdatePolicyHostGroupAttachment", example)
    		return nil
    	})
    }
    
    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using Crowdstrike = CrowdStrike.Crowdstrike;
    
    return await Deployment.RunAsync(() => 
    {
        var example = new Crowdstrike.SensorUpdatePolicyHostGroupAttachment("example", new()
        {
            IdProperty = "34ef8e65eb1b4642861e389da3f7e82f",
            HostGroups = new[]
            {
                "ff1ca3nfr7899j1abf61c0448db28be5",
            },
        });
    
        return new Dictionary<string, object?>
        {
            ["sensorUpdatePolicyHostGroupAttachment"] = example,
        };
    });
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.crowdstrike.crowdstrike.SensorUpdatePolicyHostGroupAttachment;
    import com.crowdstrike.crowdstrike.SensorUpdatePolicyHostGroupAttachmentArgs;
    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 SensorUpdatePolicyHostGroupAttachment("example", SensorUpdatePolicyHostGroupAttachmentArgs.builder()
                .idProperty("34ef8e65eb1b4642861e389da3f7e82f")
                .hostGroups("ff1ca3nfr7899j1abf61c0448db28be5")
                .build());
    
            ctx.export("sensorUpdatePolicyHostGroupAttachment", example);
        }
    }
    
    resources:
      example:
        type: crowdstrike:SensorUpdatePolicyHostGroupAttachment
        properties:
          idProperty: 34ef8e65eb1b4642861e389da3f7e82f
          hostGroups:
            - ff1ca3nfr7899j1abf61c0448db28be5
    outputs:
      sensorUpdatePolicyHostGroupAttachment: ${example}
    

    Create SensorUpdatePolicyHostGroupAttachment Resource

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

    Constructor syntax

    new SensorUpdatePolicyHostGroupAttachment(name: string, args: SensorUpdatePolicyHostGroupAttachmentArgs, opts?: CustomResourceOptions);
    @overload
    def SensorUpdatePolicyHostGroupAttachment(resource_name: str,
                                              args: SensorUpdatePolicyHostGroupAttachmentArgs,
                                              opts: Optional[ResourceOptions] = None)
    
    @overload
    def SensorUpdatePolicyHostGroupAttachment(resource_name: str,
                                              opts: Optional[ResourceOptions] = None,
                                              id_property: Optional[str] = None,
                                              host_groups: Optional[Sequence[str]] = None)
    func NewSensorUpdatePolicyHostGroupAttachment(ctx *Context, name string, args SensorUpdatePolicyHostGroupAttachmentArgs, opts ...ResourceOption) (*SensorUpdatePolicyHostGroupAttachment, error)
    public SensorUpdatePolicyHostGroupAttachment(string name, SensorUpdatePolicyHostGroupAttachmentArgs args, CustomResourceOptions? opts = null)
    public SensorUpdatePolicyHostGroupAttachment(String name, SensorUpdatePolicyHostGroupAttachmentArgs args)
    public SensorUpdatePolicyHostGroupAttachment(String name, SensorUpdatePolicyHostGroupAttachmentArgs args, CustomResourceOptions options)
    
    type: crowdstrike:SensorUpdatePolicyHostGroupAttachment
    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 SensorUpdatePolicyHostGroupAttachmentArgs
    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 SensorUpdatePolicyHostGroupAttachmentArgs
    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 SensorUpdatePolicyHostGroupAttachmentArgs
    The arguments to resource properties.
    opts ResourceOption
    Bag of options to control resource's behavior.
    name string
    The unique name of the resource.
    args SensorUpdatePolicyHostGroupAttachmentArgs
    The arguments to resource properties.
    opts CustomResourceOptions
    Bag of options to control resource's behavior.
    name String
    The unique name of the resource.
    args SensorUpdatePolicyHostGroupAttachmentArgs
    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 sensorUpdatePolicyHostGroupAttachmentResource = new Crowdstrike.SensorUpdatePolicyHostGroupAttachment("sensorUpdatePolicyHostGroupAttachmentResource", new()
    {
        IdProperty = "string",
        HostGroups = new[]
        {
            "string",
        },
    });
    
    example, err := crowdstrike.NewSensorUpdatePolicyHostGroupAttachment(ctx, "sensorUpdatePolicyHostGroupAttachmentResource", &crowdstrike.SensorUpdatePolicyHostGroupAttachmentArgs{
    	IdProperty: pulumi.String("string"),
    	HostGroups: pulumi.StringArray{
    		pulumi.String("string"),
    	},
    })
    
    var sensorUpdatePolicyHostGroupAttachmentResource = new SensorUpdatePolicyHostGroupAttachment("sensorUpdatePolicyHostGroupAttachmentResource", SensorUpdatePolicyHostGroupAttachmentArgs.builder()
        .idProperty("string")
        .hostGroups("string")
        .build());
    
    sensor_update_policy_host_group_attachment_resource = crowdstrike.SensorUpdatePolicyHostGroupAttachment("sensorUpdatePolicyHostGroupAttachmentResource",
        id_property="string",
        host_groups=["string"])
    
    const sensorUpdatePolicyHostGroupAttachmentResource = new crowdstrike.SensorUpdatePolicyHostGroupAttachment("sensorUpdatePolicyHostGroupAttachmentResource", {
        idProperty: "string",
        hostGroups: ["string"],
    });
    
    type: crowdstrike:SensorUpdatePolicyHostGroupAttachment
    properties:
        hostGroups:
            - string
        idProperty: string
    

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

    IdProperty string
    The sensor update policy id you want to attach to.
    HostGroups List<string>
    Host Group ids to attach to the sensor update policy.
    IdProperty string
    The sensor update policy id you want to attach to.
    HostGroups []string
    Host Group ids to attach to the sensor update policy.
    idProperty String
    The sensor update policy id you want to attach to.
    hostGroups List<String>
    Host Group ids to attach to the sensor update policy.
    idProperty string
    The sensor update policy id you want to attach to.
    hostGroups string[]
    Host Group ids to attach to the sensor update policy.
    id_property str
    The sensor update policy id you want to attach to.
    host_groups Sequence[str]
    Host Group ids to attach to the sensor update policy.
    idProperty String
    The sensor update policy id you want to attach to.
    hostGroups List<String>
    Host Group ids to attach to the sensor update policy.

    Outputs

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

    Id string
    The provider-assigned unique ID for this managed resource.
    LastUpdated string
    Id string
    The provider-assigned unique ID for this managed resource.
    LastUpdated string
    id String
    The provider-assigned unique ID for this managed resource.
    lastUpdated String
    id string
    The provider-assigned unique ID for this managed resource.
    lastUpdated 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.
    lastUpdated String

    Look up Existing SensorUpdatePolicyHostGroupAttachment Resource

    Get an existing SensorUpdatePolicyHostGroupAttachment 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?: SensorUpdatePolicyHostGroupAttachmentState, opts?: CustomResourceOptions): SensorUpdatePolicyHostGroupAttachment
    @staticmethod
    def get(resource_name: str,
            id: str,
            opts: Optional[ResourceOptions] = None,
            host_groups: Optional[Sequence[str]] = None,
            id_property: Optional[str] = None,
            last_updated: Optional[str] = None) -> SensorUpdatePolicyHostGroupAttachment
    func GetSensorUpdatePolicyHostGroupAttachment(ctx *Context, name string, id IDInput, state *SensorUpdatePolicyHostGroupAttachmentState, opts ...ResourceOption) (*SensorUpdatePolicyHostGroupAttachment, error)
    public static SensorUpdatePolicyHostGroupAttachment Get(string name, Input<string> id, SensorUpdatePolicyHostGroupAttachmentState? state, CustomResourceOptions? opts = null)
    public static SensorUpdatePolicyHostGroupAttachment get(String name, Output<String> id, SensorUpdatePolicyHostGroupAttachmentState state, CustomResourceOptions options)
    resources:  _:    type: crowdstrike:SensorUpdatePolicyHostGroupAttachment    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:
    HostGroups List<string>
    Host Group ids to attach to the sensor update policy.
    IdProperty string
    The sensor update policy id you want to attach to.
    LastUpdated string
    HostGroups []string
    Host Group ids to attach to the sensor update policy.
    IdProperty string
    The sensor update policy id you want to attach to.
    LastUpdated string
    hostGroups List<String>
    Host Group ids to attach to the sensor update policy.
    idProperty String
    The sensor update policy id you want to attach to.
    lastUpdated String
    hostGroups string[]
    Host Group ids to attach to the sensor update policy.
    idProperty string
    The sensor update policy id you want to attach to.
    lastUpdated string
    host_groups Sequence[str]
    Host Group ids to attach to the sensor update policy.
    id_property str
    The sensor update policy id you want to attach to.
    last_updated str
    hostGroups List<String>
    Host Group ids to attach to the sensor update policy.
    idProperty String
    The sensor update policy id you want to attach to.
    lastUpdated String

    Import

    Sensor Update Policy Host Group Attachment can be imported by specifying the id.

    $ pulumi import crowdstrike:index/sensorUpdatePolicyHostGroupAttachment:SensorUpdatePolicyHostGroupAttachment 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.
    crowdstrike logo
    CrowdStrike v0.0.13 published on Tuesday, Apr 22, 2025 by CrowdStrike