1. Packages
  2. CockroachDB Cloud
  3. API Docs
  4. AllowList
CockroachDB v0.8.0 published on Friday, Nov 22, 2024 by pulumiverse

cockroach.AllowList

Explore with Pulumi AI

cockroach logo
CockroachDB v0.8.0 published on Friday, Nov 22, 2024 by pulumiverse

    List of IP ranges allowed to access the cluster.

    Example Usage

    import * as pulumi from "@pulumi/pulumi";
    import * as cockroach from "@pulumiverse/cockroach";
    
    const vpn = new cockroach.AllowList("vpn", {
        name: "vpn",
        cidrIp: "123.123.1.1",
        cidrMask: 32,
        ui: true,
        sql: true,
        clusterId: staging.id,
    });
    
    import pulumi
    import pulumiverse_cockroach as cockroach
    
    vpn = cockroach.AllowList("vpn",
        name="vpn",
        cidr_ip="123.123.1.1",
        cidr_mask=32,
        ui=True,
        sql=True,
        cluster_id=staging["id"])
    
    package main
    
    import (
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    	"github.com/pulumiverse/pulumi-cockroach/sdk/go/cockroach"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		_, err := cockroach.NewAllowList(ctx, "vpn", &cockroach.AllowListArgs{
    			Name:      pulumi.String("vpn"),
    			CidrIp:    pulumi.String("123.123.1.1"),
    			CidrMask:  pulumi.Int(32),
    			Ui:        pulumi.Bool(true),
    			Sql:       pulumi.Bool(true),
    			ClusterId: pulumi.Any(staging.Id),
    		})
    		if err != nil {
    			return err
    		}
    		return nil
    	})
    }
    
    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using Cockroach = Pulumiverse.Cockroach;
    
    return await Deployment.RunAsync(() => 
    {
        var vpn = new Cockroach.AllowList("vpn", new()
        {
            Name = "vpn",
            CidrIp = "123.123.1.1",
            CidrMask = 32,
            Ui = true,
            Sql = true,
            ClusterId = staging.Id,
        });
    
    });
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.cockroach.AllowList;
    import com.pulumi.cockroach.AllowListArgs;
    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 vpn = new AllowList("vpn", AllowListArgs.builder()
                .name("vpn")
                .cidrIp("123.123.1.1")
                .cidrMask(32)
                .ui(true)
                .sql(true)
                .clusterId(staging.id())
                .build());
    
        }
    }
    
    resources:
      vpn:
        type: cockroach:AllowList
        properties:
          name: vpn
          cidrIp: 123.123.1.1
          cidrMask: 32
          ui: true
          sql: true
          clusterId: ${staging.id}
    

    Create AllowList Resource

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

    Constructor syntax

    new AllowList(name: string, args: AllowListArgs, opts?: CustomResourceOptions);
    @overload
    def AllowList(resource_name: str,
                  args: AllowListArgs,
                  opts: Optional[ResourceOptions] = None)
    
    @overload
    def AllowList(resource_name: str,
                  opts: Optional[ResourceOptions] = None,
                  cidr_ip: Optional[str] = None,
                  cidr_mask: Optional[int] = None,
                  cluster_id: Optional[str] = None,
                  sql: Optional[bool] = None,
                  ui: Optional[bool] = None,
                  name: Optional[str] = None)
    func NewAllowList(ctx *Context, name string, args AllowListArgs, opts ...ResourceOption) (*AllowList, error)
    public AllowList(string name, AllowListArgs args, CustomResourceOptions? opts = null)
    public AllowList(String name, AllowListArgs args)
    public AllowList(String name, AllowListArgs args, CustomResourceOptions options)
    
    type: cockroach:AllowList
    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 AllowListArgs
    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 AllowListArgs
    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 AllowListArgs
    The arguments to resource properties.
    opts ResourceOption
    Bag of options to control resource's behavior.
    name string
    The unique name of the resource.
    args AllowListArgs
    The arguments to resource properties.
    opts CustomResourceOptions
    Bag of options to control resource's behavior.
    name String
    The unique name of the resource.
    args AllowListArgs
    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 allowListResource = new Cockroach.AllowList("allowListResource", new()
    {
        CidrIp = "string",
        CidrMask = 0,
        ClusterId = "string",
        Sql = false,
        Ui = false,
        Name = "string",
    });
    
    example, err := cockroach.NewAllowList(ctx, "allowListResource", &cockroach.AllowListArgs{
    	CidrIp:    pulumi.String("string"),
    	CidrMask:  pulumi.Int(0),
    	ClusterId: pulumi.String("string"),
    	Sql:       pulumi.Bool(false),
    	Ui:        pulumi.Bool(false),
    	Name:      pulumi.String("string"),
    })
    
    var allowListResource = new AllowList("allowListResource", AllowListArgs.builder()
        .cidrIp("string")
        .cidrMask(0)
        .clusterId("string")
        .sql(false)
        .ui(false)
        .name("string")
        .build());
    
    allow_list_resource = cockroach.AllowList("allowListResource",
        cidr_ip="string",
        cidr_mask=0,
        cluster_id="string",
        sql=False,
        ui=False,
        name="string")
    
    const allowListResource = new cockroach.AllowList("allowListResource", {
        cidrIp: "string",
        cidrMask: 0,
        clusterId: "string",
        sql: false,
        ui: false,
        name: "string",
    });
    
    type: cockroach:AllowList
    properties:
        cidrIp: string
        cidrMask: 0
        clusterId: string
        name: string
        sql: false
        ui: false
    

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

    CidrIp string
    IP address component of the CIDR range for this entry.
    CidrMask int
    The CIDR notation prefix length. A number ranging from 0 to 32 indicating the size of the network. Use 32 to allow a single IP address.
    ClusterId string
    Sql bool
    Set to 'true' to allow SQL connections from this CIDR range.
    Ui bool
    Set to 'true' to allow access to the management console from this CIDR range.
    Name string
    Name of this allowlist entry. If not set explicitly, this value does not sync with the server.
    CidrIp string
    IP address component of the CIDR range for this entry.
    CidrMask int
    The CIDR notation prefix length. A number ranging from 0 to 32 indicating the size of the network. Use 32 to allow a single IP address.
    ClusterId string
    Sql bool
    Set to 'true' to allow SQL connections from this CIDR range.
    Ui bool
    Set to 'true' to allow access to the management console from this CIDR range.
    Name string
    Name of this allowlist entry. If not set explicitly, this value does not sync with the server.
    cidrIp String
    IP address component of the CIDR range for this entry.
    cidrMask Integer
    The CIDR notation prefix length. A number ranging from 0 to 32 indicating the size of the network. Use 32 to allow a single IP address.
    clusterId String
    sql Boolean
    Set to 'true' to allow SQL connections from this CIDR range.
    ui Boolean
    Set to 'true' to allow access to the management console from this CIDR range.
    name String
    Name of this allowlist entry. If not set explicitly, this value does not sync with the server.
    cidrIp string
    IP address component of the CIDR range for this entry.
    cidrMask number
    The CIDR notation prefix length. A number ranging from 0 to 32 indicating the size of the network. Use 32 to allow a single IP address.
    clusterId string
    sql boolean
    Set to 'true' to allow SQL connections from this CIDR range.
    ui boolean
    Set to 'true' to allow access to the management console from this CIDR range.
    name string
    Name of this allowlist entry. If not set explicitly, this value does not sync with the server.
    cidr_ip str
    IP address component of the CIDR range for this entry.
    cidr_mask int
    The CIDR notation prefix length. A number ranging from 0 to 32 indicating the size of the network. Use 32 to allow a single IP address.
    cluster_id str
    sql bool
    Set to 'true' to allow SQL connections from this CIDR range.
    ui bool
    Set to 'true' to allow access to the management console from this CIDR range.
    name str
    Name of this allowlist entry. If not set explicitly, this value does not sync with the server.
    cidrIp String
    IP address component of the CIDR range for this entry.
    cidrMask Number
    The CIDR notation prefix length. A number ranging from 0 to 32 indicating the size of the network. Use 32 to allow a single IP address.
    clusterId String
    sql Boolean
    Set to 'true' to allow SQL connections from this CIDR range.
    ui Boolean
    Set to 'true' to allow access to the management console from this CIDR range.
    name String
    Name of this allowlist entry. If not set explicitly, this value does not sync with the server.

    Outputs

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

    Get an existing AllowList 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?: AllowListState, opts?: CustomResourceOptions): AllowList
    @staticmethod
    def get(resource_name: str,
            id: str,
            opts: Optional[ResourceOptions] = None,
            cidr_ip: Optional[str] = None,
            cidr_mask: Optional[int] = None,
            cluster_id: Optional[str] = None,
            name: Optional[str] = None,
            sql: Optional[bool] = None,
            ui: Optional[bool] = None) -> AllowList
    func GetAllowList(ctx *Context, name string, id IDInput, state *AllowListState, opts ...ResourceOption) (*AllowList, error)
    public static AllowList Get(string name, Input<string> id, AllowListState? state, CustomResourceOptions? opts = null)
    public static AllowList get(String name, Output<String> id, AllowListState 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:
    CidrIp string
    IP address component of the CIDR range for this entry.
    CidrMask int
    The CIDR notation prefix length. A number ranging from 0 to 32 indicating the size of the network. Use 32 to allow a single IP address.
    ClusterId string
    Name string
    Name of this allowlist entry. If not set explicitly, this value does not sync with the server.
    Sql bool
    Set to 'true' to allow SQL connections from this CIDR range.
    Ui bool
    Set to 'true' to allow access to the management console from this CIDR range.
    CidrIp string
    IP address component of the CIDR range for this entry.
    CidrMask int
    The CIDR notation prefix length. A number ranging from 0 to 32 indicating the size of the network. Use 32 to allow a single IP address.
    ClusterId string
    Name string
    Name of this allowlist entry. If not set explicitly, this value does not sync with the server.
    Sql bool
    Set to 'true' to allow SQL connections from this CIDR range.
    Ui bool
    Set to 'true' to allow access to the management console from this CIDR range.
    cidrIp String
    IP address component of the CIDR range for this entry.
    cidrMask Integer
    The CIDR notation prefix length. A number ranging from 0 to 32 indicating the size of the network. Use 32 to allow a single IP address.
    clusterId String
    name String
    Name of this allowlist entry. If not set explicitly, this value does not sync with the server.
    sql Boolean
    Set to 'true' to allow SQL connections from this CIDR range.
    ui Boolean
    Set to 'true' to allow access to the management console from this CIDR range.
    cidrIp string
    IP address component of the CIDR range for this entry.
    cidrMask number
    The CIDR notation prefix length. A number ranging from 0 to 32 indicating the size of the network. Use 32 to allow a single IP address.
    clusterId string
    name string
    Name of this allowlist entry. If not set explicitly, this value does not sync with the server.
    sql boolean
    Set to 'true' to allow SQL connections from this CIDR range.
    ui boolean
    Set to 'true' to allow access to the management console from this CIDR range.
    cidr_ip str
    IP address component of the CIDR range for this entry.
    cidr_mask int
    The CIDR notation prefix length. A number ranging from 0 to 32 indicating the size of the network. Use 32 to allow a single IP address.
    cluster_id str
    name str
    Name of this allowlist entry. If not set explicitly, this value does not sync with the server.
    sql bool
    Set to 'true' to allow SQL connections from this CIDR range.
    ui bool
    Set to 'true' to allow access to the management console from this CIDR range.
    cidrIp String
    IP address component of the CIDR range for this entry.
    cidrMask Number
    The CIDR notation prefix length. A number ranging from 0 to 32 indicating the size of the network. Use 32 to allow a single IP address.
    clusterId String
    name String
    Name of this allowlist entry. If not set explicitly, this value does not sync with the server.
    sql Boolean
    Set to 'true' to allow SQL connections from this CIDR range.
    ui Boolean
    Set to 'true' to allow access to the management console from this CIDR range.

    Import

    format: :/

    $ pulumi import cockroach:index/allowList:AllowList home_office 1f69fdd2-600a-4cfc-a9ba-16995df0d77d:123.123.1.1/32
    

    To learn more about importing existing cloud resources, see Importing resources.

    Package Details

    Repository
    cockroach pulumiverse/pulumi-cockroach
    License
    Apache-2.0
    Notes
    This Pulumi package is based on the cockroach Terraform Provider.
    cockroach logo
    CockroachDB v0.8.0 published on Friday, Nov 22, 2024 by pulumiverse