-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Signed-off-by: Liang Huang <[email protected]>
- Loading branch information
1 parent
2ce4835
commit 1ecdbbb
Showing
7 changed files
with
264 additions
and
190 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,68 @@ | ||
# Tutorial: Creating Zilliz a Standard Cloud Cluster Resources with Terraform | ||
|
||
This tutorial guides you through managing Zilliz Cloud clusters using the `zillizcloud_cluster` resource within Terraform. You'll learn how to: | ||
|
||
- Retrieve project and region IDs for cluster creation. | ||
- Define clusters with various configurations in Terraform. | ||
- Plan and apply changes to provision clusters in Zilliz Cloud. | ||
- Verify the creation of your Zilliz Cloud clusters. | ||
|
||
### Prerequisites | ||
|
||
Before you begin, make sure you have completed the initial setup steps outlined in the [Getting Started with Zilliz Cloud Terraform Provider](./get-start.md) guide. Additionally, ensure that you have the necessary permissions and access credentials to interact with the Zilliz Cloud API. | ||
|
||
|
||
## Retrieving Project IDs in Your Zilliz Cloud Account | ||
|
||
[How Can I Obtain the Project ID ?](https://support.zilliz.com/hc/en-us/articles/22048954409755-How-Can-I-Obtain-the-Project-ID) | ||
|
||
For convenience, you can use the `zillizcloud_project` data source to retrieve the ID of default project for your Zilliz Cloud account. | ||
|
||
|
||
## Acquiring Region IDs for Zilliz Cloud Cluster | ||
|
||
[Cloud Providers & Regions](https://docs.zilliz.com/docs/cloud-providers-and-regions) | ||
|
||
In this tutorial, we will use the `aws-us-east-2` region. | ||
|
||
### Creating a Cluster | ||
|
||
With the `project ID` and `region ID` at hand, creating Zilliz Cloud clusters is straightforward. Below is an illustrative example defining zillizcloud_cluster resources within Terraform configuration: | ||
|
||
|
||
```hcl | ||
data "zillizcloud_project" "default" { | ||
# Fetching the default project information to be used in cluster provisioning | ||
} | ||
resource "zillizcloud_cluster" "standard_plan_cluster" { | ||
cluster_name = "Cluster-02" # The name of the cluster | ||
region_id = "aws-us-east-2" # The region where the cluster will be deployed | ||
plan = "Standard" # The service plan for the cluster | ||
cu_size = "1" # The size of the compute unit | ||
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 | ||
} | ||
``` | ||
This example will create a Zilliz Cloud cluster: | ||
- **Standard Plan Cluster**: This configuration creates a more advanced cluster named "Cluster-02" in the `aws-us-east-2` region. It uses the "Standard" service plan with a compute unit size of 1, optimized for performance, making it suitable for more demanding workloads. | ||
|
||
### Planning and Applying Changes | ||
|
||
Once you've defined the cluster resources, it's time to apply the changes to provision the Zilliz Cloud clusters. Navigate to your Terraform project directory and execute the following commands: | ||
|
||
```bash | ||
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. | ||
|
||
### 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. | ||
|
||
## Next Steps | ||
- [Upgrading Zilliz Cloud Cluster Compute Unit Size with Terraform](./scale-cluster.md) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,48 @@ | ||
# Tutorial: Creating Zilliz a Starter Cloud Cluster Resources with Terraform | ||
|
||
This tutorial guides you through managing Zilliz Cloud clusters using the `zillizcloud_cluster` resource within Terraform. You'll learn how to: | ||
|
||
- Retrieve project and region IDs for cluster creation. | ||
- Define clusters with various configurations in Terraform. | ||
- Plan and apply changes to provision clusters in Zilliz Cloud. | ||
- Verify the creation of your Zilliz Cloud clusters. | ||
|
||
### Prerequisites | ||
|
||
Before you begin, make sure you have completed the initial setup steps outlined in the [Getting Started with Zilliz Cloud Terraform Provider](./get-start.md) guide. Additionally, ensure that you have the necessary permissions and access credentials to interact with the Zilliz Cloud API. | ||
|
||
|
||
### Creating a Cluster | ||
|
||
With the `project ID` at hand, creating Zilliz Cloud clusters is straightforward. Below is an illustrative example defining zillizcloud_cluster resources within Terraform configuration: | ||
|
||
|
||
```hcl | ||
data "zillizcloud_project" "default" {} | ||
resource "zillizcloud_cluster" "starter_cluster" { | ||
cluster_name = "Cluster-01" | ||
project_id = data.zillizcloud_project.default.id | ||
} | ||
``` | ||
This example will create two Zilliz Cloud clusters: | ||
- **Starter Cluster**: This configuration creates a basic cluster named "Cluster-01" within the default project. It's suitable for initial testing or small-scale applications. | ||
|
||
### Planning and Applying Changes | ||
|
||
Once you've defined the cluster resources, it's time to apply the changes to provision the Zilliz Cloud clusters. Navigate to your Terraform project directory and execute the following commands: | ||
|
||
```bash | ||
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. | ||
|
||
### 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. | ||
|
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.