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",
});
import pulumi
import pulumi_sysdig as sysdig
example = sysdig.IpFilter("example",
enabled=True,
ip_range="192.168.100.0/24",
note="Office IP range")
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
})
}
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",
});
});
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());
}
}
resources:
example:
type: sysdig:IpFilter
properties:
enabled: true
ipRange: 192.168.100.0/24
note: Office IP range
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 string
- The unique name of the resource.
- args IpFilterArgs
- 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 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 string
- The unique name of the resource.
- args IpFilterArgs
- The arguments to resource properties.
- opts ResourceOption
- Bag of options to control resource's behavior.
- name string
- The unique name of the resource.
- args IpFilterArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- name String
- The unique name of the resource.
- args 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",
});
example, err := sysdig.NewIpFilter(ctx, "ipFilterResource", &sysdig.IpFilterArgs{
Enabled: pulumi.Bool(false),
IpRange: pulumi.String("string"),
IpFilterId: pulumi.String("string"),
Note: pulumi.String("string"),
})
var ipFilterResource = new IpFilter("ipFilterResource", IpFilterArgs.builder()
.enabled(false)
.ipRange("string")
.ipFilterId("string")
.note("string")
.build());
ip_filter_resource = sysdig.IpFilter("ipFilterResource",
enabled=False,
ip_range="string",
ip_filter_id="string",
note="string")
const ipFilterResource = new sysdig.IpFilter("ipFilterResource", {
enabled: false,
ipRange: "string",
ipFilterId: "string",
note: "string",
});
type: sysdig:IpFilter
properties:
enabled: false
ipFilterId: string
ipRange: string
note: string
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 bool
- Specifies whether the IP range is enabled.
- Ip
Range string - The IP range to allow access to the Sysdig platform. Must be in CIDR notation.
- Ip
Filter stringId - The ID of the allowed IP range.
- Note string
- A note describing the allowed IP range.
- Enabled bool
- Specifies whether the IP range is enabled.
- Ip
Range string - The IP range to allow access to the Sysdig platform. Must be in CIDR notation.
- Ip
Filter stringId - The ID of the allowed IP range.
- Note string
- A note describing the allowed IP range.
- enabled Boolean
- Specifies whether the IP range is enabled.
- ip
Range String - The IP range to allow access to the Sysdig platform. Must be in CIDR notation.
- ip
Filter StringId - The ID of the allowed IP range.
- note String
- A note describing the allowed IP range.
- enabled boolean
- Specifies whether the IP range is enabled.
- ip
Range string - The IP range to allow access to the Sysdig platform. Must be in CIDR notation.
- ip
Filter stringId - The ID of the allowed IP range.
- note string
- A note describing the allowed IP range.
- enabled bool
- Specifies whether the IP range is enabled.
- ip_
range str - The IP range to allow access to the Sysdig platform. Must be in CIDR notation.
- ip_
filter_ strid - The ID of the allowed IP range.
- note str
- A note describing the allowed IP range.
- enabled Boolean
- Specifies whether the IP range is enabled.
- ip
Range String - The IP range to allow access to the Sysdig platform. Must be in CIDR notation.
- ip
Filter StringId - 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
- 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.
- Enabled bool
- Specifies whether the IP range is enabled.
- Ip
Filter stringId - The ID of the allowed IP range.
- Ip
Range 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 stringId - The ID of the allowed IP range.
- Ip
Range 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.
- ip
Filter StringId - The ID of the allowed IP range.
- ip
Range 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.
- ip
Filter stringId - The ID of the allowed IP range.
- ip
Range 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_ strid - 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.
- ip
Filter StringId - The ID of the allowed IP range.
- ip
Range 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
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.