Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

resource/alicloud_click_house_db_cluster: add support to creating cold storage. #8407

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

itkillsnone
Copy link
Contributor

resource/alicloud_click_house_db_cluster: add support to creating cold storage.

@itkillsnone itkillsnone force-pushed the feature/20250226_ck_cold_storage branch from 884f9f8 to 3ca18bc Compare February 26, 2025 06:30
@itkillsnone itkillsnone force-pushed the feature/20250226_ck_cold_storage branch from 3ca18bc to 73ce6c1 Compare February 26, 2025 07:07
@itkillsnone
Copy link
Contributor Author

=== RUN TestAccAliCloudClickHouseDBCluster_ColdStorage
2025/02/26 15:04:00 [DEBUG] Test: Executing step 0
2025/02/26 15:04:03 [WARN] Test: Step plan: DIFF:

CREATE: alicloud_click_house_db_cluster.default
category: "" => "Basic"
cold_storage: "" => ""
connection_string: "" => ""
db_cluster_access_white_list.#: "" => "0"
db_cluster_class: "" => "S8"
db_cluster_description: "" => ""
db_cluster_network_type: "" => "vpc"
db_cluster_version: "" => "23.8"
db_node_group_count: "" => "1"
db_node_storage: "" => "100"
id: "" => ""
maintain_time: "" => ""
multi_zone_vswitch_list.#: "" => "0"
payment_type: "" => "PayAsYouGo"
port: "" => ""
renewal_status: "" => ""
status: "" => ""
storage_type: "" => "cloud_essd"
vpc_id: "" => ""
vswitch_id: "" => ""
zone_id: "" => ""
CREATE: alicloud_vpc.default
cidr_block: "" => "192.168.0.0/16"
create_time: "" => ""
dns_hostname_status: "" => ""
id: "" => ""
ipv6_cidr_block: "" => ""
ipv6_cidr_blocks: "" => ""
name: "" => ""
region_id: "" => ""
resource_group_id: "" => ""
route_table_id: "" => ""
router_id: "" => ""
router_table_id: "" => ""
secondary_cidr_blocks: "" => ""
status: "" => ""
user_cidrs: "" => ""
vpc_name: "" => "tf-testacccn-hangzhouclickhousedbcluster27824"
CREATE: alicloud_vswitch.default
availability_zone: "" => ""
cidr_block: "" => "192.168.192.0/24"
create_time: "" => ""
id: "" => ""
ipv6_cidr_block: "" => ""
ipv6_cidr_block_mask: "" => ""
name: "" => ""
status: "" => ""
vpc_id: "" => ""
vswitch_name: "" => "tf-testacccn-hangzhouclickhousedbcluster27824"
zone_id: "" => "cn-hangzhou-h"

STATE:

data.alicloud_click_house_regions.default:
ID = 67bebce3
provider = provider.alicloud
current = true
regions.# = 1
regions.0.region_id = cn-hangzhou
regions.0.zone_ids.# = 8
regions.0.zone_ids.0.vpc_enabled = true
regions.0.zone_ids.0.zone_id = cn-hangzhou-h
regions.0.zone_ids.1.vpc_enabled = true
regions.0.zone_ids.1.zone_id = cn-hangzhou-finance-i
regions.0.zone_ids.2.vpc_enabled = true
regions.0.zone_ids.2.zone_id = cn-hangzhou-i
regions.0.zone_ids.3.vpc_enabled = true
regions.0.zone_ids.3.zone_id = cn-hangzhou-finance-k
regions.0.zone_ids.4.vpc_enabled = true
regions.0.zone_ids.4.zone_id = cn-hangzhou-finance-j
regions.0.zone_ids.5.vpc_enabled = true
regions.0.zone_ids.5.zone_id = cn-hangzhou-finance-h
regions.0.zone_ids.6.vpc_enabled = true
regions.0.zone_ids.6.zone_id = cn-hangzhou-j
regions.0.zone_ids.7.vpc_enabled = true
regions.0.zone_ids.7.zone_id = cn-hangzhou-k
2025/02/26 15:04:03 [INFO] terraform: building graph: GraphTypeApply
2025/02/26 15:04:03 [DEBUG] Resource state not found for node "alicloud_vpc.default", instance alicloud_vpc.default
2025/02/26 15:04:03 [DEBUG] Resource state not found for node "alicloud_vswitch.default", instance alicloud_vswitch.default
2025/02/26 15:04:03 [DEBUG] Resource state not found for node "alicloud_click_house_db_cluster.default", instance alicloud_click_house_db_cluster.default
2025/02/26 15:05:54 [DEBUG] provider has no plugin.Client
2025/02/26 15:05:54 [WARN] Test: Step plan: DIFF:

