1. Packages
  2. Sysdig Provider
  3. API Docs
  4. SecureRuleFilesystem
sysdig 1.53.0 published on Thursday, Apr 17, 2025 by sysdiglabs

sysdig.SecureRuleFilesystem

Explore with Pulumi AI

sysdig logo
sysdig 1.53.0 published on Thursday, Apr 17, 2025 by sysdiglabs

    Example Usage

    import * as pulumi from "@pulumi/pulumi";
    import * as sysdig from "@pulumi/sysdig";
    
    const example = new sysdig.SecureRuleFilesystem("example", {
        description: "Attempt to write to directories that should be immutable",
        readOnlies: [{
            matching: true,
            paths: ["/etc"],
        }],
        readWrites: [{
            matching: true,
            paths: [
                "/var/log/apache2",
                "/dev/tty",
            ],
        }],
        tags: [
            "filesystem",
            "cis",
        ],
    });
    
    import pulumi
    import pulumi_sysdig as sysdig
    
    example = sysdig.SecureRuleFilesystem("example",
        description="Attempt to write to directories that should be immutable",
        read_onlies=[{
            "matching": True,
            "paths": ["/etc"],
        }],
        read_writes=[{
            "matching": True,
            "paths": [
                "/var/log/apache2",
                "/dev/tty",
            ],
        }],
        tags=[
            "filesystem",
            "cis",
        ])
    
    package main
    
    import (
    	"github.com/pulumi/pulumi-terraform-provider/sdks/go/sysdig/sysdig"
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		_, err := sysdig.NewSecureRuleFilesystem(ctx, "example", &sysdig.SecureRuleFilesystemArgs{
    			Description: pulumi.String("Attempt to write to directories that should be immutable"),
    			ReadOnlies: sysdig.SecureRuleFilesystemReadOnlyArray{
    				&sysdig.SecureRuleFilesystemReadOnlyArgs{
    					Matching: pulumi.Bool(true),
    					Paths: pulumi.StringArray{
    						pulumi.String("/etc"),
    					},
    				},
    			},
    			ReadWrites: sysdig.SecureRuleFilesystemReadWriteArray{
    				&sysdig.SecureRuleFilesystemReadWriteArgs{
    					Matching: pulumi.Bool(true),
    					Paths: pulumi.StringArray{
    						pulumi.String("/var/log/apache2"),
    						pulumi.String("/dev/tty"),
    					},
    				},
    			},
    			Tags: pulumi.StringArray{
    				pulumi.String("filesystem"),
    				pulumi.String("cis"),
    			},
    		})
    		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 example = new Sysdig.SecureRuleFilesystem("example", new()
        {
            Description = "Attempt to write to directories that should be immutable",
            ReadOnlies = new[]
            {
                new Sysdig.Inputs.SecureRuleFilesystemReadOnlyArgs
                {
                    Matching = true,
                    Paths = new[]
                    {
                        "/etc",
                    },
                },
            },
            ReadWrites = new[]
            {
                new Sysdig.Inputs.SecureRuleFilesystemReadWriteArgs
                {
                    Matching = true,
                    Paths = new[]
                    {
                        "/var/log/apache2",
                        "/dev/tty",
                    },
                },
            },
            Tags = new[]
            {
                "filesystem",
                "cis",
            },
        });
    
    });
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.sysdig.SecureRuleFilesystem;
    import com.pulumi.sysdig.SecureRuleFilesystemArgs;
    import com.pulumi.sysdig.inputs.SecureRuleFilesystemReadOnlyArgs;
    import com.pulumi.sysdig.inputs.SecureRuleFilesystemReadWriteArgs;
    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 SecureRuleFilesystem("example", SecureRuleFilesystemArgs.builder()
                .description("Attempt to write to directories that should be immutable")
                .readOnlies(SecureRuleFilesystemReadOnlyArgs.builder()
                    .matching(true)
                    .paths("/etc")
                    .build())
                .readWrites(SecureRuleFilesystemReadWriteArgs.builder()
                    .matching(true)
                    .paths(                
                        "/var/log/apache2",
                        "/dev/tty")
                    .build())
                .tags(            
                    "filesystem",
                    "cis")
                .build());
    
        }
    }
    
    resources:
      example:
        type: sysdig:SecureRuleFilesystem
        properties:
          description: Attempt to write to directories that should be immutable
          readOnlies:
            - matching: true
              paths:
                - /etc
          readWrites:
            - matching: true
              paths:
                - /var/log/apache2
                - /dev/tty
          tags:
            - filesystem
            - cis
    

    Create SecureRuleFilesystem Resource

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

    Constructor syntax

    new SecureRuleFilesystem(name: string, args?: SecureRuleFilesystemArgs, opts?: CustomResourceOptions);
    @overload
    def SecureRuleFilesystem(resource_name: str,
                             args: Optional[SecureRuleFilesystemArgs] = None,
                             opts: Optional[ResourceOptions] = None)
    
    @overload
    def SecureRuleFilesystem(resource_name: str,
                             opts: Optional[ResourceOptions] = None,
                             description: Optional[str] = None,
                             name: Optional[str] = None,
                             read_onlies: Optional[Sequence[SecureRuleFilesystemReadOnlyArgs]] = None,
                             read_writes: Optional[Sequence[SecureRuleFilesystemReadWriteArgs]] = None,
                             secure_rule_filesystem_id: Optional[str] = None,
                             tags: Optional[Sequence[str]] = None,
                             timeouts: Optional[SecureRuleFilesystemTimeoutsArgs] = None)
    func NewSecureRuleFilesystem(ctx *Context, name string, args *SecureRuleFilesystemArgs, opts ...ResourceOption) (*SecureRuleFilesystem, error)
    public SecureRuleFilesystem(string name, SecureRuleFilesystemArgs? args = null, CustomResourceOptions? opts = null)
    public SecureRuleFilesystem(String name, SecureRuleFilesystemArgs args)
    public SecureRuleFilesystem(String name, SecureRuleFilesystemArgs args, CustomResourceOptions options)
    
    type: sysdig:SecureRuleFilesystem
    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 SecureRuleFilesystemArgs
    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 SecureRuleFilesystemArgs
    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 SecureRuleFilesystemArgs
    The arguments to resource properties.
    opts ResourceOption
    Bag of options to control resource's behavior.
    name string
    The unique name of the resource.
    args SecureRuleFilesystemArgs
    The arguments to resource properties.
    opts CustomResourceOptions
    Bag of options to control resource's behavior.
    name String
    The unique name of the resource.
    args SecureRuleFilesystemArgs
    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 secureRuleFilesystemResource = new Sysdig.SecureRuleFilesystem("secureRuleFilesystemResource", new()
    {
        Description = "string",
        Name = "string",
        ReadOnlies = new[]
        {
            new Sysdig.Inputs.SecureRuleFilesystemReadOnlyArgs
            {
                Paths = new[]
                {
                    "string",
                },
                Matching = false,
            },
        },
        ReadWrites = new[]
        {
            new Sysdig.Inputs.SecureRuleFilesystemReadWriteArgs
            {
                Paths = new[]
                {
                    "string",
                },
                Matching = false,
            },
        },
        SecureRuleFilesystemId = "string",
        Tags = new[]
        {
            "string",
        },
        Timeouts = new Sysdig.Inputs.SecureRuleFilesystemTimeoutsArgs
        {
            Create = "string",
            Delete = "string",
            Read = "string",
            Update = "string",
        },
    });
    
    example, err := sysdig.NewSecureRuleFilesystem(ctx, "secureRuleFilesystemResource", &sysdig.SecureRuleFilesystemArgs{
    	Description: pulumi.String("string"),
    	Name:        pulumi.String("string"),
    	ReadOnlies: sysdig.SecureRuleFilesystemReadOnlyArray{
    		&sysdig.SecureRuleFilesystemReadOnlyArgs{
    			Paths: pulumi.StringArray{
    				pulumi.String("string"),
    			},
    			Matching: pulumi.Bool(false),
    		},
    	},
    	ReadWrites: sysdig.SecureRuleFilesystemReadWriteArray{
    		&sysdig.SecureRuleFilesystemReadWriteArgs{
    			Paths: pulumi.StringArray{
    				pulumi.String("string"),
    			},
    			Matching: pulumi.Bool(false),
    		},
    	},
    	SecureRuleFilesystemId: pulumi.String("string"),
    	Tags: pulumi.StringArray{
    		pulumi.String("string"),
    	},
    	Timeouts: &sysdig.SecureRuleFilesystemTimeoutsArgs{
    		Create: pulumi.String("string"),
    		Delete: pulumi.String("string"),
    		Read:   pulumi.String("string"),
    		Update: pulumi.String("string"),
    	},
    })
    
    var secureRuleFilesystemResource = new SecureRuleFilesystem("secureRuleFilesystemResource", SecureRuleFilesystemArgs.builder()
        .description("string")
        .name("string")
        .readOnlies(SecureRuleFilesystemReadOnlyArgs.builder()
            .paths("string")
            .matching(false)
            .build())
        .readWrites(SecureRuleFilesystemReadWriteArgs.builder()
            .paths("string")
            .matching(false)
            .build())
        .secureRuleFilesystemId("string")
        .tags("string")
        .timeouts(SecureRuleFilesystemTimeoutsArgs.builder()
            .create("string")
            .delete("string")
            .read("string")
            .update("string")
            .build())
        .build());
    
    secure_rule_filesystem_resource = sysdig.SecureRuleFilesystem("secureRuleFilesystemResource",
        description="string",
        name="string",
        read_onlies=[{
            "paths": ["string"],
            "matching": False,
        }],
        read_writes=[{
            "paths": ["string"],
            "matching": False,
        }],
        secure_rule_filesystem_id="string",
        tags=["string"],
        timeouts={
            "create": "string",
            "delete": "string",
            "read": "string",
            "update": "string",
        })
    
    const secureRuleFilesystemResource = new sysdig.SecureRuleFilesystem("secureRuleFilesystemResource", {
        description: "string",
        name: "string",
        readOnlies: [{
            paths: ["string"],
            matching: false,
        }],
        readWrites: [{
            paths: ["string"],
            matching: false,
        }],
        secureRuleFilesystemId: "string",
        tags: ["string"],
        timeouts: {
            create: "string",
            "delete": "string",
            read: "string",
            update: "string",
        },
    });
    
    type: sysdig:SecureRuleFilesystem
    properties:
        description: string
        name: string
        readOnlies:
            - matching: false
              paths:
                - string
        readWrites:
            - matching: false
              paths:
                - string
        secureRuleFilesystemId: string
        tags:
            - string
        timeouts:
            create: string
            delete: string
            read: string
            update: string
    

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

    Description string
    The description of Secure rule. By default is empty.
    Name string
    The name of the Secure rule. It must be unique.
    ReadOnlies List<SecureRuleFilesystemReadOnly>
    ReadWrites List<SecureRuleFilesystemReadWrite>
    SecureRuleFilesystemId string
    Tags List<string>
    A list of tags for this rule.
    Timeouts SecureRuleFilesystemTimeouts
    Description string
    The description of Secure rule. By default is empty.
    Name string
    The name of the Secure rule. It must be unique.
    ReadOnlies []SecureRuleFilesystemReadOnlyArgs
    ReadWrites []SecureRuleFilesystemReadWriteArgs
    SecureRuleFilesystemId string
    Tags []string
    A list of tags for this rule.
    Timeouts SecureRuleFilesystemTimeoutsArgs
    description String
    The description of Secure rule. By default is empty.
    name String
    The name of the Secure rule. It must be unique.
    readOnlies List<SecureRuleFilesystemReadOnly>
    readWrites List<SecureRuleFilesystemReadWrite>
    secureRuleFilesystemId String
    tags List<String>
    A list of tags for this rule.
    timeouts SecureRuleFilesystemTimeouts
    description string
    The description of Secure rule. By default is empty.
    name string
    The name of the Secure rule. It must be unique.
    readOnlies SecureRuleFilesystemReadOnly[]
    readWrites SecureRuleFilesystemReadWrite[]
    secureRuleFilesystemId string
    tags string[]
    A list of tags for this rule.
    timeouts SecureRuleFilesystemTimeouts
    description str
    The description of Secure rule. By default is empty.
    name str
    The name of the Secure rule. It must be unique.
    read_onlies Sequence[SecureRuleFilesystemReadOnlyArgs]
    read_writes Sequence[SecureRuleFilesystemReadWriteArgs]
    secure_rule_filesystem_id str
    tags Sequence[str]
    A list of tags for this rule.
    timeouts SecureRuleFilesystemTimeoutsArgs
    description String
    The description of Secure rule. By default is empty.
    name String
    The name of the Secure rule. It must be unique.
    readOnlies List<Property Map>
    readWrites List<Property Map>
    secureRuleFilesystemId String
    tags List<String>
    A list of tags for this rule.
    timeouts Property Map

    Outputs

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

    Id string
    The provider-assigned unique ID for this managed resource.
    Version double
    Current version of the resource in Sysdig Secure.
    Id string
    The provider-assigned unique ID for this managed resource.
    Version float64
    Current version of the resource in Sysdig Secure.
    id String
    The provider-assigned unique ID for this managed resource.
    version Double
    Current version of the resource in Sysdig Secure.
    id string
    The provider-assigned unique ID for this managed resource.
    version number
    Current version of the resource in Sysdig Secure.
    id str
    The provider-assigned unique ID for this managed resource.
    version float
    Current version of the resource in Sysdig Secure.
    id String
    The provider-assigned unique ID for this managed resource.
    version Number
    Current version of the resource in Sysdig Secure.

    Look up Existing SecureRuleFilesystem Resource

    Get an existing SecureRuleFilesystem 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?: SecureRuleFilesystemState, opts?: CustomResourceOptions): SecureRuleFilesystem
    @staticmethod
    def get(resource_name: str,
            id: str,
            opts: Optional[ResourceOptions] = None,
            description: Optional[str] = None,
            name: Optional[str] = None,
            read_onlies: Optional[Sequence[SecureRuleFilesystemReadOnlyArgs]] = None,
            read_writes: Optional[Sequence[SecureRuleFilesystemReadWriteArgs]] = None,
            secure_rule_filesystem_id: Optional[str] = None,
            tags: Optional[Sequence[str]] = None,
            timeouts: Optional[SecureRuleFilesystemTimeoutsArgs] = None,
            version: Optional[float] = None) -> SecureRuleFilesystem
    func GetSecureRuleFilesystem(ctx *Context, name string, id IDInput, state *SecureRuleFilesystemState, opts ...ResourceOption) (*SecureRuleFilesystem, error)
    public static SecureRuleFilesystem Get(string name, Input<string> id, SecureRuleFilesystemState? state, CustomResourceOptions? opts = null)
    public static SecureRuleFilesystem get(String name, Output<String> id, SecureRuleFilesystemState state, CustomResourceOptions options)
    resources:  _:    type: sysdig:SecureRuleFilesystem    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:
    Description string
    The description of Secure rule. By default is empty.
    Name string
    The name of the Secure rule. It must be unique.
    ReadOnlies List<SecureRuleFilesystemReadOnly>
    ReadWrites List<SecureRuleFilesystemReadWrite>
    SecureRuleFilesystemId string
    Tags List<string>
    A list of tags for this rule.
    Timeouts SecureRuleFilesystemTimeouts
    Version double
    Current version of the resource in Sysdig Secure.
    Description string
    The description of Secure rule. By default is empty.
    Name string
    The name of the Secure rule. It must be unique.
    ReadOnlies []SecureRuleFilesystemReadOnlyArgs
    ReadWrites []SecureRuleFilesystemReadWriteArgs
    SecureRuleFilesystemId string
    Tags []string
    A list of tags for this rule.
    Timeouts SecureRuleFilesystemTimeoutsArgs
    Version float64
    Current version of the resource in Sysdig Secure.
    description String
    The description of Secure rule. By default is empty.
    name String
    The name of the Secure rule. It must be unique.
    readOnlies List<SecureRuleFilesystemReadOnly>
    readWrites List<SecureRuleFilesystemReadWrite>
    secureRuleFilesystemId String
    tags List<String>
    A list of tags for this rule.
    timeouts SecureRuleFilesystemTimeouts
    version Double
    Current version of the resource in Sysdig Secure.
    description string
    The description of Secure rule. By default is empty.
    name string
    The name of the Secure rule. It must be unique.
    readOnlies SecureRuleFilesystemReadOnly[]
    readWrites SecureRuleFilesystemReadWrite[]
    secureRuleFilesystemId string
    tags string[]
    A list of tags for this rule.
    timeouts SecureRuleFilesystemTimeouts
    version number
    Current version of the resource in Sysdig Secure.
    description str
    The description of Secure rule. By default is empty.
    name str
    The name of the Secure rule. It must be unique.
    read_onlies Sequence[SecureRuleFilesystemReadOnlyArgs]
    read_writes Sequence[SecureRuleFilesystemReadWriteArgs]
    secure_rule_filesystem_id str
    tags Sequence[str]
    A list of tags for this rule.
    timeouts SecureRuleFilesystemTimeoutsArgs
    version float
    Current version of the resource in Sysdig Secure.
    description String
    The description of Secure rule. By default is empty.
    name String
    The name of the Secure rule. It must be unique.
    readOnlies List<Property Map>
    readWrites List<Property Map>
    secureRuleFilesystemId String
    tags List<String>
    A list of tags for this rule.
    timeouts Property Map
    version Number
    Current version of the resource in Sysdig Secure.

    Supporting Types

    SecureRuleFilesystemReadOnly, SecureRuleFilesystemReadOnlyArgs

    Paths List<string>
    List of paths to match.
    Matching bool
    Defines if the path matches or not with the provided list. Default is true.
    Paths []string
    List of paths to match.
    Matching bool
    Defines if the path matches or not with the provided list. Default is true.
    paths List<String>
    List of paths to match.
    matching Boolean
    Defines if the path matches or not with the provided list. Default is true.
    paths string[]
    List of paths to match.
    matching boolean
    Defines if the path matches or not with the provided list. Default is true.
    paths Sequence[str]
    List of paths to match.
    matching bool
    Defines if the path matches or not with the provided list. Default is true.
    paths List<String>
    List of paths to match.
    matching Boolean
    Defines if the path matches or not with the provided list. Default is true.

    SecureRuleFilesystemReadWrite, SecureRuleFilesystemReadWriteArgs

    Paths List<string>
    List of paths to match.
    Matching bool
    Defines if the path matches or not with the provided list. Default is true.
    Paths []string
    List of paths to match.
    Matching bool
    Defines if the path matches or not with the provided list. Default is true.
    paths List<String>
    List of paths to match.
    matching Boolean
    Defines if the path matches or not with the provided list. Default is true.
    paths string[]
    List of paths to match.
    matching boolean
    Defines if the path matches or not with the provided list. Default is true.
    paths Sequence[str]
    List of paths to match.
    matching bool
    Defines if the path matches or not with the provided list. Default is true.
    paths List<String>
    List of paths to match.
    matching Boolean
    Defines if the path matches or not with the provided list. Default is true.

    SecureRuleFilesystemTimeouts, SecureRuleFilesystemTimeoutsArgs

    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

    Secure filesystem runtime rules can be imported using the ID, e.g.

    $ pulumi import sysdig:index/secureRuleFilesystem:SecureRuleFilesystem 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.
    sysdig logo
    sysdig 1.53.0 published on Thursday, Apr 17, 2025 by sysdiglabs