1. Packages
  2. Packages
  3. Sysdig Provider
  4. API Docs
  5. SecureZonePosturePolicyAssignment
Viewing docs for sysdig 3.8.1
published on Wednesday, May 6, 2026 by sysdiglabs
Viewing docs for sysdig 3.8.1
published on Wednesday, May 6, 2026 by sysdiglabs

    Example Usage

    import * as pulumi from "@pulumi/pulumi";
    import * as sysdig from "@pulumi/sysdig";
    
    const production = new sysdig.SecureZone("production", {
        name: "Production",
        scopes: [{
            targetType: "aws",
            expressions: [{
                field: "account",
                operator: "in",
                values: ["111111111111"],
            }],
        }],
    });
    const cisK8s = sysdig.getSecurePosturePolicy({
        name: "CIS Kubernetes V1.24 Benchmark",
    });
    const productionSecureZonePosturePolicyAssignment = new sysdig.SecureZonePosturePolicyAssignment("production", {
        zoneId: production.secureZoneId,
        policyIds: [cisK8s.then(cisK8s => cisK8s.id)],
    });
    
    import pulumi
    import pulumi_sysdig as sysdig
    
    production = sysdig.SecureZone("production",
        name="Production",
        scopes=[{
            "target_type": "aws",
            "expressions": [{
                "field": "account",
                "operator": "in",
                "values": ["111111111111"],
            }],
        }])
    cis_k8s = sysdig.get_secure_posture_policy(name="CIS Kubernetes V1.24 Benchmark")
    production_secure_zone_posture_policy_assignment = sysdig.SecureZonePosturePolicyAssignment("production",
        zone_id=production.secure_zone_id,
        policy_ids=[cis_k8s.id])
    
    package main
    
    import (
    	"github.com/pulumi/pulumi-terraform-provider/sdks/go/sysdig/v3/sysdig"
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		production, err := sysdig.NewSecureZone(ctx, "production", &sysdig.SecureZoneArgs{
    			Name: pulumi.String("Production"),
    			Scopes: sysdig.SecureZoneScopeArray{
    				&sysdig.SecureZoneScopeArgs{
    					TargetType: pulumi.String("aws"),
    					Expressions: sysdig.SecureZoneScopeExpressionArray{
    						&sysdig.SecureZoneScopeExpressionArgs{
    							Field:    pulumi.String("account"),
    							Operator: pulumi.String("in"),
    							Values: pulumi.StringArray{
    								pulumi.String("111111111111"),
    							},
    						},
    					},
    				},
    			},
    		})
    		if err != nil {
    			return err
    		}
    		cisK8s, err := sysdig.LookupSecurePosturePolicy(ctx, &sysdig.LookupSecurePosturePolicyArgs{
    			Name: pulumi.StringRef("CIS Kubernetes V1.24 Benchmark"),
    		}, nil)
    		if err != nil {
    			return err
    		}
    		_, err = sysdig.NewSecureZonePosturePolicyAssignment(ctx, "production", &sysdig.SecureZonePosturePolicyAssignmentArgs{
    			ZoneId: production.SecureZoneId,
    			PolicyIds: pulumi.Float64Array{
    				pulumi.String(cisK8s.Id),
    			},
    		})
    		if err != nil {
    			return err
    		}
    		return nil
    	})
    }
    
    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using Sysdig = Pulumi.Sysdig;
    
    return await Deployment.RunAsync(() => 
    {
        var production = new Sysdig.SecureZone("production", new()
        {
            Name = "Production",
            Scopes = new[]
            {
                new Sysdig.Inputs.SecureZoneScopeArgs
                {
                    TargetType = "aws",
                    Expressions = new[]
                    {
                        new Sysdig.Inputs.SecureZoneScopeExpressionArgs
                        {
                            Field = "account",
                            Operator = "in",
                            Values = new[]
                            {
                                "111111111111",
                            },
                        },
                    },
                },
            },
        });
    
        var cisK8s = Sysdig.GetSecurePosturePolicy.Invoke(new()
        {
            Name = "CIS Kubernetes V1.24 Benchmark",
        });
    
        var productionSecureZonePosturePolicyAssignment = new Sysdig.SecureZonePosturePolicyAssignment("production", new()
        {
            ZoneId = production.SecureZoneId,
            PolicyIds = new[]
            {
                cisK8s.Apply(getSecurePosturePolicyResult => getSecurePosturePolicyResult.Id),
            },
        });
    
    });
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.sysdig.SecureZone;
    import com.pulumi.sysdig.SecureZoneArgs;
    import com.pulumi.sysdig.inputs.SecureZoneScopeArgs;
    import com.pulumi.sysdig.SysdigFunctions;
    import com.pulumi.sysdig.inputs.GetSecurePosturePolicyArgs;
    import com.pulumi.sysdig.SecureZonePosturePolicyAssignment;
    import com.pulumi.sysdig.SecureZonePosturePolicyAssignmentArgs;
    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 production = new SecureZone("production", SecureZoneArgs.builder()
                .name("Production")
                .scopes(SecureZoneScopeArgs.builder()
                    .targetType("aws")
                    .expressions(SecureZoneScopeExpressionArgs.builder()
                        .field("account")
                        .operator("in")
                        .values("111111111111")
                        .build())
                    .build())
                .build());
    
            final var cisK8s = SysdigFunctions.getSecurePosturePolicy(GetSecurePosturePolicyArgs.builder()
                .name("CIS Kubernetes V1.24 Benchmark")
                .build());
    
            var productionSecureZonePosturePolicyAssignment = new SecureZonePosturePolicyAssignment("productionSecureZonePosturePolicyAssignment", SecureZonePosturePolicyAssignmentArgs.builder()
                .zoneId(production.secureZoneId())
                .policyIds(cisK8s.id())
                .build());
    
        }
    }
    
    resources:
      production:
        type: sysdig:SecureZone
        properties:
          name: Production
          scopes:
            - targetType: aws
              expressions:
                - field: account
                  operator: in
                  values:
                    - '111111111111'
      productionSecureZonePosturePolicyAssignment:
        type: sysdig:SecureZonePosturePolicyAssignment
        name: production
        properties:
          zoneId: ${production.secureZoneId}
          policyIds:
            - ${cisK8s.id}
    variables:
      cisK8s:
        fn::invoke:
          function: sysdig:getSecurePosturePolicy
          arguments:
            name: CIS Kubernetes V1.24 Benchmark
    

    Create SecureZonePosturePolicyAssignment Resource

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

    Constructor syntax

    new SecureZonePosturePolicyAssignment(name: string, args: SecureZonePosturePolicyAssignmentArgs, opts?: CustomResourceOptions);
    @overload
    def SecureZonePosturePolicyAssignment(resource_name: str,
                                          args: SecureZonePosturePolicyAssignmentArgs,
                                          opts: Optional[ResourceOptions] = None)
    
    @overload
    def SecureZonePosturePolicyAssignment(resource_name: str,
                                          opts: Optional[ResourceOptions] = None,
                                          policy_ids: Optional[Sequence[float]] = None,
                                          zone_id: Optional[float] = None,
                                          secure_zone_posture_policy_assignment_id: Optional[str] = None,
                                          timeouts: Optional[SecureZonePosturePolicyAssignmentTimeoutsArgs] = None)
    func NewSecureZonePosturePolicyAssignment(ctx *Context, name string, args SecureZonePosturePolicyAssignmentArgs, opts ...ResourceOption) (*SecureZonePosturePolicyAssignment, error)
    public SecureZonePosturePolicyAssignment(string name, SecureZonePosturePolicyAssignmentArgs args, CustomResourceOptions? opts = null)
    public SecureZonePosturePolicyAssignment(String name, SecureZonePosturePolicyAssignmentArgs args)
    public SecureZonePosturePolicyAssignment(String name, SecureZonePosturePolicyAssignmentArgs args, CustomResourceOptions options)
    
    type: sysdig:SecureZonePosturePolicyAssignment
    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 SecureZonePosturePolicyAssignmentArgs
    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 SecureZonePosturePolicyAssignmentArgs
    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 SecureZonePosturePolicyAssignmentArgs
    The arguments to resource properties.
    opts ResourceOption
    Bag of options to control resource's behavior.
    name string
    The unique name of the resource.
    args SecureZonePosturePolicyAssignmentArgs
    The arguments to resource properties.
    opts CustomResourceOptions
    Bag of options to control resource's behavior.
    name String
    The unique name of the resource.
    args SecureZonePosturePolicyAssignmentArgs
    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 secureZonePosturePolicyAssignmentResource = new Sysdig.SecureZonePosturePolicyAssignment("secureZonePosturePolicyAssignmentResource", new()
    {
        PolicyIds = new[]
        {
            0,
        },
        ZoneId = 0,
        SecureZonePosturePolicyAssignmentId = "string",
        Timeouts = new Sysdig.Inputs.SecureZonePosturePolicyAssignmentTimeoutsArgs
        {
            Create = "string",
            Delete = "string",
            Read = "string",
            Update = "string",
        },
    });
    
    example, err := sysdig.NewSecureZonePosturePolicyAssignment(ctx, "secureZonePosturePolicyAssignmentResource", &sysdig.SecureZonePosturePolicyAssignmentArgs{
    	PolicyIds: pulumi.Float64Array{
    		pulumi.Float64(0),
    	},
    	ZoneId:                              pulumi.Float64(0),
    	SecureZonePosturePolicyAssignmentId: pulumi.String("string"),
    	Timeouts: &sysdig.SecureZonePosturePolicyAssignmentTimeoutsArgs{
    		Create: pulumi.String("string"),
    		Delete: pulumi.String("string"),
    		Read:   pulumi.String("string"),
    		Update: pulumi.String("string"),
    	},
    })
    
    var secureZonePosturePolicyAssignmentResource = new SecureZonePosturePolicyAssignment("secureZonePosturePolicyAssignmentResource", SecureZonePosturePolicyAssignmentArgs.builder()
        .policyIds(0.0)
        .zoneId(0.0)
        .secureZonePosturePolicyAssignmentId("string")
        .timeouts(SecureZonePosturePolicyAssignmentTimeoutsArgs.builder()
            .create("string")
            .delete("string")
            .read("string")
            .update("string")
            .build())
        .build());
    
    secure_zone_posture_policy_assignment_resource = sysdig.SecureZonePosturePolicyAssignment("secureZonePosturePolicyAssignmentResource",
        policy_ids=[float(0)],
        zone_id=float(0),
        secure_zone_posture_policy_assignment_id="string",
        timeouts={
            "create": "string",
            "delete": "string",
            "read": "string",
            "update": "string",
        })
    
    const secureZonePosturePolicyAssignmentResource = new sysdig.SecureZonePosturePolicyAssignment("secureZonePosturePolicyAssignmentResource", {
        policyIds: [0],
        zoneId: 0,
        secureZonePosturePolicyAssignmentId: "string",
        timeouts: {
            create: "string",
            "delete": "string",
            read: "string",
            update: "string",
        },
    });
    
    type: sysdig:SecureZonePosturePolicyAssignment
    properties:
        policyIds:
            - 0
        secureZonePosturePolicyAssignmentId: string
        timeouts:
            create: string
            delete: string
            read: string
            update: string
        zoneId: 0
    

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

    PolicyIds List<double>
    Set of posture policy IDs to associate with the zone. Updates replace the entire list.
    ZoneId double
    The ID of the zone to associate policies with. Changing this forces a new resource.
    SecureZonePosturePolicyAssignmentId string
    Timeouts SecureZonePosturePolicyAssignmentTimeouts
    PolicyIds []float64
    Set of posture policy IDs to associate with the zone. Updates replace the entire list.
    ZoneId float64
    The ID of the zone to associate policies with. Changing this forces a new resource.
    SecureZonePosturePolicyAssignmentId string
    Timeouts SecureZonePosturePolicyAssignmentTimeoutsArgs
    policyIds List<Double>
    Set of posture policy IDs to associate with the zone. Updates replace the entire list.
    zoneId Double
    The ID of the zone to associate policies with. Changing this forces a new resource.
    secureZonePosturePolicyAssignmentId String
    timeouts SecureZonePosturePolicyAssignmentTimeouts
    policyIds number[]
    Set of posture policy IDs to associate with the zone. Updates replace the entire list.
    zoneId number
    The ID of the zone to associate policies with. Changing this forces a new resource.
    secureZonePosturePolicyAssignmentId string
    timeouts SecureZonePosturePolicyAssignmentTimeouts
    policy_ids Sequence[float]
    Set of posture policy IDs to associate with the zone. Updates replace the entire list.
    zone_id float
    The ID of the zone to associate policies with. Changing this forces a new resource.
    secure_zone_posture_policy_assignment_id str
    timeouts SecureZonePosturePolicyAssignmentTimeoutsArgs
    policyIds List<Number>
    Set of posture policy IDs to associate with the zone. Updates replace the entire list.
    zoneId Number
    The ID of the zone to associate policies with. Changing this forces a new resource.
    secureZonePosturePolicyAssignmentId String
    timeouts Property Map

    Outputs

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

    Id string
    The provider-assigned unique ID for this managed resource.
    Id string
    The provider-assigned unique ID for this managed resource.
    id String
    The provider-assigned unique ID for this managed resource.
    id string
    The provider-assigned unique ID for this managed resource.
    id str
    The provider-assigned unique ID for this managed resource.
    id String
    The provider-assigned unique ID for this managed resource.

    Look up Existing SecureZonePosturePolicyAssignment Resource

    Get an existing SecureZonePosturePolicyAssignment 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?: SecureZonePosturePolicyAssignmentState, opts?: CustomResourceOptions): SecureZonePosturePolicyAssignment
    @staticmethod
    def get(resource_name: str,
            id: str,
            opts: Optional[ResourceOptions] = None,
            policy_ids: Optional[Sequence[float]] = None,
            secure_zone_posture_policy_assignment_id: Optional[str] = None,
            timeouts: Optional[SecureZonePosturePolicyAssignmentTimeoutsArgs] = None,
            zone_id: Optional[float] = None) -> SecureZonePosturePolicyAssignment
    func GetSecureZonePosturePolicyAssignment(ctx *Context, name string, id IDInput, state *SecureZonePosturePolicyAssignmentState, opts ...ResourceOption) (*SecureZonePosturePolicyAssignment, error)
    public static SecureZonePosturePolicyAssignment Get(string name, Input<string> id, SecureZonePosturePolicyAssignmentState? state, CustomResourceOptions? opts = null)
    public static SecureZonePosturePolicyAssignment get(String name, Output<String> id, SecureZonePosturePolicyAssignmentState state, CustomResourceOptions options)
    resources:  _:    type: sysdig:SecureZonePosturePolicyAssignment    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:
    PolicyIds List<double>
    Set of posture policy IDs to associate with the zone. Updates replace the entire list.
    SecureZonePosturePolicyAssignmentId string
    Timeouts SecureZonePosturePolicyAssignmentTimeouts
    ZoneId double
    The ID of the zone to associate policies with. Changing this forces a new resource.
    PolicyIds []float64
    Set of posture policy IDs to associate with the zone. Updates replace the entire list.
    SecureZonePosturePolicyAssignmentId string
    Timeouts SecureZonePosturePolicyAssignmentTimeoutsArgs
    ZoneId float64
    The ID of the zone to associate policies with. Changing this forces a new resource.
    policyIds List<Double>
    Set of posture policy IDs to associate with the zone. Updates replace the entire list.
    secureZonePosturePolicyAssignmentId String
    timeouts SecureZonePosturePolicyAssignmentTimeouts
    zoneId Double
    The ID of the zone to associate policies with. Changing this forces a new resource.
    policyIds number[]
    Set of posture policy IDs to associate with the zone. Updates replace the entire list.
    secureZonePosturePolicyAssignmentId string
    timeouts SecureZonePosturePolicyAssignmentTimeouts
    zoneId number
    The ID of the zone to associate policies with. Changing this forces a new resource.
    policy_ids Sequence[float]
    Set of posture policy IDs to associate with the zone. Updates replace the entire list.
    secure_zone_posture_policy_assignment_id str
    timeouts SecureZonePosturePolicyAssignmentTimeoutsArgs
    zone_id float
    The ID of the zone to associate policies with. Changing this forces a new resource.
    policyIds List<Number>
    Set of posture policy IDs to associate with the zone. Updates replace the entire list.
    secureZonePosturePolicyAssignmentId String
    timeouts Property Map
    zoneId Number
    The ID of the zone to associate policies with. Changing this forces a new resource.

    Supporting Types

    SecureZonePosturePolicyAssignmentTimeouts, SecureZonePosturePolicyAssignmentTimeoutsArgs

    Create string
    Delete string
    Read string
    Update string
    Create string
    Delete string
    Read string
    Update string
    create String
    delete String
    read String
    update String
    create string
    delete string
    read string
    update string
    create str
    delete str
    read str
    update str
    create String
    delete String
    read String
    update String

    Import

    The resource can be imported using the zone ID:

    $ pulumi import sysdig:index/secureZonePosturePolicyAssignment:SecureZonePosturePolicyAssignment example 12345
    

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

    Package Details

    Repository
    sysdig sysdiglabs/terraform-provider-sysdig
    License
    Notes
    This Pulumi package is based on the sysdig Terraform Provider.
    Viewing docs for sysdig 3.8.1
    published on Wednesday, May 6, 2026 by sysdiglabs
      Try Pulumi Cloud free. Your team will thank you.