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

sysdig.IpFilter

Explore with Pulumi AI

Example Usage

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

const example = new sysdig.IpFilter("example", {
    enabled: true,
    ipRange: "192.168.100.0/24",
    note: "Office IP range",
});
Copy
import pulumi
import pulumi_sysdig as sysdig

example = sysdig.IpFilter("example",
    enabled=True,
    ip_range="192.168.100.0/24",
    note="Office IP range")
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.NewIpFilter(ctx, "example", &sysdig.IpFilterArgs{
			Enabled: pulumi.Bool(true),
			IpRange: pulumi.String("192.168.100.0/24"),
			Note:    pulumi.String("Office IP range"),
		})
		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.IpFilter("example", new()
    {
        Enabled = true,
        IpRange = "192.168.100.0/24",
        Note = "Office IP range",
    });

});
Copy
package generated_program;

import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.sysdig.IpFilter;
import com.pulumi.sysdig.IpFilterArgs;
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 IpFilter("example", IpFilterArgs.builder()
            .enabled(true)
            .ipRange("192.168.100.0/24")
            .note("Office IP range")
            .build());

    }
}
Copy
resources:
  example:
    type: sysdig:IpFilter
    properties:
      enabled: true
      ipRange: 192.168.100.0/24
      note: Office IP range
Copy

This example creates a filter for IP range 192.168.100.0/24, with a note indicating it’s for an office IP range, and it’s enabled.

Create IpFilter Resource

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

Constructor syntax

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

@overload
def IpFilter(resource_name: str,
             opts: Optional[ResourceOptions] = None,
             enabled: Optional[bool] = None,
             ip_range: Optional[str] = None,
             ip_filter_id: Optional[str] = None,
             note: Optional[str] = None)
func NewIpFilter(ctx *Context, name string, args IpFilterArgs, opts ...ResourceOption) (*IpFilter, error)
public IpFilter(string name, IpFilterArgs args, CustomResourceOptions? opts = null)
public IpFilter(String name, IpFilterArgs args)
public IpFilter(String name, IpFilterArgs args, CustomResourceOptions options)
type: sysdig:IpFilter
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. IpFilterArgs
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. IpFilterArgs
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. IpFilterArgs
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. IpFilterArgs
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. IpFilterArgs
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 ipFilterResource = new Sysdig.IpFilter("ipFilterResource", new()
{
    Enabled = false,
    IpRange = "string",
    IpFilterId = "string",
    Note = "string",
});
Copy
example, err := sysdig.NewIpFilter(ctx, "ipFilterResource", &sysdig.IpFilterArgs{
Enabled: pulumi.Bool(false),
IpRange: pulumi.String("string"),
IpFilterId: pulumi.String("string"),
Note: pulumi.String("string"),
})
Copy
var ipFilterResource = new IpFilter("ipFilterResource", IpFilterArgs.builder()
    .enabled(false)
    .ipRange("string")
    .ipFilterId("string")
    .note("string")
    .build());
Copy
ip_filter_resource = sysdig.IpFilter("ipFilterResource",
    enabled=False,
    ip_range="string",
    ip_filter_id="string",
    note="string")
Copy
const ipFilterResource = new sysdig.IpFilter("ipFilterResource", {
    enabled: false,
    ipRange: "string",
    ipFilterId: "string",
    note: "string",
});
Copy
type: sysdig:IpFilter
properties:
    enabled: false
    ipFilterId: string
    ipRange: string
    note: string
Copy

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

Enabled This property is required. bool
Specifies whether the IP range is enabled.
IpRange This property is required. string
The IP range to allow access to the Sysdig platform. Must be in CIDR notation.
IpFilterId string
The ID of the allowed IP range.
Note string
A note describing the allowed IP range.
Enabled This property is required. bool
Specifies whether the IP range is enabled.
IpRange This property is required. string
The IP range to allow access to the Sysdig platform. Must be in CIDR notation.
IpFilterId string
The ID of the allowed IP range.
Note string
A note describing the allowed IP range.
enabled This property is required. Boolean
Specifies whether the IP range is enabled.
ipRange This property is required. String
The IP range to allow access to the Sysdig platform. Must be in CIDR notation.
ipFilterId String
The ID of the allowed IP range.
note String
A note describing the allowed IP range.
enabled This property is required. boolean
Specifies whether the IP range is enabled.
ipRange This property is required. string
The IP range to allow access to the Sysdig platform. Must be in CIDR notation.
ipFilterId string
The ID of the allowed IP range.
note string
A note describing the allowed IP range.
enabled This property is required. bool
Specifies whether the IP range is enabled.
ip_range This property is required. str
The IP range to allow access to the Sysdig platform. Must be in CIDR notation.
ip_filter_id str
The ID of the allowed IP range.
note str
A note describing the allowed IP range.
enabled This property is required. Boolean
Specifies whether the IP range is enabled.
ipRange This property is required. String
The IP range to allow access to the Sysdig platform. Must be in CIDR notation.
ipFilterId String
The ID of the allowed IP range.
note String
A note describing the allowed IP range.

Outputs

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

Get an existing IpFilter 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?: IpFilterState, opts?: CustomResourceOptions): IpFilter
@staticmethod
def get(resource_name: str,
        id: str,
        opts: Optional[ResourceOptions] = None,
        enabled: Optional[bool] = None,
        ip_filter_id: Optional[str] = None,
        ip_range: Optional[str] = None,
        note: Optional[str] = None) -> IpFilter
func GetIpFilter(ctx *Context, name string, id IDInput, state *IpFilterState, opts ...ResourceOption) (*IpFilter, error)
public static IpFilter Get(string name, Input<string> id, IpFilterState? state, CustomResourceOptions? opts = null)
public static IpFilter get(String name, Output<String> id, IpFilterState state, CustomResourceOptions options)
resources:  _:    type: sysdig:IpFilter    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:
Enabled bool
Specifies whether the IP range is enabled.
IpFilterId string
The ID of the allowed IP range.
IpRange string
The IP range to allow access to the Sysdig platform. Must be in CIDR notation.
Note string
A note describing the allowed IP range.
Enabled bool
Specifies whether the IP range is enabled.
IpFilterId string
The ID of the allowed IP range.
IpRange string
The IP range to allow access to the Sysdig platform. Must be in CIDR notation.
Note string
A note describing the allowed IP range.
enabled Boolean
Specifies whether the IP range is enabled.
ipFilterId String
The ID of the allowed IP range.
ipRange String
The IP range to allow access to the Sysdig platform. Must be in CIDR notation.
note String
A note describing the allowed IP range.
enabled boolean
Specifies whether the IP range is enabled.
ipFilterId string
The ID of the allowed IP range.
ipRange string
The IP range to allow access to the Sysdig platform. Must be in CIDR notation.
note string
A note describing the allowed IP range.
enabled bool
Specifies whether the IP range is enabled.
ip_filter_id str
The ID of the allowed IP range.
ip_range str
The IP range to allow access to the Sysdig platform. Must be in CIDR notation.
note str
A note describing the allowed IP range.
enabled Boolean
Specifies whether the IP range is enabled.
ipFilterId String
The ID of the allowed IP range.
ipRange String
The IP range to allow access to the Sysdig platform. Must be in CIDR notation.
note String
A note describing the allowed IP range.

Import

Sysdig IP filter can be imported using the ID, e.g.

$ pulumi import sysdig:index/ipFilter:IpFilter 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.