UPDATE: alicloud_click_house_db_cluster.default
category: "Basic" => "Basic"
cold_storage: "DISABLE" => "ENABLE"
connection_string: "cc-bp19662y2******.clickhouse.ads.aliyuncs.com" => "cc-bp19662y2******.clickhouse.ads.aliyuncs.com"
db_cluster_access_white_list.#: "0" => "0"
db_cluster_class: "S8" => "S8"
db_cluster_description: "cc-bp19662y2******" => "cc-bp19662y2******"
db_cluster_network_type: "vpc" => "vpc"
db_cluster_version: "23.8" => "23.8"
db_node_group_count: "1" => "1"
db_node_storage: "100" => "100"
encryption_key: "" => ""
encryption_type: "" => ""
id: "cc-bp19662y2******" => "cc-bp19662y2******"
maintain_time: "00:00Z-06:00Z" => "00:00Z-06:00Z"
multi_zone_vswitch_list.#: "0" => "0"
payment_type: "PayAsYouGo" => "PayAsYouGo"
port: "8123" => "8123"
status: "Running" => "Running"
storage_type: "cloud_essd" => "cloud_essd"
vpc_id: "vpc-bp1t8djrha*********" => "vpc-bp1t8djrha*********"
vswitch_id: "vsw-bp1eyhvefv**********" => "vsw-bp1eyhvefv**********"
zone_id: "cn-hangzhou-h" => "cn-hangzhou-h"

STATE:

data.alicloud_click_house_regions.default:
ID = 67bebd50
provider = provider.alicloud
current = true
regions.# = 1
regions.0.region_id = cn-hangzhou
regions.0.zone_ids.# = 8
regions.0.zone_ids.0.vpc_enabled = true
regions.0.zone_ids.0.zone_id = cn-hangzhou-h
regions.0.zone_ids.1.vpc_enabled = true
regions.0.zone_ids.1.zone_id = cn-hangzhou-finance-i
regions.0.zone_ids.2.vpc_enabled = true
regions.0.zone_ids.2.zone_id = cn-hangzhou-i
regions.0.zone_ids.3.vpc_enabled = true
regions.0.zone_ids.3.zone_id = cn-hangzhou-finance-k
regions.0.zone_ids.4.vpc_enabled = true
regions.0.zone_ids.4.zone_id = cn-hangzhou-finance-j
regions.0.zone_ids.5.vpc_enabled = true
regions.0.zone_ids.5.zone_id = cn-hangzhou-finance-h
regions.0.zone_ids.6.vpc_enabled = true
regions.0.zone_ids.6.zone_id = cn-hangzhou-j
regions.0.zone_ids.7.vpc_enabled = true
regions.0.zone_ids.7.zone_id = cn-hangzhou-k
alicloud_click_house_db_cluster.default:
ID = cc-bp19662y2******
provider = provider.alicloud
category = Basic
cold_storage = DISABLE
connection_string = cc-bp19662y2******.clickhouse.ads.aliyuncs.com
db_cluster_class = S8
db_cluster_description = cc-bp19662y2******
db_cluster_network_type = vpc
db_cluster_version = 23.8
db_node_group_count = 1
db_node_storage = 100
encryption_key =
encryption_type =
maintain_time = 00:00Z-06:00Z
payment_type = PayAsYouGo
port = 8123
status = Running
storage_type = cloud_essd
vpc_id = vpc-bp1t8djrha*********
vswitch_id = vsw-bp1eyhvefv**********
zone_id = cn-hangzhou-h

Dependencies:
alicloud_vswitch.default
alicloud_vpc.default:
ID = vpc-bp1t8djrha*********
provider = provider.alicloud
cidr_block = 192.168.0.0/16
classic_link_enabled = false
create_time = 2025-02-26T07:04:04Z
description =
dns_hostname_status = DISABLED
enable_ipv6 = false
ipv6_cidr_block =
name = tf-testacccn-hangzhouclickhousedbcluster27824
region_id = cn-hangzhou
resource_group_id = rg-acfmyv*********
route_table_id = vtb-bp1bewe************
router_id = vrt-bp1hq55ov5k*******
router_table_id = vtb-bp1bewe************
status = Available
system_route_table_description =
system_route_table_name =
vpc_name = tf-testacccn-hangzhouclickhousedbcluster27824
alicloud_vswitch.default:
ID = vsw-bp1eyhvefv**********
provider = provider.alicloud
availability_zone = cn-hangzhou-h
cidr_block = 192.168.192.0/24
create_time = 2025-02-26T07:04:10Z
description =
ipv6_cidr_block =
name = tf-testacccn-hangzhouclickhousedbcluster27824
status = Available
vpc_id = vpc-bp1t8djrha*********
vswitch_name = tf-testacccn-hangzhouclickhousedbcluster27824
zone_id = cn-hangzhou-h

Dependencies:
alicloud_vpc.default
data.alicloud_click_house_regions.default
2025/02/26 15:05:54 [INFO] terraform: building graph: GraphTypeApply
2025/02/26 15:05:54 [DEBUG] alicloud_click_house_db_cluster.default: applying the planned Update change
2025/02/26 15:06:05 [WARN] Test: Executing destroy step
2025/02/26 15:06:07 [WARN] Test: Step plan: DIFF:

DESTROY: alicloud_click_house_db_cluster.default
category: "Basic" => ""
cold_storage: "ENABLE" => ""
connection_string: "cc-bp19662y2******.clickhouse.ads.aliyuncs.com" => ""
db_cluster_access_white_list.#: "0" => ""
db_cluster_class: "S8" => ""
db_cluster_description: "cc-bp19662y2******" => ""
db_cluster_network_type: "vpc" => ""
db_cluster_version: "23.8" => ""
db_node_group_count: "1" => ""
db_node_storage: "100" => ""
encryption_key: "" => ""
encryption_type: "" => ""
id: "cc-bp19662y2******" => ""
maintain_time: "00:00Z-06:00Z" => ""
multi_zone_vswitch_list.#: "0" => ""
payment_type: "PayAsYouGo" => ""
port: "8123" => ""
status: "Running" => ""
storage_type: "cloud_essd" => ""
vpc_id: "vpc-bp1t8djrha*********" => ""
vswitch_id: "vsw-bp1eyhvefv**********" => ""
zone_id: "cn-hangzhou-h" => ""
DESTROY: alicloud_vpc.default
cidr_block: "192.168.0.0/16" => ""
classic_link_enabled: "false" => ""
create_time: "2025-02-26T07:04:04Z" => ""
description: "" => ""
dns_hostname_status: "DISABLED" => ""
enable_ipv6: "false" => ""
id: "vpc-bp1t8djrha*********" => ""
ipv6_cidr_block: "" => ""
ipv6_cidr_blocks.#: "0" => ""
name: "tf-testacccn-hangzhouclickhousedbcluster27824" => ""
region_id: "cn-hangzhou" => ""
resource_group_id: "rg-acfmyv*********" => ""
route_table_id: "vtb-bp1bewe************" => ""
router_id: "vrt-bp1hq55ov5k*******" => ""
router_table_id: "vtb-bp1bewe************" => ""
secondary_cidr_blocks.#: "0" => ""
status: "Available" => ""
system_route_table_description: "" => ""
system_route_table_name: "" => ""
user_cidrs.#: "0" => ""
vpc_name: "tf-testacccn-hangzhouclickhousedbcluster27824" => ""
DESTROY: alicloud_vswitch.default
availability_zone: "cn-hangzhou-h" => ""
cidr_block: "192.168.192.0/24" => ""
create_time: "2025-02-26T07:04:10Z" => ""
description: "" => ""
id: "vsw-bp1eyhvefv**********" => ""
ipv6_cidr_block: "" => ""
name: "tf-testacccn-hangzhouclickhousedbcluster27824" => ""
status: "Available" => ""
vpc_id: "vpc-bp1t8djrha*********" => ""
vswitch_name: "tf-testacccn-hangzhouclickhousedbcluster27824" => ""
zone_id: "cn-hangzhou-h" => ""

STATE:

alicloud_click_house_db_cluster.default:
ID = cc-bp19662y2******
provider = provider.alicloud
category = Basic
cold_storage = ENABLE
connection_string = cc-bp19662y2******.clickhouse.ads.aliyuncs.com
db_cluster_class = S8
db_cluster_description = cc-bp19662y2******
db_cluster_network_type = vpc
db_cluster_version = 23.8
db_node_group_count = 1
db_node_storage = 100
encryption_key =
encryption_type =
maintain_time = 00:00Z-06:00Z
payment_type = PayAsYouGo
port = 8123
status = Running
storage_type = cloud_essd
vpc_id = vpc-bp1t8djrha*********
vswitch_id = vsw-bp1eyhvefv**********
zone_id = cn-hangzhou-h

Dependencies:
alicloud_vswitch.default
alicloud_vpc.default:
ID = vpc-bp1t8djrha*********
provider = provider.alicloud
cidr_block = 192.168.0.0/16
classic_link_enabled = false
create_time = 2025-02-26T07:04:04Z
description =
dns_hostname_status = DISABLED
enable_ipv6 = false
ipv6_cidr_block =
name = tf-testacccn-hangzhouclickhousedbcluster27824
region_id = cn-hangzhou
resource_group_id = rg-acfmyv*********
route_table_id = vtb-bp1bewe************
router_id = vrt-bp1hq55ov5k*******
router_table_id = vtb-bp1bewe************
status = Available
system_route_table_description =
system_route_table_name =
vpc_name = tf-testacccn-hangzhouclickhousedbcluster27824
alicloud_vswitch.default:
ID = vsw-bp1eyhvefv**********
provider = provider.alicloud
availability_zone = cn-hangzhou-h
cidr_block = 192.168.192.0/24
create_time = 2025-02-26T07:04:10Z
description =
ipv6_cidr_block =
name = tf-testacccn-hangzhouclickhousedbcluster27824
status = Available
vpc_id = vpc-bp1t8djrha*********
vswitch_name = tf-testacccn-hangzhouclickhousedbcluster27824
zone_id = cn-hangzhou-h

Dependencies:
alicloud_vpc.default
data.alicloud_click_house_regions.default
2025/02/26 15:06:07 [INFO] terraform: building graph: GraphTypeApply
2025/02/26 15:06:07 [INFO] caller identity's account type is .
2025/02/26 15:06:07 [DEBUG] alicloud_click_house_db_cluster.default: applying the planned Delete change
--- PASS: TestAccAliCloudClickHouseDBCluster_ColdStorage (176.45s)
PASS

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants