1. Packages
  2. Alibaba Cloud Provider
  3. API Docs
  4. clickhouseenterprisedbcluster
  5. SecurityIp
Alibaba Cloud v3.76.0 published on Tuesday, Apr 8, 2025 by Pulumi

alicloud.clickhouseenterprisedbcluster.SecurityIp

Explore with Pulumi AI

alicloud logo
Alibaba Cloud v3.76.0 published on Tuesday, Apr 8, 2025 by Pulumi

    Provides a Click House Enterprise Db Cluster Security I P resource.

    Enterprise Clickhouse instance Security IP.

    For information about Click House Enterprise Db Cluster Security I P and how to use it, see What is Enterprise Db Cluster Security I P.

    NOTE: Available since v1.247.0.

    Example Usage

    Basic Usage

    import * as pulumi from "@pulumi/pulumi";
    import * as alicloud from "@pulumi/alicloud";
    
    const config = new pulumi.Config();
    const name = config.get("name") || "terraform-example";
    const regionId = config.get("regionId") || "cn-beijing";
    const vswIpRangeI = config.get("vswIpRangeI") || "172.16.1.0/24";
    const vpcIpRange = config.get("vpcIpRange") || "172.16.0.0/12";
    const zoneIdI = config.get("zoneIdI") || "cn-beijing-i";
    const defaultktKLuM = new alicloud.vpc.Network("defaultktKLuM", {cidrBlock: vpcIpRange});
    const defaultTQWN3k = new alicloud.vpc.Switch("defaultTQWN3k", {
        vpcId: defaultktKLuM.id,
        zoneId: zoneIdI,
        cidrBlock: vswIpRangeI,
    });
    const defaultn0nVrN = new alicloud.clickhouseenterprisedbcluster.ClickHouseEnterpriseDbCluster("defaultn0nVrN", {
        zoneId: zoneIdI,
        vpcId: defaultktKLuM.id,
        scaleMin: "8",
        scaleMax: "16",
        vswitchId: defaultTQWN3k.id,
    });
    const _default = new alicloud.clickhouseenterprisedbcluster.SecurityIp("default", {
        groupName: "example_group",
        securityIpList: "127.0.0.2",
        dbInstanceId: defaultn0nVrN.id,
    });
    
    import pulumi
    import pulumi_alicloud as alicloud
    
    config = pulumi.Config()
    name = config.get("name")
    if name is None:
        name = "terraform-example"
    region_id = config.get("regionId")
    if region_id is None:
        region_id = "cn-beijing"
    vsw_ip_range_i = config.get("vswIpRangeI")
    if vsw_ip_range_i is None:
        vsw_ip_range_i = "172.16.1.0/24"
    vpc_ip_range = config.get("vpcIpRange")
    if vpc_ip_range is None:
        vpc_ip_range = "172.16.0.0/12"
    zone_id_i = config.get("zoneIdI")
    if zone_id_i is None:
        zone_id_i = "cn-beijing-i"
    defaultkt_k_lu_m = alicloud.vpc.Network("defaultktKLuM", cidr_block=vpc_ip_range)
    default_tqwn3k = alicloud.vpc.Switch("defaultTQWN3k",
        vpc_id=defaultkt_k_lu_m.id,
        zone_id=zone_id_i,
        cidr_block=vsw_ip_range_i)
    defaultn0n_vr_n = alicloud.clickhouseenterprisedbcluster.ClickHouseEnterpriseDbCluster("defaultn0nVrN",
        zone_id=zone_id_i,
        vpc_id=defaultkt_k_lu_m.id,
        scale_min="8",
        scale_max="16",
        vswitch_id=default_tqwn3k.id)
    default = alicloud.clickhouseenterprisedbcluster.SecurityIp("default",
        group_name="example_group",
        security_ip_list="127.0.0.2",
        db_instance_id=defaultn0n_vr_n.id)
    
    package main
    
    import (
    	"github.com/pulumi/pulumi-alicloud/sdk/v3/go/alicloud/clickhouseenterprisedbcluster"
    	"github.com/pulumi/pulumi-alicloud/sdk/v3/go/alicloud/vpc"
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi/config"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		cfg := config.New(ctx, "")
    		name := "terraform-example"
    		if param := cfg.Get("name"); param != "" {
    			name = param
    		}
    		regionId := "cn-beijing"
    		if param := cfg.Get("regionId"); param != "" {
    			regionId = param
    		}
    		vswIpRangeI := "172.16.1.0/24"
    		if param := cfg.Get("vswIpRangeI"); param != "" {
    			vswIpRangeI = param
    		}
    		vpcIpRange := "172.16.0.0/12"
    		if param := cfg.Get("vpcIpRange"); param != "" {
    			vpcIpRange = param
    		}
    		zoneIdI := "cn-beijing-i"
    		if param := cfg.Get("zoneIdI"); param != "" {
    			zoneIdI = param
    		}
    		defaultktKLuM, err := vpc.NewNetwork(ctx, "defaultktKLuM", &vpc.NetworkArgs{
    			CidrBlock: pulumi.String(vpcIpRange),
    		})
    		if err != nil {
    			return err
    		}
    		defaultTQWN3k, err := vpc.NewSwitch(ctx, "defaultTQWN3k", &vpc.SwitchArgs{
    			VpcId:     defaultktKLuM.ID(),
    			ZoneId:    pulumi.String(zoneIdI),
    			CidrBlock: pulumi.String(vswIpRangeI),
    		})
    		if err != nil {
    			return err
    		}
    		defaultn0nVrN, err := clickhouseenterprisedbcluster.NewClickHouseEnterpriseDbCluster(ctx, "defaultn0nVrN", &clickhouseenterprisedbcluster.ClickHouseEnterpriseDbClusterArgs{
    			ZoneId:    pulumi.String(zoneIdI),
    			VpcId:     defaultktKLuM.ID(),
    			ScaleMin:  pulumi.String("8"),
    			ScaleMax:  pulumi.String("16"),
    			VswitchId: defaultTQWN3k.ID(),
    		})
    		if err != nil {
    			return err
    		}
    		_, err = clickhouseenterprisedbcluster.NewSecurityIp(ctx, "default", &clickhouseenterprisedbcluster.SecurityIpArgs{
    			GroupName:      pulumi.String("example_group"),
    			SecurityIpList: pulumi.String("127.0.0.2"),
    			DbInstanceId:   defaultn0nVrN.ID(),
    		})
    		if err != nil {
    			return err
    		}
    		return nil
    	})
    }
    
    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using AliCloud = Pulumi.AliCloud;
    
    return await Deployment.RunAsync(() => 
    {
        var config = new Config();
        var name = config.Get("name") ?? "terraform-example";
        var regionId = config.Get("regionId") ?? "cn-beijing";
        var vswIpRangeI = config.Get("vswIpRangeI") ?? "172.16.1.0/24";
        var vpcIpRange = config.Get("vpcIpRange") ?? "172.16.0.0/12";
        var zoneIdI = config.Get("zoneIdI") ?? "cn-beijing-i";
        var defaultktKLuM = new AliCloud.Vpc.Network("defaultktKLuM", new()
        {
            CidrBlock = vpcIpRange,
        });
    
        var defaultTQWN3k = new AliCloud.Vpc.Switch("defaultTQWN3k", new()
        {
            VpcId = defaultktKLuM.Id,
            ZoneId = zoneIdI,
            CidrBlock = vswIpRangeI,
        });
    
        var defaultn0nVrN = new AliCloud.ClickHouseEnterpriseDbCluster.ClickHouseEnterpriseDbCluster("defaultn0nVrN", new()
        {
            ZoneId = zoneIdI,
            VpcId = defaultktKLuM.Id,
            ScaleMin = "8",
            ScaleMax = "16",
            VswitchId = defaultTQWN3k.Id,
        });
    
        var @default = new AliCloud.ClickHouseEnterpriseDbCluster.SecurityIp("default", new()
        {
            GroupName = "example_group",
            SecurityIpList = "127.0.0.2",
            DbInstanceId = defaultn0nVrN.Id,
        });
    
    });
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.alicloud.vpc.Network;
    import com.pulumi.alicloud.vpc.NetworkArgs;
    import com.pulumi.alicloud.vpc.Switch;
    import com.pulumi.alicloud.vpc.SwitchArgs;
    import com.pulumi.alicloud.clickhouseenterprisedbcluster.ClickHouseEnterpriseDbCluster;
    import com.pulumi.alicloud.clickhouseenterprisedbcluster.ClickHouseEnterpriseDbClusterArgs;
    import com.pulumi.alicloud.clickhouseenterprisedbcluster.SecurityIp;
    import com.pulumi.alicloud.clickhouseenterprisedbcluster.SecurityIpArgs;
    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) {
            final var config = ctx.config();
            final var name = config.get("name").orElse("terraform-example");
            final var regionId = config.get("regionId").orElse("cn-beijing");
            final var vswIpRangeI = config.get("vswIpRangeI").orElse("172.16.1.0/24");
            final var vpcIpRange = config.get("vpcIpRange").orElse("172.16.0.0/12");
            final var zoneIdI = config.get("zoneIdI").orElse("cn-beijing-i");
            var defaultktKLuM = new Network("defaultktKLuM", NetworkArgs.builder()
                .cidrBlock(vpcIpRange)
                .build());
    
            var defaultTQWN3k = new Switch("defaultTQWN3k", SwitchArgs.builder()
                .vpcId(defaultktKLuM.id())
                .zoneId(zoneIdI)
                .cidrBlock(vswIpRangeI)
                .build());
    
            var defaultn0nVrN = new ClickHouseEnterpriseDbCluster("defaultn0nVrN", ClickHouseEnterpriseDbClusterArgs.builder()
                .zoneId(zoneIdI)
                .vpcId(defaultktKLuM.id())
                .scaleMin("8")
                .scaleMax("16")
                .vswitchId(defaultTQWN3k.id())
                .build());
    
            var default_ = new SecurityIp("default", SecurityIpArgs.builder()
                .groupName("example_group")
                .securityIpList("127.0.0.2")
                .dbInstanceId(defaultn0nVrN.id())
                .build());
    
        }
    }
    
    configuration:
      name:
        type: string
        default: terraform-example
      regionId:
        type: string
        default: cn-beijing
      vswIpRangeI:
        type: string
        default: 172.16.1.0/24
      vpcIpRange:
        type: string
        default: 172.16.0.0/12
      zoneIdI:
        type: string
        default: cn-beijing-i
    resources:
      defaultktKLuM:
        type: alicloud:vpc:Network
        properties:
          cidrBlock: ${vpcIpRange}
      defaultTQWN3k:
        type: alicloud:vpc:Switch
        properties:
          vpcId: ${defaultktKLuM.id}
          zoneId: ${zoneIdI}
          cidrBlock: ${vswIpRangeI}
      defaultn0nVrN:
        type: alicloud:clickhouseenterprisedbcluster:ClickHouseEnterpriseDbCluster
        properties:
          zoneId: ${zoneIdI}
          vpcId: ${defaultktKLuM.id}
          scaleMin: '8'
          scaleMax: '16'
          vswitchId: ${defaultTQWN3k.id}
      default:
        type: alicloud:clickhouseenterprisedbcluster:SecurityIp
        properties:
          groupName: example_group
          securityIpList: 127.0.0.2
          dbInstanceId: ${defaultn0nVrN.id}
    

    Create SecurityIp Resource

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

    Constructor syntax

    new SecurityIp(name: string, args: SecurityIpArgs, opts?: CustomResourceOptions);
    @overload
    def SecurityIp(resource_name: str,
                   args: SecurityIpArgs,
                   opts: Optional[ResourceOptions] = None)
    
    @overload
    def SecurityIp(resource_name: str,
                   opts: Optional[ResourceOptions] = None,
                   db_instance_id: Optional[str] = None,
                   group_name: Optional[str] = None,
                   security_ip_list: Optional[str] = None)
    func NewSecurityIp(ctx *Context, name string, args SecurityIpArgs, opts ...ResourceOption) (*SecurityIp, error)
    public SecurityIp(string name, SecurityIpArgs args, CustomResourceOptions? opts = null)
    public SecurityIp(String name, SecurityIpArgs args)
    public SecurityIp(String name, SecurityIpArgs args, CustomResourceOptions options)
    
    type: alicloud:clickhouseenterprisedbcluster:SecurityIp
    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 SecurityIpArgs
    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 SecurityIpArgs
    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 SecurityIpArgs
    The arguments to resource properties.
    opts ResourceOption
    Bag of options to control resource's behavior.
    name string
    The unique name of the resource.
    args SecurityIpArgs
    The arguments to resource properties.
    opts CustomResourceOptions
    Bag of options to control resource's behavior.
    name String
    The unique name of the resource.
    args SecurityIpArgs
    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 securityIpResource = new AliCloud.ClickHouseEnterpriseDbCluster.SecurityIp("securityIpResource", new()
    {
        DbInstanceId = "string",
        GroupName = "string",
        SecurityIpList = "string",
    });
    
    example, err := clickhouseenterprisedbcluster.NewSecurityIp(ctx, "securityIpResource", &clickhouseenterprisedbcluster.SecurityIpArgs{
    	DbInstanceId:   pulumi.String("string"),
    	GroupName:      pulumi.String("string"),
    	SecurityIpList: pulumi.String("string"),
    })
    
    var securityIpResource = new SecurityIp("securityIpResource", SecurityIpArgs.builder()
        .dbInstanceId("string")
        .groupName("string")
        .securityIpList("string")
        .build());
    
    security_ip_resource = alicloud.clickhouseenterprisedbcluster.SecurityIp("securityIpResource",
        db_instance_id="string",
        group_name="string",
        security_ip_list="string")
    
    const securityIpResource = new alicloud.clickhouseenterprisedbcluster.SecurityIp("securityIpResource", {
        dbInstanceId: "string",
        groupName: "string",
        securityIpList: "string",
    });
    
    type: alicloud:clickhouseenterprisedbcluster:SecurityIp
    properties:
        dbInstanceId: string
        groupName: string
        securityIpList: string
    

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

    DbInstanceId string
    The cluster ID.
    GroupName string
    The whitelist name.
    SecurityIpList string
    The IP address list under the whitelist group.
    DbInstanceId string
    The cluster ID.
    GroupName string
    The whitelist name.
    SecurityIpList string
    The IP address list under the whitelist group.
    dbInstanceId String
    The cluster ID.
    groupName String
    The whitelist name.
    securityIpList String
    The IP address list under the whitelist group.
    dbInstanceId string
    The cluster ID.
    groupName string
    The whitelist name.
    securityIpList string
    The IP address list under the whitelist group.
    db_instance_id str
    The cluster ID.
    group_name str
    The whitelist name.
    security_ip_list str
    The IP address list under the whitelist group.
    dbInstanceId String
    The cluster ID.
    groupName String
    The whitelist name.
    securityIpList String
    The IP address list under the whitelist group.

    Outputs

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

    Get an existing SecurityIp 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?: SecurityIpState, opts?: CustomResourceOptions): SecurityIp
    @staticmethod
    def get(resource_name: str,
            id: str,
            opts: Optional[ResourceOptions] = None,
            db_instance_id: Optional[str] = None,
            group_name: Optional[str] = None,
            security_ip_list: Optional[str] = None) -> SecurityIp
    func GetSecurityIp(ctx *Context, name string, id IDInput, state *SecurityIpState, opts ...ResourceOption) (*SecurityIp, error)
    public static SecurityIp Get(string name, Input<string> id, SecurityIpState? state, CustomResourceOptions? opts = null)
    public static SecurityIp get(String name, Output<String> id, SecurityIpState state, CustomResourceOptions options)
    resources:  _:    type: alicloud:clickhouseenterprisedbcluster:SecurityIp    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.
    The following state arguments are supported:
    DbInstanceId string
    The cluster ID.
    GroupName string
    The whitelist name.
    SecurityIpList string
    The IP address list under the whitelist group.
    DbInstanceId string
    The cluster ID.
    GroupName string
    The whitelist name.
    SecurityIpList string
    The IP address list under the whitelist group.
    dbInstanceId String
    The cluster ID.
    groupName String
    The whitelist name.
    securityIpList String
    The IP address list under the whitelist group.
    dbInstanceId string
    The cluster ID.
    groupName string
    The whitelist name.
    securityIpList string
    The IP address list under the whitelist group.
    db_instance_id str
    The cluster ID.
    group_name str
    The whitelist name.
    security_ip_list str
    The IP address list under the whitelist group.
    dbInstanceId String
    The cluster ID.
    groupName String
    The whitelist name.
    securityIpList String
    The IP address list under the whitelist group.

    Import

    Click House Enterprise Db Cluster Security I P can be imported using the id, e.g.

    $ pulumi import alicloud:clickhouseenterprisedbcluster/securityIp:SecurityIp example <db_instance_id>:<group_name>
    

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

    Package Details

    Repository
    Alibaba Cloud pulumi/pulumi-alicloud
    License
    Apache-2.0
    Notes
    This Pulumi package is based on the alicloud Terraform Provider.
    alicloud logo
    Alibaba Cloud v3.76.0 published on Tuesday, Apr 8, 2025 by Pulumi