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

Add missed 'cku' to cluster.go #6

Open
rjudin opened this issue Oct 9, 2020 · 3 comments
Open

Add missed 'cku' to cluster.go #6

rjudin opened this issue Oct 9, 2020 · 3 comments

Comments

@rjudin
Copy link
Contributor

rjudin commented Oct 9, 2020

Issue

During creation a dedicated cluster type with default values (cli representation)

ccloud kafka cluster create xyz --type dedicated ...

Failed with error

Error: clusters: number of CKUs for a dedicated cluster must be > 0:
        cku: number of CKUs for a dedicated cluster must be > 0

Description

Confluent Cloud CLI from version v1.15.0 started to support --cku int value.

Action

Add cku

Ref:


UPDATE: I tried to push a new branch for your review, @Mongey , @cgroschupp but it was not allowed.

Please add to cluster.go:

  • at type ClusterCreateDeploymentConfig struct {
	cku       int    `json:"cku"`
  • at type ClusterDeployment struct {
	Cku           int                            `json:"cku"`
@rjudin rjudin changed the title Add missed 'cku' to Add missed 'cku' to cluster.go Oct 9, 2020
@cgroschupp
Copy link
Owner

@rjudin is the cku Parameter the only parameter that the dedicates cluster needs?

Can you provide the verbose output of the creating of a dedicated cluster, for example: ccloud kafka cluster create xyz --type dedicated --cku 1 -vvv

You must fork this repo to create a PR.

@rjudin
Copy link
Contributor Author

rjudin commented Oct 10, 2020

@cgroschupp verbose output of

c kafka cluster create test0 --cloud aws --cku 1 --availability single-zone --region ap-southeast-1 --type dedicated -vvvv

produces post body

{
  "config": {
    "name": "test0",
    "accountId": "env-3hide",
    "region": "ap-southeast-1",
    "serviceProvider": "aws",
    "deployment": {
      "sku": "DEDICATED"
    },
    "cku": 1
  }
}
Full output
2020-10-10T10:49:51.853+0200 [DEBUG] Getting available versions from https://s3-us-west-2.amazonaws.com/confluent.cloud?prefix=ccloud-cli/binaries/
2020-10-10T10:49:53.601+0200 [DEBUG] Token expired.
2020-10-10T10:49:53.606+0200 [DEBUG] UserService.CheckEmail request: GET https://confluent.cloud/api/check_email/rj@hidden_domain.com
2020-10-10T10:49:54.406+0200 [DEBUG] UserService.CheckEmail response: 200 OK Body: {"user":{"id":0,"email":"rj@hidden_domain.com","first_name":"","last_name":"","organization_id":0,"deactivated":false,"verified":null,"created":null,"modified":null,"password_changed":null,"service_name":"","service_description":"","service_account":false,"sso":{"enabled":false,"auth0_connection_name":"my-xyz-connection","tenant_id":"","multi_tenant":false},"preferences":{},"internal":false,"resource_id":""},"account":null,"organization":null,"error":null,"accounts":[]} request: GET https://confluent.cloud/api/check_email/rj@hidden_domain.com
2020-10-10T10:49:54.686+0200 [DEBUG] Token successfully updated with netrc file credentials.
2020-10-10T10:49:54.689+0200 [DEBUG] EnvironmentMetadataService.Get request: GET https://confluent.cloud/api/env_metadata
2020-10-10T10:49:54.889+0200 [DEBUG] EnvironmentMetadataService.Get response: 200 OK Body: {"error":null,"clouds":[{"id":"aws","regions":[{"id":"eu-north-1","cloud":"aws","zones":[{"name":"eu-north-1a","zone_id":"eun1-az1","id":"zone-148","region_id":"eu-north-1","sni_enabled":true,"schedulable":true,"created":"2020-09-22T18:55:36.932882Z","modified":"2020-09-22T18:55:36.932882Z","deactivated":null},{"name":"eu-north-1b","zone_id":"eun1-az2","id":"zone-149","region_id":"eu-north-1","sni_enabled":true,"schedulable":true,"created":"2020-09-22T18:55:36.932882Z","modified":"2020-09-22T18:55:36.932882Z","deactivated":null},{"name":"eu-north-1c","zone_id":"eun1-az3","id":"zone-150","region_id":"eu-north-1","sni_enabled":true,"schedulable":true,"created":"2020-09-22T18:55:36.932882Z","modified":"2020-09-22T18:55:36.932882Z","deactivated":null}],"name":"AWS Europe (Stockholm)","is_schedulable":false,"is_multizone_enabled":false,"config":null,"schedulability":{"shared_network":{"shared_cluster":{"low":[],"high":[]},"dedicated_cluster":{"low":[],"high":[]}},"dedicated_network":{"shared_cluster":{"low":[],"high":[]},"dedicated_cluster":{"low":["VPC_PEERING","TRANSIT_GATEWAY","PRIVATE_LINK"],"high":["VPC_PEERING","TRANSIT_GATEWAY","PRIVATE_LINK"]}}}},{"id":"ap-northeast-2","cloud":"aws","zones":[{"name":"ap-northeast-2a","zone_id":"apne2-az1","id":"zone-154","region_id":"ap-northeast-2","sni_enabled":true,"schedulable":true,"created":"2020-09-24T18:08:32.141593Z","modified":"2020-09-24T18:08:32.141593Z","deactivated":null},{"name":"ap-northeast-2b","zone_id":"apne2-az2","id":"zone-155","region_id":"ap-northeast-2","sni_enabled":true,"schedulable":true,"created":"2020-09-24T18:08:32.141593Z","modified":"2020-09-24T18:08:32.141593Z","deactivated":null},{"name":"ap-northeast-2c","zone_id":"apne2-az3","id":"zone-156","region_id":"ap-northeast-2","sni_enabled":true,"schedulable":true,"created":"2020-09-24T18:08:32.141593Z","modified":"2020-09-24T18:08:32.141593Z","deactivated":null},{"name":"ap-northeast-2d","zone_id":"apne2-az4","id":"zone-157","region_id":"ap-northeast-2","sni_enabled":false,"schedulable":true,"created":"2020-09-24T18:08:32.141593Z","modified":"2020-09-24T18:08:32.141593Z","deactivated":null}],"name":"ap-northeast-2 (Seoul)","is_schedulable":false,"is_multizone_enabled":false,"config":null,"schedulability":{"shared_network":{"shared_cluster":{"low":["PUBLIC"],"high":["PUBLIC"]},"dedicated_cluster":{"low":[],"high":[]}},"dedicated_network":{"shared_cluster":{"low":[],"high":[]},"dedicated_cluster":{"low":["VPC_PEERING","TRANSIT_GATEWAY","PRIVATE_LINK"],"high":["VPC_PEERING","TRANSIT_GATEWAY","PRIVATE_LINK"]}}}},{"id":"ap-southeast-1","cloud":"aws","zones":[{"name":"ap-southeast-1a","zone_id":"apse1-az2","id":"zone-33","region_id":"ap-southeast-1","sni_enabled":true,"schedulable":true,"created":"2020-04-22T17:28:52.440525Z","modified":"2020-04-22T17:28:52.440525Z","deactivated":null},{"name":"ap-southeast-1b","zone_id":"apse1-az1","id":"zone-34","region_id":"ap-southeast-1","sni_enabled":true,"schedulable":true,"created":"2020-04-22T17:28:52.440525Z","modified":"2020-04-22T17:28:52.440525Z","deactivated":null},{"name":"ap-southeast-1c","zone_id":"apse1-az3","id":"zone-35","region_id":"ap-southeast-1","sni_enabled":true,"schedulable":true,"created":"2020-04-22T17:28:52.440525Z","modified":"2020-04-22T17:28:52.440525Z","deactivated":null}],"name":"ap-southeast-1 (Singapore)","is_schedulable":true,"is_multizone_enabled":true,"config":null,"schedulability":{"shared_network":{"shared_cluster":{"low":["PUBLIC"],"high":["PUBLIC"]},"dedicated_cluster":{"low":["PUBLIC"],"high":["PUBLIC"]}},"dedicated_network":{"shared_cluster":{"low":[],"high":[]},"dedicated_cluster":{"low":["VPC_PEERING","TRANSIT_GATEWAY","PRIVATE_LINK"],"high":["VPC_PEERING","TRANSIT_GATEWAY","PRIVATE_LINK"]}}}},{"id":"eu-central-1","cloud":"aws","zones":[{"name":"eu-central-1a","zone_id":"euc1-az2","id":"zone-3","region_id":"eu-central-1","sni_enabled":true,"schedulable":true,"created":"2020-04-22T17:28:52.440525Z","modified":"2020-04-22T17:28:52.440525Z","deactivated":null},{"name":"eu-central-1b","zone_id":"euc1-az3","id":"zone-4","region_id":"eu-central-1","sni_enabled":true,"schedulable":true,"created":"2020-04-22T17:28:52.440525Z","modified":"2020-04-22T17:28:52.440525Z","deactivated":null},{"name":"eu-central-1c","zone_id":"euc1-az1","id":"zone-5","region_id":"eu-central-1","sni_enabled":false,"schedulable":true,"created":"2020-04-22T17:28:52.440525Z","modified":"2020-04-22T17:28:52.440525Z","deactivated":null}],"name":"eu-central-1 (Frankfurt)","is_schedulable":true,"is_multizone_enabled":true,"config":null,"schedulability":{"shared_network":{"shared_cluster":{"low":["PUBLIC"],"high":["PUBLIC"]},"dedicated_cluster":{"low":["PUBLIC"],"high":["PUBLIC"]}},"dedicated_network":{"shared_cluster":{"low":[],"high":[]},"dedicated_cluster":{"low":["VPC_PEERING","TRANSIT_GATEWAY","PRIVATE_LINK"],"high":["VPC_PEERING","TRANSIT_GATEWAY"]}}}},{"id":"ap-northeast-1","cloud":"aws","zones":[{"name":"ap-northeast-1a","zone_id":"apne1-az4","id":"zone-6","region_id":"ap-northeast-1","sni_enabled":true,"schedulable":true,"created":"2020-04-22T17:28:52.440525Z","modified":"2020-04-22T17:28:52.440525Z","deactivated":null},{"name":"ap-northeast-1c","zone_id":"apne1-az1","id":"zone-7","region_id":"ap-northeast-1","sni_enabled":true,"schedulable":true,"created":"2020-04-22T17:28:52.440525Z","modified":"2020-04-22T17:28:52.440525Z","deactivated":null},{"name":"ap-northeast-1d","zone_id":"apne1-az2","id":"zone-8","region_id":"ap-northeast-1","sni_enabled":true,"schedulable":true,"created":"2020-04-22T17:28:52.440525Z","modified":"2020-04-22T17:28:52.440525Z","deactivated":null}],"name":"ap-northeast-1 (Tokyo)","is_schedulable":true,"is_multizone_enabled":true,"config":null,"schedulability":{"shared_network":{"shared_cluster":{"low":["PUBLIC"],"high":["PUBLIC"]},"dedicated_cluster":{"low":["PUBLIC"],"high":["PUBLIC"]}},"dedicated_network":{"shared_cluster":{"low":[],"high":[]},"dedicated_cluster":{"low":["VPC_PEERING","TRANSIT_GATEWAY","PRIVATE_LINK"],"high":["VPC_PEERING","TRANSIT_GATEWAY","PRIVATE_LINK"]}}}},{"id":"eu-west-3","cloud":"aws","zones":[{"name":"eu-west-3a","zone_id":"euw3-az1","id":"zone-9","region_id":"eu-west-3","sni_enabled":false,"schedulable":true,"created":"2020-04-22T17:28:52.440525Z","modified":"2020-04-22T17:28:52.440525Z","deactivated":null},{"name":"eu-west-3b","zone_id":"euw3-az2","id":"zone-10","region_id":"eu-west-3","sni_enabled":false,"schedulable":true,"created":"2020-04-22T17:28:52.440525Z","modified":"2020-04-22T17:28:52.440525Z","deactivated":null},{"name":"eu-west-3c","zone_id":"euw3-az3","id":"zone-11","region_id":"eu-west-3","sni_enabled":false,"schedulable":true,"created":"2020-04-22T17:28:52.440525Z","modified":"2020-04-22T17:28:52.440525Z","deactivated":null}],"name":"eu-west-3 (Paris)","is_schedulable":true,"is_multizone_enabled":true,"config":null,"schedulability":{"shared_network":{"shared_cluster":{"low":["PUBLIC"],"high":["PUBLIC"]},"dedicated_cluster":{"low":["PUBLIC"],"high":["PUBLIC"]}},"dedicated_network":{"shared_cluster":{"low":[],"high":[]},"dedicated_cluster":{"low":["VPC_PEERING","TRANSIT_GATEWAY"],"high":["VPC_PEERING","TRANSIT_GATEWAY"]}}}},{"id":"eu-west-2","cloud":"aws","zones":[{"name":"eu-west-2a","zone_id":"euw2-az2","id":"zone-15","region_id":"eu-west-2","sni_enabled":false,"schedulable":true,"created":"2020-04-22T17:28:52.440525Z","modified":"2020-04-22T17:28:52.440525Z","deactivated":null},{"name":"eu-west-2b","zone_id":"euw2-az3","id":"zone-16","region_id":"eu-west-2","sni_enabled":false,"schedulable":true,"created":"2020-04-22T17:28:52.440525Z","modified":"2020-04-22T17:28:52.440525Z","deactivated":null},{"name":"eu-west-2c","zone_id":"euw2-az1","id":"zone-17","region_id":"eu-west-2","sni_enabled":false,"schedulable":true,"created":"2020-04-22T17:28:52.440525Z","modified":"2020-04-22T17:28:52.440525Z","deactivated":null}],"name":"eu-west-2 (London)","is_schedulable":true,"is_multizone_enabled":true,"config":null,"schedulability":{"shared_network":{"shared_cluster":{"low":["PUBLIC"],"high":["PUBLIC"]},"dedicated_cluster":{"low":["PUBLIC"],"high":["PUBLIC"]}},"dedicated_network":{"shared_cluster":{"low":[],"high":[]},"dedicated_cluster":{"low":["VPC_PEERING","TRANSIT_GATEWAY"],"high":["VPC_PEERING","TRANSIT_GATEWAY"]}}}},{"id":"us-west-2","cloud":"aws","zones":[{"name":"us-west-2a","zone_id":"usw2-az2","id":"zone-36","region_id":"us-west-2","sni_enabled":true,"schedulable":true,"created":"2020-04-22T17:28:52.440525Z","modified":"2020-04-22T17:28:52.440525Z","deactivated":null},{"name":"us-west-2b","zone_id":"usw2-az1","id":"zone-37","region_id":"us-west-2","sni_enabled":true,"schedulable":true,"created":"2020-04-22T17:28:52.440525Z","modified":"2020-04-22T17:28:52.440525Z","deactivated":null},{"name":"us-west-2c","zone_id":"usw2-az3","id":"zone-38","region_id":"us-west-2","sni_enabled":true,"schedulable":true,"created":"2020-04-22T17:28:52.440525Z","modified":"2020-04-22T17:28:52.440525Z","deactivated":null},{"name":"us-west-2d","zone_id":"usw2-az4","id":"zone-39","region_id":"us-west-2","sni_enabled":false,"schedulable":true,"created":"2020-04-22T17:28:52.440525Z","modified":"2020-04-22T17:28:52.440525Z","deactivated":null}],"name":"us-west-2 (Oregon)","is_schedulable":true,"is_multizone_enabled":true,"config":null,"schedulability":{"shared_network":{"shared_cluster":{"low":["PUBLIC"],"high":["PUBLIC"]},"dedicated_cluster":{"low":["PUBLIC"],"high":["PUBLIC"]}},"dedicated_network":{"shared_cluster":{"low":[],"high":[]},"dedicated_cluster":{"low":["VPC_PEERING","TRANSIT_GATEWAY","PRIVATE_LINK"],"high":["VPC_PEERING","TRANSIT_GATEWAY","PRIVATE_LINK"]}}}},{"id":"eu-west-1","cloud":"aws","zones":[{"name":"eu-west-1a","zone_id":"euw1-az3","id":"zone-40","region_id":"eu-west-1","sni_enabled":true,"schedulable":true,"created":"2020-04-22T17:28:52.440525Z","modified":"2020-04-22T17:28:52.440525Z","deactivated":null},{"name":"eu-west-1b","zone_id":"euw1-az1","id":"zone-41","region_id":"eu-west-1","sni_enabled":true,"schedulable":true,"created":"2020-04-22T17:28:52.440525Z","modified":"2020-04-22T17:28:52.440525Z","deactivated":null},{"name":"eu-west-1c","zone_id":"euw1-az2","id":"zone-42","region_id":"eu-west-1","sni_enabled":true,"schedulable":true,"created":"2020-04-22T17:28:52.440525Z","modified":"2020-04-22T17:28:52.440525Z","deactivated":null}],"name":"eu-west-1 (Ireland)","is_schedulable":true,"is_multizone_enabled":true,"config":null,"schedulability":{"shared_network":{"shared_cluster":{"low":["PUBLIC"],"high":["PUBLIC"]},"dedicated_cluster":{"low":["PUBLIC"],"high":["PUBLIC"]}},"dedicated_network":{"shared_cluster":{"low":[],"high":[]},"dedicated_cluster":{"low":["VPC_PEERING","TRANSIT_GATEWAY","PRIVATE_LINK"],"high":["VPC_PEERING","TRANSIT_GATEWAY","PRIVATE_LINK"]}}}},{"id":"us-east-1","cloud":"aws","zones":[{"name":"us-east-1a","zone_id":"use1-az1","id":"zone-18","region_id":"us-east-1","sni_enabled":true,"schedulable":true,"created":"2020-04-22T17:28:52.440525Z","modified":"2020-04-22T17:28:52.440525Z","deactivated":null},{"name":"us-east-1b","zone_id":"use1-az2","id":"zone-19","region_id":"us-east-1","sni_enabled":true,"schedulable":true,"created":"2020-04-22T17:28:52.440525Z","modified":"2020-04-22T17:28:52.440525Z","deactivated":null},{"name":"us-east-1c","zone_id":"use1-az4","id":"zone-20","region_id":"us-east-1","sni_enabled":true,"schedulable":true,"created":"2020-04-22T17:28:52.440525Z","modified":"2020-04-22T17:28:52.440525Z","deactivated":null},{"name":"us-east-1d","zone_id":"use1-az6","id":"zone-21","region_id":"us-east-1","sni_enabled":true,"schedulable":true,"created":"2020-04-22T17:28:52.440525Z","modified":"2020-04-22T17:28:52.440525Z","deactivated":null},{"name":"us-east-1f","zone_id":"use1-az5","id":"zone-22","region_id":"us-east-1","sni_enabled":true,"schedulable":true,"created":"2020-04-22T17:28:52.440525Z","modified":"2020-04-22T17:28:52.440525Z","deactivated":null},{"name":"us-east-1e","zone_id":"use1-az3","id":"zone-23","region_id":"us-east-1","sni_enabled":false,"schedulable":true,"created":"2020-04-22T17:28:52.440525Z","modified":"2020-04-22T17:28:52.440525Z","deactivated":null}],"name":"us-east-1 (N. Virginia)","is_schedulable":true,"is_multizone_enabled":true,"config":null,"schedulability":{"shared_network":{"shared_cluster":{"low":["PUBLIC"],"high":["PUBLIC"]},"dedicated_cluster":{"low":["PUBLIC"],"high":["PUBLIC"]}},"dedicated_network":{"shared_cluster":{"low":[],"high":[]},"dedicated_cluster":{"low":["VPC_PEERING","TRANSIT_GATEWAY","PRIVATE_LINK"],"high":["VPC_PEERING","TRANSIT_GATEWAY","PRIVATE_LINK"]}}}},{"id":"ca-central-1","cloud":"aws","zones":[{"name":"ca-central-1a","zone_id":"cac1-az1","id":"zone-24","region_id":"ca-central-1","sni_enabled":true,"schedulable":true,"created":"2020-04-22T17:28:52.440525Z","modified":"2020-04-22T17:28:52.440525Z","deactivated":null},{"name":"ca-central-1b","zone_id":"cac1-az2","id":"zone-25","region_id":"ca-central-1","sni_enabled":true,"schedulable":true,"created":"2020-04-22T17:28:52.440525Z","modified":"2020-04-22T17:28:52.440525Z","deactivated":null},{"name":"ca-central-1d","zone_id":"cac1-az4","id":"zone-26","region_id":"ca-central-1","sni_enabled":false,"schedulable":true,"created":"2020-04-22T17:28:52.440525Z","modified":"2020-04-22T17:28:52.440525Z","deactivated":null}],"name":"ca-central-1 (Canada)","is_schedulable":true,"is_multizone_enabled":true,"config":null,"schedulability":{"shared_network":{"shared_cluster":{"low":["PUBLIC"],"high":["PUBLIC"]},"dedicated_cluster":{"low":["PUBLIC"],"high":["PUBLIC"]}},"dedicated_network":{"shared_cluster":{"low":[],"high":[]},"dedicated_cluster":{"low":["VPC_PEERING","TRANSIT_GATEWAY","PRIVATE_LINK"],"high":["VPC_PEERING","TRANSIT_GATEWAY"]}}}},{"id":"us-east-2","cloud":"aws","zones":[{"name":"us-east-2a","zone_id":"use2-az1","id":"zone-43","region_id":"us-east-2","sni_enabled":true,"schedulable":true,"created":"2020-04-22T17:28:52.440525Z","modified":"2020-04-22T17:28:52.440525Z","deactivated":null},{"name":"us-east-2b","zone_id":"use2-az2","id":"zone-44","region_id":"us-east-2","sni_enabled":true,"schedulable":true,"created":"2020-04-22T17:28:52.440525Z","modified":"2020-04-22T17:28:52.440525Z","deactivated":null},{"name":"us-east-2c","zone_id":"use2-az3","id":"zone-45","region_id":"us-east-2","sni_enabled":true,"schedulable":true,"created":"2020-04-22T17:28:52.440525Z","modified":"2020-04-22T17:28:52.440525Z","deactivated":null}],"name":"us-east-2 (Ohio)","is_schedulable":true,"is_multizone_enabled":true,"config":null,"schedulability":{"shared_network":{"shared_cluster":{"low":["PUBLIC"],"high":["PUBLIC"]},"dedicated_cluster":{"low":["PUBLIC"],"high":["PUBLIC"]}},"dedicated_network":{"shared_cluster":{"low":[],"high":[]},"dedicated_cluster":{"low":["VPC_PEERING","TRANSIT_GATEWAY","PRIVATE_LINK"],"high":["VPC_PEERING","TRANSIT_GATEWAY","PRIVATE_LINK"]}}}},{"id":"ap-southeast-2","cloud":"aws","zones":[{"name":"ap-southeast-2a","zone_id":"apse2-az3","id":"zone-27","region_id":"ap-southeast-2","sni_enabled":true,"schedulable":true,"created":"2020-04-22T17:28:52.440525Z","modified":"2020-04-22T17:28:52.440525Z","deactivated":null},{"name":"ap-southeast-2b","zone_id":"apse2-az1","id":"zone-28","region_id":"ap-southeast-2","sni_enabled":true,"schedulable":true,"created":"2020-04-22T17:28:52.440525Z","modified":"2020-04-22T17:28:52.440525Z","deactivated":null},{"name":"ap-southeast-2c","zone_id":"apse2-az2","id":"zone-29","region_id":"ap-southeast-2","sni_enabled":true,"schedulable":true,"created":"2020-04-22T17:28:52.440525Z","modified":"2020-04-22T17:28:52.440525Z","deactivated":null}],"name":"ap-southeast-2 (Sydney)","is_schedulable":true,"is_multizone_enabled":true,"config":null,"schedulability":{"shared_network":{"shared_cluster":{"low":["PUBLIC"],"high":["PUBLIC"]},"dedicated_cluster":{"low":["PUBLIC"],"high":["PUBLIC"]}},"dedicated_network":{"shared_cluster":{"low":[],"high":[]},"dedicated_cluster":{"low":["VPC_PEERING","TRANSIT_GATEWAY","PRIVATE_LINK"],"high":["VPC_PEERING","TRANSIT_GATEWAY","PRIVATE_LINK"]}}}},{"id":"ap-south-1","cloud":"aws","zones":[{"name":"ap-south-1a","zone_id":"aps1-az1","id":"zone-30","region_id":"ap-south-1","sni_enabled":true,"schedulable":true,"created":"2020-04-22T17:28:52.440525Z","modified":"2020-04-22T17:28:52.440525Z","deactivated":null},{"name":"ap-south-1b","zone_id":"aps1-az3","id":"zone-31","region_id":"ap-south-1","sni_enabled":true,"schedulable":true,"created":"2020-04-22T17:28:52.440525Z","modified":"2020-04-22T17:28:52.440525Z","deactivated":null},{"name":"ap-south-1c","zone_id":"aps1-az2","id":"zone-32","region_id":"ap-south-1","sni_enabled":true,"schedulable":true,"created":"2020-04-22T17:28:52.440525Z","modified":"2020-04-22T17:28:52.440525Z","deactivated":null}],"name":"ap-south-1 (Mumbai)","is_schedulable":true,"is_multizone_enabled":true,"config":null,"schedulability":{"shared_network":{"shared_cluster":{"low":["PUBLIC"],"high":["PUBLIC"]},"dedicated_cluster":{"low":["PUBLIC"],"high":["PUBLIC"]}},"dedicated_network":{"shared_cluster":{"low":[],"high":[]},"dedicated_cluster":{"low":["VPC_PEERING","TRANSIT_GATEWAY","PRIVATE_LINK"],"high":["VPC_PEERING","TRANSIT_GATEWAY","PRIVATE_LINK"]}}}},{"id":"us-west-1","cloud":"aws","zones":[{"name":"us-west-1a","zone_id":"usw1-az3","id":"zone-1","region_id":"us-west-1","sni_enabled":true,"schedulable":true,"created":"2020-04-22T17:28:52.440525Z","modified":"2020-04-22T17:28:52.440525Z","deactivated":null},{"name":"us-west-1b","zone_id":"usw1-az1","id":"zone-2","region_id":"us-west-1","sni_enabled":true,"schedulable":true,"created":"2020-04-22T17:28:52.440525Z","modified":"2020-04-22T17:28:52.440525Z","deactivated":null}],"name":"us-west-1 (N. California)","is_schedulable":false,"is_multizone_enabled":false,"config":null,"schedulability":{"shared_network":{"shared_cluster":{"low":[],"high":[]},"dedicated_cluster":{"low":[],"high":[]}},"dedicated_network":{"shared_cluster":{"low":[],"high":[]},"dedicated_cluster":{"low":["VPC_PEERING","TRANSIT_GATEWAY","PRIVATE_LINK"],"high":[]}}}},{"id":"sa-east-1","cloud":"aws","zones":[{"name":"sa-east-1a","zone_id":"sae1-az1","id":"zone-12","region_id":"sa-east-1","sni_enabled":false,"schedulable":true,"created":"2020-04-22T17:28:52.440525Z","modified":"2020-04-22T17:28:52.440525Z","deactivated":null},{"name":"sa-east-1b","zone_id":"sae1-az2","id":"zone-13","region_id":"sa-east-1","sni_enabled":false,"schedulable":true,"created":"2020-04-22T17:28:52.440525Z","modified":"2020-04-22T17:28:52.440525Z","deactivated":null},{"name":"sa-east-1c","zone_id":"sae1-az3","id":"zone-14","region_id":"sa-east-1","sni_enabled":false,"schedulable":true,"created":"2020-04-22T17:28:52.440525Z","modified":"2020-04-22T17:28:52.440525Z","deactivated":null}],"name":"sa-east-1 (São Paulo)","is_schedulable":true,"is_multizone_enabled":true,"config":null,"schedulability":{"shared_network":{"shared_cluster":{"low":["PUBLIC"],"high":["PUBLIC"]},"dedicated_cluster":{"low":["PUBLIC"],"high":["PUBLIC"]}},"dedicated_network":{"shared_cluster":{"low":[],"high":[]},"dedicated_cluster":{"low":["VPC_PEERING","TRANSIT_GATEWAY"],"high":["VPC_PEERING","TRANSIT_GATEWAY"]}}}}],"name":"Amazon Web Services","accounts":[{"id":"050879227952"},{"id":"439989760662"},{"id":"649317483566"}]}],"status":null,"schema_registry_locations":[{"id":"US","name":"US","cluster_id":"lkc-415jz","service_provider":""},{"id":"US","name":"US","cluster_id":"lkc-4v0kp","service_provider":"gcp"},{"id":"EU","name":"EU","cluster_id":"lkc-l52yn","service_provider":"aws"},{"id":"APAC","name":"APAC","cluster_id":"lkc-lz1k7","service_provider":"aws"},{"id":"EU","name":"EU","cluster_id":"lkc-41xyv","service_provider":"gcp"},{"id":"APAC","name":"APAC","cluster_id":"lkc-ldd1z","service_provider":"gcp"},{"id":"US","name":"US","cluster_id":"lkc-4njjv","service_provider":"azure"},{"id":"APAC","name":"APAC","cluster_id":"lkc-4jpp2","service_provider":"azure"},{"id":"EU","name":"EU","cluster_id":"lkc-4nj7v","service_provider":"azure"}]} request: GET https://confluent.cloud/api/env_metadata
2020-10-10T10:49:54.906+0200 [DEBUG] KafkaService.Create request: POST https://confluent.cloud/api/clusters Body:{"config":{"name":"test0","accountId":"env-3hide","region":"ap-southeast-1","serviceProvider":"aws","deployment":{"sku":"DEDICATED"},"cku":1}}
2020-10-10T10:49:56.105+0200 [DEBUG] KafkaService.Create response: 200 OK Body: {"error":null,"validation_errors":{},"cluster":{"id":"lkc-fake4","name":"test0","account_id":"env-3hide","network_ingress":50,"network_egress":150,"storage":30000,"durability":"LOW","status":"PROVISIONING","endpoint":"","region":"ap-southeast-1","created":"2020-10-10T08:49:55.763283Z","modified":"2020-10-10T08:49:55.766874Z","service_provider":"aws","organization_id":01010,"enterprise":true,"k8s_cluster_id":"k8s249","physical_cluster_id":"pkc-fake2","price_per_hour":"340315","accrued_this_cycle":"0","legacy_endpoint":false,"type":"kafka","api_endpoint":"","internal_proxy":false,"is_sla_enabled":true,"is_schedulable":false,"dedicated":true,"max_network_ingress":60,"max_network_egress":180,"deployment":{"id":"deployment-fake3","created":"2020-10-10T08:49:55.149762Z","modified":"2020-10-10T08:49:55.149762Z","deactivated":null,"account_id":"env-3hide","network_access":{"public_internet":[{"enabled":true,"network_config_id":"","allowed_cidr_blocks":[]}],"vpc_peering":[],"private_link":[],"transit_gateway":[],"internal":[]},"sku":"DEDICATED","network_region_id":"nr-938af","provider":{"cloud":"AWS","region":"ap-southeast-1","zones":[{"name":"ap-southeast-1a","zone_id":"apse1-az2","id":"","region_id":"","sni_enabled":null,"schedulable":null,"created":null,"modified":null,"deactivated":null},{"name":"ap-southeast-1b","zone_id":"apse1-az1","id":"","region_id":"","sni_enabled":null,"schedulable":null,"created":null,"modified":null,"deactivated":null},{"name":"ap-southeast-1c","zone_id":"apse1-az3","id":"","region_id":"","sni_enabled":null,"schedulable":null,"created":null,"modified":null,"deactivated":null}]},"durability":"LOW","environment_id":"","dedicated":true},"cku":1,"network_region":null,"initial_network_type":"UNKNOWN_TYPE","selected_network_type":"UNKNOWN_TYPE","encryption_key_id":"","pending_cku":0,"is_expandable":false,"infinite_storage":false},"credentials":null,"transition_id":""} request: POST https://confluent.cloud/api/clusters Body:{"config":{"name":"test0","accountId":"env-3hide","region":"ap-southeast-1","serviceProvider":"aws","deployment":{"sku":"DEDICATED"},"cku":1}}
It may take up to 5 minutes for the Kafka cluster to be ready.
+--------------+----------------+
| Id           | lkc-fake4      |
| Name         | test0          |
| Type         | DEDICATED      |
| Ingress      |             50 |
| Egress       |            150 |
| Storage      |          30000 |
| Provider     | aws            |
| Availability | single-zone    |
| Region       | ap-southeast-1 |
| Status       | PROVISIONING   |
| Endpoint     |                |
| ApiEndpoint  |                |
| ClusterSize  |              1 |
+--------------+----------------+

cluster describe command

c kafka cluster describe lkc-fake4 -vvvv

produces an output body with much more details, including cluster.deployment.network_access object, which was requested at Mongey/terraform-provider-confluentcloud#33 :

body of cluster describe dedicated cluster
{
  "error": null,
  "cluster": {
    "id": "lkc-fake4",
    "name": "test0",
    "account_id": "env-3hide",
    "network_ingress": 50,
    "network_egress": 150,
    "storage": 30000,
    "durability": "LOW",
    "status": "UP",
    "endpoint": "SASL_SSL://pkc-fake2.ap-southeast-1.aws.confluent.cloud:9092",
    "region": "ap-southeast-1",
    "created": "2020-10-10T08:49:55.763283Z",
    "modified": "2020-10-10T08:49:55.766874Z",
    "service_provider": "aws",
    "organization_id": 01010,
    "enterprise": true,
    "k8s_cluster_id": "k8s249",
    "physical_cluster_id": "pkc-fake2",
    "price_per_hour": "340315",
    "accrued_this_cycle": "0",
    "legacy_endpoint": false,
    "type": "kafka",
    "api_endpoint": "https://pkac-fake1.ap-southeast-1.aws.confluent.cloud",
    "internal_proxy": false,
    "is_sla_enabled": true,
    "is_schedulable": false,
    "dedicated": true,
    "max_network_ingress": 60,
    "max_network_egress": 180,
    "deployment": {
      "id": "deployment-fake3",
      "created": "2020-10-10T08:49:55.149762Z",
      "modified": "2020-10-10T08:49:55.149762Z",
      "deactivated": null,
      "account_id": "env-3hide",
      "network_access": {
        "public_internet": [
          {
            "enabled": true,
            "network_config_id": "",
            "allowed_cidr_blocks": []
          }
        ],
        "vpc_peering": [],
        "private_link": [],
        "transit_gateway": [],
        "internal": []
      },
      "sku": "DEDICATED",
      "network_region_id": "nr-938af",
      "provider": {
        "cloud": "AWS",
        "region": "ap-southeast-1",
        "zones": [
          {
            "name": "ap-southeast-1a",
            "zone_id": "apse1-az2",
            "id": "",
            "region_id": "",
            "sni_enabled": null,
            "schedulable": null,
            "created": null,
            "modified": null,
            "deactivated": null
          },
          {
            "name": "ap-southeast-1b",
            "zone_id": "apse1-az1",
            "id": "",
            "region_id": "",
            "sni_enabled": null,
            "schedulable": null,
            "created": null,
            "modified": null,
            "deactivated": null
          },
          {
            "name": "ap-southeast-1c",
            "zone_id": "apse1-az3",
            "id": "",
            "region_id": "",
            "sni_enabled": null,
            "schedulable": null,
            "created": null,
            "modified": null,
            "deactivated": null
          }
        ]
      },
      "durability": "LOW",
      "environment_id": "",
      "dedicated": true
    },
    "cku": 1,
    "network_region": null,
    "initial_network_type": "UNKNOWN_TYPE",
    "selected_network_type": "UNKNOWN_TYPE",
    "encryption_key_id": "",
    "pending_cku": 0,
    "is_expandable": true,
    "infinite_storage": false
  }
}
Full output
2020-10-10T11:03:21.484+0200 [DEBUG] Getting available versions from https://s3-us-west-2.amazonaws.com/confluent.cloud?prefix=ccloud-cli/binaries/
2020-10-10T11:03:23.312+0200 [DEBUG] KafkaService.Describe request: GET https://confluent.cloud/api/clusters/lkc-fake4?XXX_sizecache=0&account_id=env-3hide&id=lkc-fake4&name=
2020-10-10T11:03:24.075+0200 [DEBUG] KafkaService.Describe response: 200 OK Body: {"error":null,"cluster":{"id":"lkc-fake4","name":"test0","account_id":"env-3hide","network_ingress":50,"network_egress":150,"storage":30000,"durability":"LOW","status":"UP","endpoint":"SASL_SSL://pkc-fake2.ap-southeast-1.aws.confluent.cloud:9092","region":"ap-southeast-1","created":"2020-10-10T08:49:55.763283Z","modified":"2020-10-10T08:49:55.766874Z","service_provider":"aws","organization_id":34022,"enterprise":true,"k8s_cluster_id":"k8s249","physical_cluster_id":"pkc-fake2","price_per_hour":"340315","accrued_this_cycle":"0","legacy_endpoint":false,"type":"kafka","api_endpoint":"https://pkac-fake1.ap-southeast-1.aws.confluent.cloud","internal_proxy":false,"is_sla_enabled":true,"is_schedulable":false,"dedicated":true,"max_network_ingress":60,"max_network_egress":180,"deployment":{"id":"deployment-fake3","created":"2020-10-10T08:49:55.149762Z","modified":"2020-10-10T08:49:55.149762Z","deactivated":null,"account_id":"env-3hide","network_access":{"public_internet":[{"enabled":true,"network_config_id":"","allowed_cidr_blocks":[]}],"vpc_peering":[],"private_link":[],"transit_gateway":[],"internal":[]},"sku":"DEDICATED","network_region_id":"nr-938af","provider":{"cloud":"AWS","region":"ap-southeast-1","zones":[{"name":"ap-southeast-1a","zone_id":"apse1-az2","id":"","region_id":"","sni_enabled":null,"schedulable":null,"created":null,"modified":null,"deactivated":null},{"name":"ap-southeast-1b","zone_id":"apse1-az1","id":"","region_id":"","sni_enabled":null,"schedulable":null,"created":null,"modified":null,"deactivated":null},{"name":"ap-southeast-1c","zone_id":"apse1-az3","id":"","region_id":"","sni_enabled":null,"schedulable":null,"created":null,"modified":null,"deactivated":null}]},"durability":"LOW","environment_id":"","dedicated":true},"cku":1,"network_region":null,"initial_network_type":"UNKNOWN_TYPE","selected_network_type":"UNKNOWN_TYPE","encryption_key_id":"","pending_cku":0,"is_expandable":true,"infinite_storage":false}} request: GET https://confluent.cloud/api/clusters/lkc-fake4?XXX_sizecache=0&account_id=env-3hide&id=lkc-fake4&name=
+--------------+--------------------------------------------------------------+
| Id           | lkc-fake4                                                    |
| Name         | test0                                                        |
| Type         | DEDICATED                                                    |
| Ingress      |                                                           50 |
| Egress       |                                                          150 |
| Storage      |                                                        30000 |
| Provider     | aws                                                          |
| Availability | single-zone                                                  |
| Region       | ap-southeast-1                                               |
| Status       | UP                                                           |
| Endpoint     | SASL_SSL://pkc-fake2.ap-southeast-1.aws.confluent.cloud:9092 |
| ApiEndpoint  | https://pkac-fake1.ap-southeast-1.aws.confluent.cloud        |
| ClusterSize  |                                                            1 |
+--------------+--------------------------------------------------------------+

PS: Also noticed that network_access appears at the response body only - seems for today 2020.10.10 there is no way to POST network_access object with values PrivateLink or VPCLink.

@rjudin
Copy link
Contributor Author

rjudin commented Oct 13, 2020

FYI: REST API ref https://confluent.cloud/api/docs#operation/createV2KafkaCluster (in beta state)

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

No branches or pull requests

2 participants