1. Packages
  2. Datadog Provider
  3. API Docs
  4. IpAllowlist
Datadog v4.34.0 published on Friday, Oct 4, 2024 by Pulumi

datadog.IpAllowlist

Explore with Pulumi AI

datadog logo
Datadog v4.34.0 published on Friday, Oct 4, 2024 by Pulumi

    Provides the Datadog IP allowlist resource. This can be used to manage the Datadog IP allowlist

    Example Usage

    import * as pulumi from "@pulumi/pulumi";
    import * as datadog from "@pulumi/datadog";
    
    const example = new datadog.IpAllowlist("example", {
        enabled: false,
        entries: [
            {
                cidrBlock: "127.0.0.0/32",
                note: "1st Example IP Range",
            },
            {
                cidrBlock: "192.0.2.0/24",
                note: "2nd Example IP Range",
            },
        ],
    });
    
    import pulumi
    import pulumi_datadog as datadog
    
    example = datadog.IpAllowlist("example",
        enabled=False,
        entries=[
            {
                "cidr_block": "127.0.0.0/32",
                "note": "1st Example IP Range",
            },
            {
                "cidr_block": "192.0.2.0/24",
                "note": "2nd Example IP Range",
            },
        ])
    
    package main
    
    import (
    	"github.com/pulumi/pulumi-datadog/sdk/v4/go/datadog"
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		_, err := datadog.NewIpAllowlist(ctx, "example", &datadog.IpAllowlistArgs{
    			Enabled: pulumi.Bool(false),
    			Entries: datadog.IpAllowlistEntryArray{
    				&datadog.IpAllowlistEntryArgs{
    					CidrBlock: pulumi.String("127.0.0.0/32"),
    					Note:      pulumi.String("1st Example IP Range"),
    				},
    				&datadog.IpAllowlistEntryArgs{
    					CidrBlock: pulumi.String("192.0.2.0/24"),
    					Note:      pulumi.String("2nd Example IP Range"),
    				},
    			},
    		})
    		if err != nil {
    			return err
    		}
    		return nil
    	})
    }
    
    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using Datadog = Pulumi.Datadog;
    
    return await Deployment.RunAsync(() => 
    {
        var example = new Datadog.IpAllowlist("example", new()
        {
            Enabled = false,
            Entries = new[]
            {
                new Datadog.Inputs.IpAllowlistEntryArgs
                {
                    CidrBlock = "127.0.0.0/32",
                    Note = "1st Example IP Range",
                },
                new Datadog.Inputs.IpAllowlistEntryArgs
                {
                    CidrBlock = "192.0.2.0/24",
                    Note = "2nd Example IP Range",
                },
            },
        });
    
    });
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.datadog.IpAllowlist;
    import com.pulumi.datadog.IpAllowlistArgs;
    import com.pulumi.datadog.inputs.IpAllowlistEntryArgs;
    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 IpAllowlist("example", IpAllowlistArgs.builder()
                .enabled(false)
                .entries(            
                    IpAllowlistEntryArgs.builder()
                        .cidrBlock("127.0.0.0/32")
                        .note("1st Example IP Range")
                        .build(),
                    IpAllowlistEntryArgs.builder()
                        .cidrBlock("192.0.2.0/24")
                        .note("2nd Example IP Range")
                        .build())
                .build());
    
        }
    }
    
    resources:
      example:
        type: datadog:IpAllowlist
        properties:
          enabled: false
          entries:
            - cidrBlock: 127.0.0.0/32
              note: 1st Example IP Range
            - cidrBlock: 192.0.2.0/24
              note: 2nd Example IP Range
    

    Create IpAllowlist Resource

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

    Constructor syntax

    new IpAllowlist(name: string, args: IpAllowlistArgs, opts?: CustomResourceOptions);
    @overload
    def IpAllowlist(resource_name: str,
                    args: IpAllowlistArgs,
                    opts: Optional[ResourceOptions] = None)
    
    @overload
    def IpAllowlist(resource_name: str,
                    opts: Optional[ResourceOptions] = None,
                    enabled: Optional[bool] = None,
                    entries: Optional[Sequence[IpAllowlistEntryArgs]] = None)
    func NewIpAllowlist(ctx *Context, name string, args IpAllowlistArgs, opts ...ResourceOption) (*IpAllowlist, error)
    public IpAllowlist(string name, IpAllowlistArgs args, CustomResourceOptions? opts = null)
    public IpAllowlist(String name, IpAllowlistArgs args)
    public IpAllowlist(String name, IpAllowlistArgs args, CustomResourceOptions options)
    
    type: datadog:IpAllowlist
    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 IpAllowlistArgs
    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 IpAllowlistArgs
    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 IpAllowlistArgs
    The arguments to resource properties.
    opts ResourceOption
    Bag of options to control resource's behavior.
    name string
    The unique name of the resource.
    args IpAllowlistArgs
    The arguments to resource properties.
    opts CustomResourceOptions
    Bag of options to control resource's behavior.
    name String
    The unique name of the resource.
    args IpAllowlistArgs
    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 ipAllowlistResource = new Datadog.IpAllowlist("ipAllowlistResource", new()
    {
        Enabled = false,
        Entries = new[]
        {
            new Datadog.Inputs.IpAllowlistEntryArgs
            {
                CidrBlock = "string",
                Note = "string",
            },
        },
    });
    
    example, err := datadog.NewIpAllowlist(ctx, "ipAllowlistResource", &datadog.IpAllowlistArgs{
    	Enabled: pulumi.Bool(false),
    	Entries: datadog.IpAllowlistEntryArray{
    		&datadog.IpAllowlistEntryArgs{
    			CidrBlock: pulumi.String("string"),
    			Note:      pulumi.String("string"),
    		},
    	},
    })
    
    var ipAllowlistResource = new IpAllowlist("ipAllowlistResource", IpAllowlistArgs.builder()
        .enabled(false)
        .entries(IpAllowlistEntryArgs.builder()
            .cidrBlock("string")
            .note("string")
            .build())
        .build());
    
    ip_allowlist_resource = datadog.IpAllowlist("ipAllowlistResource",
        enabled=False,
        entries=[datadog.IpAllowlistEntryArgs(
            cidr_block="string",
            note="string",
        )])
    
    const ipAllowlistResource = new datadog.IpAllowlist("ipAllowlistResource", {
        enabled: false,
        entries: [{
            cidrBlock: "string",
            note: "string",
        }],
    });
    
    type: datadog:IpAllowlist
    properties:
        enabled: false
        entries:
            - cidrBlock: string
              note: string
    

    IpAllowlist Resource Properties

    To learn more about resource properties and how to use them, see Inputs and Outputs in the Architecture and Concepts docs.

    Inputs

    The IpAllowlist resource accepts the following input properties:

    Enabled bool
    Whether the IP Allowlist is enabled.
    Entries List<IpAllowlistEntry>
    Set of objects containing an IP address or range of IP addresses in the allowlist and an accompanying note.
    Enabled bool
    Whether the IP Allowlist is enabled.
    Entries []IpAllowlistEntryArgs
    Set of objects containing an IP address or range of IP addresses in the allowlist and an accompanying note.
    enabled Boolean
    Whether the IP Allowlist is enabled.
    entries List<IpAllowlistEntry>
    Set of objects containing an IP address or range of IP addresses in the allowlist and an accompanying note.
    enabled boolean
    Whether the IP Allowlist is enabled.
    entries IpAllowlistEntry[]
    Set of objects containing an IP address or range of IP addresses in the allowlist and an accompanying note.
    enabled bool
    Whether the IP Allowlist is enabled.
    entries Sequence[IpAllowlistEntryArgs]
    Set of objects containing an IP address or range of IP addresses in the allowlist and an accompanying note.
    enabled Boolean
    Whether the IP Allowlist is enabled.
    entries List<Property Map>
    Set of objects containing an IP address or range of IP addresses in the allowlist and an accompanying note.

    Outputs

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

    Get an existing IpAllowlist 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?: IpAllowlistState, opts?: CustomResourceOptions): IpAllowlist
    @staticmethod
    def get(resource_name: str,
            id: str,
            opts: Optional[ResourceOptions] = None,
            enabled: Optional[bool] = None,
            entries: Optional[Sequence[IpAllowlistEntryArgs]] = None) -> IpAllowlist
    func GetIpAllowlist(ctx *Context, name string, id IDInput, state *IpAllowlistState, opts ...ResourceOption) (*IpAllowlist, error)
    public static IpAllowlist Get(string name, Input<string> id, IpAllowlistState? state, CustomResourceOptions? opts = null)
    public static IpAllowlist get(String name, Output<String> id, IpAllowlistState state, CustomResourceOptions options)
    Resource lookup is not supported in YAML
    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:
    Enabled bool
    Whether the IP Allowlist is enabled.
    Entries List<IpAllowlistEntry>
    Set of objects containing an IP address or range of IP addresses in the allowlist and an accompanying note.
    Enabled bool
    Whether the IP Allowlist is enabled.
    Entries []IpAllowlistEntryArgs
    Set of objects containing an IP address or range of IP addresses in the allowlist and an accompanying note.
    enabled Boolean
    Whether the IP Allowlist is enabled.
    entries List<IpAllowlistEntry>
    Set of objects containing an IP address or range of IP addresses in the allowlist and an accompanying note.
    enabled boolean
    Whether the IP Allowlist is enabled.
    entries IpAllowlistEntry[]
    Set of objects containing an IP address or range of IP addresses in the allowlist and an accompanying note.
    enabled bool
    Whether the IP Allowlist is enabled.
    entries Sequence[IpAllowlistEntryArgs]
    Set of objects containing an IP address or range of IP addresses in the allowlist and an accompanying note.
    enabled Boolean
    Whether the IP Allowlist is enabled.
    entries List<Property Map>
    Set of objects containing an IP address or range of IP addresses in the allowlist and an accompanying note.

    Supporting Types

    IpAllowlistEntry, IpAllowlistEntryArgs

    CidrBlock string
    IP address or range of addresses.
    Note string
    Note accompanying IP address.
    CidrBlock string
    IP address or range of addresses.
    Note string
    Note accompanying IP address.
    cidrBlock String
    IP address or range of addresses.
    note String
    Note accompanying IP address.
    cidrBlock string
    IP address or range of addresses.
    note string
    Note accompanying IP address.
    cidr_block str
    IP address or range of addresses.
    note str
    Note accompanying IP address.
    cidrBlock String
    IP address or range of addresses.
    note String
    Note accompanying IP address.

    Package Details

    Repository
    Datadog pulumi/pulumi-datadog
    License
    Apache-2.0
    Notes
    This Pulumi package is based on the datadog Terraform Provider.
    datadog logo
    Datadog v4.34.0 published on Friday, Oct 4, 2024 by Pulumi