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],
}],
});
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],
}])
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
})
}
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,
},
},
},
});
});
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());
}
}
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
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 string
- The unique name of the resource.
- args SecureRuleNetworkArgs
- 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 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 string
- The unique name of the resource.
- args SecureRuleNetworkArgs
- The arguments to resource properties.
- opts ResourceOption
- Bag of options to control resource's behavior.
- name string
- The unique name of the resource.
- args SecureRuleNetworkArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- name String
- The unique name of the resource.
- args 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,
},
},
});
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),
},
},
})
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());
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,
}])
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,
}],
});
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
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:
- Block
Inbound bool - Block
Outbound bool - Description string
- The description of Secure rule. By default is empty.
- Name string
- The name of the Secure rule. It must be unique.
- Secure
Rule stringNetwork Id - List<string>
- A list of tags for this rule.
- Tcps
List<Secure
Rule Network Tcp> - Timeouts
Secure
Rule Network Timeouts - Udps
List<Secure
Rule Network Udp>
- Block
Inbound bool - Block
Outbound bool - Description string
- The description of Secure rule. By default is empty.
- Name string
- The name of the Secure rule. It must be unique.
- Secure
Rule stringNetwork Id - []string
- A list of tags for this rule.
- Tcps
[]Secure
Rule Network Tcp Args - Timeouts
Secure
Rule Network Timeouts Args - Udps
[]Secure
Rule Network Udp Args
- block
Inbound Boolean - block
Outbound Boolean - description String
- The description of Secure rule. By default is empty.
- name String
- The name of the Secure rule. It must be unique.
- secure
Rule StringNetwork Id - List<String>
- A list of tags for this rule.
- tcps
List<Secure
Rule Network Tcp> - timeouts
Secure
Rule Network Timeouts - udps
List<Secure
Rule Network Udp>
- block
Inbound boolean - block
Outbound boolean - description string
- The description of Secure rule. By default is empty.
- name string
- The name of the Secure rule. It must be unique.
- secure
Rule stringNetwork Id - string[]
- A list of tags for this rule.
- tcps
Secure
Rule Network Tcp[] - timeouts
Secure
Rule Network Timeouts - udps
Secure
Rule Network Udp[]
- 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_ strnetwork_ id - Sequence[str]
- A list of tags for this rule.
- tcps
Sequence[Secure
Rule Network Tcp Args] - timeouts
Secure
Rule Network Timeouts Args - udps
Sequence[Secure
Rule Network Udp Args]
- block
Inbound Boolean - block
Outbound Boolean - description String
- The description of Secure rule. By default is empty.
- name String
- The name of the Secure rule. It must be unique.
- secure
Rule StringNetwork Id - 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:
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
- 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.
- Block
Inbound bool - Block
Outbound bool - Description string
- The description of Secure rule. By default is empty.
- Name string
- The name of the Secure rule. It must be unique.
- Secure
Rule stringNetwork Id - List<string>
- A list of tags for this rule.
- Tcps
List<Secure
Rule Network Tcp> - Timeouts
Secure
Rule Network Timeouts - Udps
List<Secure
Rule Network Udp> - Version double
- Current version of the resource in Sysdig Secure.
- Block
Inbound bool - Block
Outbound bool - Description string
- The description of Secure rule. By default is empty.
- Name string
- The name of the Secure rule. It must be unique.
- Secure
Rule stringNetwork Id - []string
- A list of tags for this rule.
- Tcps
[]Secure
Rule Network Tcp Args - Timeouts
Secure
Rule Network Timeouts Args - Udps
[]Secure
Rule Network Udp Args - Version float64
- Current version of the resource in Sysdig Secure.
- block
Inbound Boolean - block
Outbound Boolean - description String
- The description of Secure rule. By default is empty.
- name String
- The name of the Secure rule. It must be unique.
- secure
Rule StringNetwork Id - List<String>
- A list of tags for this rule.
- tcps
List<Secure
Rule Network Tcp> - timeouts
Secure
Rule Network Timeouts - udps
List<Secure
Rule Network Udp> - version Double
- Current version of the resource in Sysdig Secure.
- block
Inbound boolean - block
Outbound boolean - description string
- The description of Secure rule. By default is empty.
- name string
- The name of the Secure rule. It must be unique.
- secure
Rule stringNetwork Id - string[]
- A list of tags for this rule.
- tcps
Secure
Rule Network Tcp[] - timeouts
Secure
Rule Network Timeouts - udps
Secure
Rule Network Udp[] - 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_ strnetwork_ id - Sequence[str]
- A list of tags for this rule.
- tcps
Sequence[Secure
Rule Network Tcp Args] - timeouts
Secure
Rule Network Timeouts Args - udps
Sequence[Secure
Rule Network Udp Args] - version float
- Current version of the resource in Sysdig Secure.
- block
Inbound Boolean - block
Outbound Boolean - description String
- The description of Secure rule. By default is empty.
- name String
- The name of the Secure rule. It must be unique.
- secure
Rule StringNetwork Id - 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
SecureRuleNetworkTimeouts, SecureRuleNetworkTimeoutsArgs
SecureRuleNetworkUdp, SecureRuleNetworkUdpArgs
Import
Secure network runtime rules can be imported using the ID, e.g.
$ pulumi import sysdig:index/secureRuleNetwork:SecureRuleNetwork 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.