From 0b9b454522612f482be17cf761174f8d10112dae Mon Sep 17 00:00:00 2001 From: Liang Huang Date: Thu, 16 May 2024 17:24:51 +0800 Subject: [PATCH] chore(doc): update Signed-off-by: Liang Huang --- docs/create-a-standard-cluster.md | 10 +++++++++- docs/create-a-starter-cluster.md | 24 +++++++++++++++++++++++- docs/scale-cluster.md | 6 ++++++ 3 files changed, 38 insertions(+), 2 deletions(-) diff --git a/docs/create-a-standard-cluster.md b/docs/create-a-standard-cluster.md index 5ca6e96..155dfe4 100644 --- a/docs/create-a-standard-cluster.md +++ b/docs/create-a-standard-cluster.md @@ -50,6 +50,8 @@ resource "zillizcloud_cluster" "standard_plan_cluster" { cu_type = "Performance-optimized" # The type of compute unit, optimized for performance project_id = data.zillizcloud_project.default.id # Linking to the project ID fetched earlier } + + ``` **Explanation of the Configuration:** @@ -66,11 +68,17 @@ terraform apply -auto-approve **Note**: The `-auto-approve` flag avoids prompting for confirmation before applying the changes. Use caution, especially in production environments. It's recommended to thoroughly review the plan before applying. -Review the plan generated by Terraform and confirm to apply the changes. Terraform will orchestrate the creation of the specified clusters based on your configuration. +Terraform will orchestrate the creation of the specified clusters based on your configuration. Once the process is complete, Terraform will display the output values for the cluster's connection address, username, and password. ### Verifying Provisioned Clusters After applying the changes, you can verify the provisioned Zilliz Cloud clusters either through the Zilliz Cloud dashboard. Ensure that the clusters are created with the desired configurations and are functioning as expected. +## Destroying the Cluster(Optional) +if you want to destroy the cluster, you can run the following command: +``` +$ terraform destroy +``` + ## Next Steps - [Upgrading Zilliz Cloud Cluster Compute Unit Size with Terraform](./scale-cluster.md) diff --git a/docs/create-a-starter-cluster.md b/docs/create-a-starter-cluster.md index 73ab003..12e90fb 100644 --- a/docs/create-a-starter-cluster.md +++ b/docs/create-a-starter-cluster.md @@ -30,6 +30,16 @@ resource "zillizcloud_cluster" "starter_cluster" { project_id = data.zillizcloud_project.default.id } +output "cluster_connect_address" { + value = zillizcloud_cluster.starter_cluster.connect_address +} +output "cluster_username" { + value = zillizcloud_cluster.starter_cluster.username +} +output "cluster_password" { + sensitive = true + value = zillizcloud_cluster.starter_cluster.password +} ``` @@ -45,16 +55,28 @@ Once you've defined the cluster resources, it's time to apply the changes to pro ```bash terraform apply -auto-approve + +Outputs: + +cluster_connect_address = "https://in03-559dde3b4b6de3a.api.gcp-us-west1.zillizcloud.com" +cluster_password = +cluster_username = "db_559dde3b4b6de3a" ``` **Note**: The `-auto-approve` flag avoids prompting for confirmation before applying the changes. Use caution, especially in production environments. It's recommended to thoroughly review the plan before applying. -Review the plan generated by Terraform and confirm to apply the changes. Terraform will orchestrate the creation of the specified clusters based on your configuration. +Terraform will orchestrate the creation of the specified clusters based on your configuration. Once the process is complete, Terraform will display the output values for the cluster's connection address, username, and password. ### Verifying Provisioned Clusters After applying the changes, you can verify the provisioned Zilliz Cloud clusters either through the Zilliz Cloud dashboard. Ensure that the clusters are created with the desired configurations and are functioning as expected. +## Destroying the Cluster(Optional) +if you want to destroy the cluster, you can run the following command: +``` +$ terraform destroy +``` + ## Next Steps - Explore creating a Standard Cluster with more resources using the guide: [Creating a Standard Cluster](./create-a-standard-cluster.md) diff --git a/docs/scale-cluster.md b/docs/scale-cluster.md index 3ca5875..fda6128 100644 --- a/docs/scale-cluster.md +++ b/docs/scale-cluster.md @@ -64,6 +64,12 @@ resource "zillizcloud_cluster" "standard_plan_cluster" { Terraform will now initiate the upgrade process, scaling your Zilliz Cloud cluster to the specified CU size. +## Destroying the Cluster(Optional) +if you want to destroy the cluster, you can run the following command: +``` +$ terraform destroy +``` + ### Verifying the Upgrade Once Terraform finishes applying the changes, you can verify that the CU size of your cluster has been upgraded successfully via the Zilliz Cloud dashboard. Log in to your Zilliz Cloud account and navigate to the Clusters section in the dashboard. Select the upgraded cluster and view its details. The CU size should now reflect the value you specified in your Terraform configuration.