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

sysdig.SecureRuleNetwork

Explore with Pulumi AI

Example Usage

import * as pulumi from "@pulumi/pulumi";
import * as sysdig from "@pulumi/sysdig";

const example = new sysdig.SecureRuleNetwork("example", {
    blockInbound: true,
    blockOutbound: true,
    description: "Detect any new ssh connection to a host other than those in an allowed group of hosts",
    tags: [
        "network",
        "mitre_remote_service",
    ],
    tcps: [{
        matching: true,
        ports: [22],
    }],
    udps: [{
        matching: true,
        ports: [22],
    }],
});
Copy
import pulumi
import pulumi_sysdig as sysdig

example = sysdig.SecureRuleNetwork("example",
    block_inbound=True,
    block_outbound=True,
    description="Detect any new ssh connection to a host other than those in an allowed group of hosts",
    tags=[
        "network",
        "mitre_remote_service",
    ],
    tcps=[{
        "matching": True,
        "ports": [22],
    }],
    udps=[{
        "matching": True,
        "ports": [22],
    }])
Copy
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.NewSecureRuleNetwork(ctx, "example", &sysdig.SecureRuleNetworkArgs{
			BlockInbound:  pulumi.Bool(true),
			BlockOutbound: pulumi.Bool(true),
			Description:   pulumi.String("Detect any new ssh connection to a host other than those in an allowed group of hosts"),
			Tags: pulumi.StringArray{
				pulumi.String("network"),
				pulumi.String("mitre_remote_service"),
			},
			Tcps: sysdig.SecureRuleNetworkTcpArray{
				&sysdig.SecureRuleNetworkTcpArgs{
					Matching: pulumi.Bool(true),
					Ports: pulumi.Float64Array{
						pulumi.Float64(22),
					},
				},
			},
			Udps: sysdig.SecureRuleNetworkUdpArray{
				&sysdig.SecureRuleNetworkUdpArgs{
					Matching: pulumi.Bool(true),
					Ports: pulumi.Float64Array{
						pulumi.Float64(22),
					},
				},
			},
		})
		if err != nil {
			return err
		}
		return nil
	})
}
Copy
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Sysdig = Pulumi.Sysdig;

return await Deployment.RunAsync(() => 
{
    var example = new Sysdig.SecureRuleNetwork("example", new()
    {
        BlockInbound = true,
        BlockOutbound = true,
        Description = "Detect any new ssh connection to a host other than those in an allowed group of hosts",
        Tags = new[]
        {
            "network",
            "mitre_remote_service",
        },
        Tcps = new[]
        {
            new Sysdig.Inputs.SecureRuleNetworkTcpArgs
            {
                Matching = true,
                Ports = new[]
                {
                    22,
                },
            },
        },
        Udps = new[]
        {
            new Sysdig.Inputs.SecureRuleNetworkUdpArgs
            {
                Matching = true,
                Ports = new[]
                {
                    22,
                },
            },
        },
    });

});
Copy
package generated_program;

import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.sysdig.SecureRuleNetwork;
import com.pulumi.sysdig.SecureRuleNetworkArgs;
import com.pulumi.sysdig.inputs.SecureRuleNetworkTcpArgs;
import com.pulumi.sysdig.inputs.SecureRuleNetworkUdpArgs;
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 SecureRuleNetwork("example", SecureRuleNetworkArgs.builder()
            .blockInbound(true)
            .blockOutbound(true)
            .description("Detect any new ssh connection to a host other than those in an allowed group of hosts")
            .tags(            
                "network",
                "mitre_remote_service")
            .tcps(SecureRuleNetworkTcpArgs.builder()
                .matching(true)
                .ports(22)
                .build())
            .udps(SecureRuleNetworkUdpArgs.builder()
                .matching(true)
                .ports(22)
                .build())
            .build());

    }
}
Copy
resources:
  example:
    type: sysdig:SecureRuleNetwork
    properties:
      blockInbound: true
      blockOutbound: true
      description: Detect any new ssh connection to a host other than those in an allowed group of hosts
      tags:
        - network
        - mitre_remote_service
      tcps:
        - matching: true
          ports:
            - 22
      udps:
        - matching: true
          ports:
            - 22
Copy

Create SecureRuleNetwork Resource

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

Constructor syntax

new SecureRuleNetwork(name: string, args: SecureRuleNetworkArgs, opts?: CustomResourceOptions);
@overload
def SecureRuleNetwork(resource_name: str,
                      args: SecureRuleNetworkArgs,
                      opts: Optional[ResourceOptions] = None)

@overload
def SecureRuleNetwork(resource_name: str,
                      opts: Optional[ResourceOptions] = None,
                      block_inbound: Optional[bool] = None,
                      block_outbound: Optional[bool] = None,
                      description: Optional[str] = None,
                      name: Optional[str] = None,
                      secure_rule_network_id: Optional[str] = None,
                      tags: Optional[Sequence[str]] = None,
                      tcps: Optional[Sequence[SecureRuleNetworkTcpArgs]] = None,
                      timeouts: Optional[SecureRuleNetworkTimeoutsArgs] = None,
                      udps: Optional[Sequence[SecureRuleNetworkUdpArgs]] = None)
func NewSecureRuleNetwork(ctx *Context, name string, args SecureRuleNetworkArgs, opts ...ResourceOption) (*SecureRuleNetwork, error)
public SecureRuleNetwork(string name, SecureRuleNetworkArgs args, CustomResourceOptions? opts = null)
public SecureRuleNetwork(String name, SecureRuleNetworkArgs args)
public SecureRuleNetwork(String name, SecureRuleNetworkArgs args, CustomResourceOptions options)
type: sysdig:SecureRuleNetwork
properties: # The arguments to resource properties.
options: # Bag of options to control resource's behavior.

Parameters

name This property is required. string
The unique name of the resource.
args This property is required. SecureRuleNetworkArgs
The arguments to resource properties.
opts CustomResourceOptions
Bag of options to control resource's behavior.
resource_name This property is required. str
The unique name of the resource.
args This property is required. SecureRuleNetworkArgs
The arguments to resource properties.
opts ResourceOptions
Bag of options to control resource's behavior.
ctx Context
Context object for the current deployment.
name This property is required. string
The unique name of the resource.
args This property is required. SecureRuleNetworkArgs
The arguments to resource properties.
opts ResourceOption
Bag of options to control resource's behavior.
name This property is required. string
The unique name of the resource.
args This property is required. SecureRuleNetworkArgs
The arguments to resource properties.
opts CustomResourceOptions
Bag of options to control resource's behavior.
name This property is required. String
The unique name of the resource.
args This property is required. SecureRuleNetworkArgs
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 secureRuleNetworkResource = new Sysdig.SecureRuleNetwork("secureRuleNetworkResource", new()
{
    BlockInbound = false,
    BlockOutbound = false,
    Description = "string",
    Name = "string",
    SecureRuleNetworkId = "string",
    Tags = new[]
    {
        "string",
    },
    Tcps = new[]
    {
        new Sysdig.Inputs.SecureRuleNetworkTcpArgs
        {
            Ports = new[]
            {
                0,
            },
            Matching = false,
        },
    },
    Timeouts = new Sysdig.Inputs.SecureRuleNetworkTimeoutsArgs
    {
        Create = "string",
        Delete = "string",
        Read = "string",
        Update = "string",
    },
    Udps = new[]
    {
        new Sysdig.Inputs.SecureRuleNetworkUdpArgs
        {
            Ports = new[]
            {
                0,
            },
            Matching = false,
        },
    },
});
Copy
example, err := sysdig.NewSecureRuleNetwork(ctx, "secureRuleNetworkResource", &sysdig.SecureRuleNetworkArgs{
	BlockInbound:        pulumi.Bool(false),
	BlockOutbound:       pulumi.Bool(false),
	Description:         pulumi.String("string"),
	Name:                pulumi.String("string"),
	SecureRuleNetworkId: pulumi.String("string"),
	Tags: pulumi.StringArray{
		pulumi.String("string"),
	},
	Tcps: sysdig.SecureRuleNetworkTcpArray{
		&sysdig.SecureRuleNetworkTcpArgs{
			Ports: pulumi.Float64Array{
				pulumi.Float64(0),
			},
			Matching: pulumi.Bool(false),
		},
	},
	Timeouts: &sysdig.SecureRuleNetworkTimeoutsArgs{
		Create: pulumi.String("string"),
		Delete: pulumi.String("string"),
		Read:   pulumi.String("string"),
		Update: pulumi.String("string"),
	},
	Udps: sysdig.SecureRuleNetworkUdpArray{
		&sysdig.SecureRuleNetworkUdpArgs{
			Ports: pulumi.Float64Array{
				pulumi.Float64(0),
			},
			Matching: pulumi.Bool(false),
		},
	},
})
Copy
var secureRuleNetworkResource = new SecureRuleNetwork("secureRuleNetworkResource", SecureRuleNetworkArgs.builder()
    .blockInbound(false)
    .blockOutbound(false)
    .description("string")
    .name("string")
    .secureRuleNetworkId("string")
    .tags("string")
    .tcps(SecureRuleNetworkTcpArgs.builder()
        .ports(0)
        .matching(false)
        .build())
    .timeouts(SecureRuleNetworkTimeoutsArgs.builder()
        .create("string")
        .delete("string")
        .read("string")
        .update("string")
        .build())
    .udps(SecureRuleNetworkUdpArgs.builder()
        .ports(0)
        .matching(false)
        .build())
    .build());
Copy
secure_rule_network_resource = sysdig.SecureRuleNetwork("secureRuleNetworkResource",
    block_inbound=False,
    block_outbound=False,
    description="string",
    name="string",
    secure_rule_network_id="string",
    tags=["string"],
    tcps=[{
        "ports": [0],
        "matching": False,
    }],
    timeouts={
        "create": "string",
        "delete": "string",
        "read": "string",
        "update": "string",
    },
    udps=[{
        "ports": [0],
        "matching": False,
    }])
Copy
const secureRuleNetworkResource = new sysdig.SecureRuleNetwork("secureRuleNetworkResource", {
    blockInbound: false,
    blockOutbound: false,
    description: "string",
    name: "string",
    secureRuleNetworkId: "string",
    tags: ["string"],
    tcps: [{
        ports: [0],
        matching: false,
    }],
    timeouts: {
        create: "string",
        "delete": "string",
        read: "string",
        update: "string",
    },
    udps: [{
        ports: [0],
        matching: false,
    }],
});
Copy
type: sysdig:SecureRuleNetwork
properties:
    blockInbound: false
    blockOutbound: false
    description: string
    name: string
    secureRuleNetworkId: string
    tags:
        - string
    tcps:
        - matching: false
          ports:
            - 0
    timeouts:
        create: string
        delete: string
        read: string
        update: string
    udps:
        - matching: false
          ports:
            - 0
Copy

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

BlockInbound This property is required. bool
BlockOutbound This property is required. bool
Description string
The description of Secure rule. By default is empty.
Name string
The name of the Secure rule. It must be unique.
SecureRuleNetworkId string
Tags List<string>
A list of tags for this rule.
Tcps List<SecureRuleNetworkTcp>
Timeouts SecureRuleNetworkTimeouts
Udps List<SecureRuleNetworkUdp>
BlockInbound This property is required. bool
BlockOutbound This property is required. bool
Description string
The description of Secure rule. By default is empty.
Name string
The name of the Secure rule. It must be unique.
SecureRuleNetworkId string
Tags []string
A list of tags for this rule.
Tcps []SecureRuleNetworkTcpArgs
Timeouts SecureRuleNetworkTimeoutsArgs
Udps []SecureRuleNetworkUdpArgs
blockInbound This property is required. Boolean
blockOutbound This property is required. Boolean
description String
The description of Secure rule. By default is empty.
name String
The name of the Secure rule. It must be unique.
secureRuleNetworkId String
tags List<String>
A list of tags for this rule.
tcps List<SecureRuleNetworkTcp>
timeouts SecureRuleNetworkTimeouts
udps List<SecureRuleNetworkUdp>
blockInbound This property is required. boolean
blockOutbound This property is required. boolean
description string
The description of Secure rule. By default is empty.
name string
The name of the Secure rule. It must be unique.
secureRuleNetworkId string
tags string[]
A list of tags for this rule.
tcps SecureRuleNetworkTcp[]
timeouts SecureRuleNetworkTimeouts
udps SecureRuleNetworkUdp[]
block_inbound This property is required. bool
block_outbound This property is required. bool
description str
The description of Secure rule. By default is empty.
name str
The name of the Secure rule. It must be unique.
secure_rule_network_id str
tags Sequence[str]
A list of tags for this rule.
tcps Sequence[SecureRuleNetworkTcpArgs]
timeouts SecureRuleNetworkTimeoutsArgs
udps Sequence[SecureRuleNetworkUdpArgs]
blockInbound This property is required. Boolean
blockOutbound This property is required. Boolean
description String
The description of Secure rule. By default is empty.
name String
The name of the Secure rule. It must be unique.
secureRuleNetworkId String
tags List<String>
A list of tags for this rule.
tcps List<Property Map>
timeouts Property Map
udps List<Property Map>

Outputs

All input properties are implicitly available as output properties. Additionally, the SecureRuleNetwork 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 SecureRuleNetwork Resource

Get an existing SecureRuleNetwork 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?: SecureRuleNetworkState, opts?: CustomResourceOptions): SecureRuleNetwork
@staticmethod
def get(resource_name: str,
        id: str,
        opts: Optional[ResourceOptions] = None,
        block_inbound: Optional[bool] = None,
        block_outbound: Optional[bool] = None,
        description: Optional[str] = None,
        name: Optional[str] = None,
        secure_rule_network_id: Optional[str] = None,
        tags: Optional[Sequence[str]] = None,
        tcps: Optional[Sequence[SecureRuleNetworkTcpArgs]] = None,
        timeouts: Optional[SecureRuleNetworkTimeoutsArgs] = None,
        udps: Optional[Sequence[SecureRuleNetworkUdpArgs]] = None,
        version: Optional[float] = None) -> SecureRuleNetwork
