Skip to content

feat(emr): add cos_bucket parameter for StarRocks shared-data cluster#3739

Open
westzhao wants to merge 1 commit intotencentcloudstack:masterfrom
westzhao:feat/emr-starrocks-shared-data
Open

feat(emr): add cos_bucket parameter for StarRocks shared-data cluster#3739
westzhao wants to merge 1 commit intotencentcloudstack:masterfrom
westzhao:feat/emr-starrocks-shared-data

Conversation

@westzhao
Copy link
Copy Markdown

What this PR does

Add cos_bucket parameter to tencentcloud_emr_cluster resource to support creating StarRocks shared-data (存算分离) clusters.

Why is this needed

When creating StarRocks shared-data clusters via EMR API, the CosBucket parameter is required to specify the COS storage path. Without this parameter, users cannot create StarRocks shared-data clusters using Terraform.

Error before this fix:

Error: [TencentCloudSDKError] Code=InvalidParameter.InvalidCosBucket,
Message=CosBucket should be a valid value while creating a shared-data StarRocks cluster

Changes

  • tencentcloud/services/emr/resource_tc_emr_cluster.go: Add cos_bucket schema definition
  • tencentcloud/services/emr/service_tencentcloud_emr.go: Add cos_bucket parameter handling in CreateInstance
  • website/docs/r/emr_cluster.html.markdown: Add documentation for cos_bucket parameter

Usage Example

resource "tencentcloud_emr_cluster" "starrocks_shared_data" {
  product_id    = 70  # STARROCKS-V2.2.1
  scene_name    = "StarRocks-Shared-Data"
  instance_name = "starrocks-shared-data-cluster"

  cos_bucket = "cos-bucket-name"

  softwares    = ["starrocks-3.3.13", "knox-1.2.0"]
  support_ha   = 0

  vpc_settings = {
    vpc_id    = "vpc-xxxxx"
    subnet_id = "subnet-xxxxx"
  }

  resource_spec {
    master_resource_spec {
      mem_size     = 16384
      cpu          = 4
      disk_size    = 100
      disk_type    = "CLOUD_SSD"
      spec         = "CVM.S5.MEDIUM8"
      storage_type = 5
    }
    master_count = 1
    task_count   = 3
    task_resource_spec {
      mem_size     = 16384
      cpu          = 4
      disk_size    = 0
      disk_type    = "CLOUD_SSD"
      spec         = "CVM.S5.MEDIUM8"
      storage_type = 5
    }
  }
  # ... other config
}

Testing

  • Tested creating StarRocks shared-data cluster with cos_bucket parameter
  • Verified API request includes CosBucket field

References

@westzhao
Copy link
Copy Markdown
Author

Clipboard_Screenshot_1768825551 Clipboard_Screenshot_1768825694 Clipboard_Screenshot_1768825638 Clipboard_Screenshot_1768825618

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.

1 participant