func GetSecureRuleNetwork(ctx *Context, name string, id IDInput, state *SecureRuleNetworkState, opts ...ResourceOption) (*SecureRuleNetwork, error)
public static SecureRuleNetwork Get(string name, Input<string> id, SecureRuleNetworkState? state, CustomResourceOptions? opts = null)
public static SecureRuleNetwork get(String name, Output<String> id, SecureRuleNetworkState state, CustomResourceOptions options)
resources:  _:    type: sysdig:SecureRuleNetwork    get:      id: ${id}
name This property is required.
The unique name of the resulting resource.
id This property is required.
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 This property is required.
The unique name of the resulting resource.
id This property is required.
The unique provider ID of the resource to lookup.
name This property is required.
The unique name of the resulting resource.
id This property is required.
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 This property is required.
The unique name of the resulting resource.
id This property is required.
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 This property is required.
The unique name of the resulting resource.
id This property is required.
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:
BlockInbound bool
BlockOutbound bool
Description string
The description of Secure rule. By default is empty.
Name string
The name of the Secure rule. It must be unique.
SecureRuleNetworkId string
Tags List<string>
A list of tags for this rule.
Tcps List<SecureRuleNetworkTcp>
Timeouts SecureRuleNetworkTimeouts
Udps List<SecureRuleNetworkUdp>
Version double
Current version of the resource in Sysdig Secure.
BlockInbound bool
BlockOutbound bool
Description string
The description of Secure rule. By default is empty.
Name string
The name of the Secure rule. It must be unique.
SecureRuleNetworkId string
Tags []string
A list of tags for this rule.
Tcps []SecureRuleNetworkTcpArgs
Timeouts SecureRuleNetworkTimeoutsArgs
Udps []SecureRuleNetworkUdpArgs
Version float64
Current version of the resource in Sysdig Secure.
blockInbound Boolean
blockOutbound Boolean
description String
The description of Secure rule. By default is empty.
name String
The name of the Secure rule. It must be unique.
secureRuleNetworkId String
tags List<String>
A list of tags for this rule.
tcps List<SecureRuleNetworkTcp>
timeouts SecureRuleNetworkTimeouts
udps List<SecureRuleNetworkUdp>
version Double
Current version of the resource in Sysdig Secure.
blockInbound boolean
blockOutbound boolean
description string
The description of Secure rule. By default is empty.
name string
The name of the Secure rule. It must be unique.
secureRuleNetworkId string
tags string[]
A list of tags for this rule.
tcps SecureRuleNetworkTcp[]
timeouts SecureRuleNetworkTimeouts
udps SecureRuleNetworkUdp[]
version number
Current version of the resource in Sysdig Secure.
block_inbound bool
block_outbound bool
description str
The description of Secure rule. By default is empty.
name str
The name of the Secure rule. It must be unique.
secure_rule_network_id str
tags Sequence[str]
A list of tags for this rule.
tcps Sequence[SecureRuleNetworkTcpArgs]
timeouts SecureRuleNetworkTimeoutsArgs
udps Sequence[SecureRuleNetworkUdpArgs]
version float
Current version of the resource in Sysdig Secure.
blockInbound Boolean
blockOutbound Boolean
description String
The description of Secure rule. By default is empty.
name String
The name of the Secure rule. It must be unique.
secureRuleNetworkId String
tags List<String>
A list of tags for this rule.
tcps List<Property Map>
timeouts Property Map
udps List<Property Map>
version Number
Current version of the resource in Sysdig Secure.

Supporting Types

SecureRuleNetworkTcp
, SecureRuleNetworkTcpArgs

Ports This property is required. List<double>
Matching bool
Ports This property is required. []float64
Matching bool
ports This property is required. List<Double>
matching Boolean
ports This property is required. number[]
matching boolean
ports This property is required. Sequence[float]
matching bool
ports This property is required. List<Number>
matching Boolean

SecureRuleNetworkTimeouts
, SecureRuleNetworkTimeoutsArgs

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

SecureRuleNetworkUdp
, SecureRuleNetworkUdpArgs

Ports This property is required. List<double>
Matching bool
Ports This property is required. []float64
Matching bool
ports This property is required. List<Double>
matching Boolean
ports This property is required. number[]
matching boolean
ports This property is required. Sequence[float]
matching bool
ports This property is required. List<Number>
matching Boolean

Import

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

$ pulumi import sysdig:index/secureRuleNetwork:SecureRuleNetwork example 12345
Copy

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.