Skip to content

Commit

Permalink
update examples
Browse files Browse the repository at this point in the history
Signed-off-by: Liang Huang <[email protected]>
  • Loading branch information
yellow-shine committed Mar 4, 2024
1 parent 4860d0a commit 2009892
Show file tree
Hide file tree
Showing 9 changed files with 124 additions and 8 deletions.
3 changes: 0 additions & 3 deletions examples/data-sources/scaffolding_example/data-source.tf

This file was deleted.

13 changes: 13 additions & 0 deletions examples/data-sources/zilliz_cloud_providers/data-source.tf
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
terraform {
required_providers {
zilliz = {
source = "zilliztech/zillizcloud"
}
}
}

provider "zilliz" {
cloud_region_id = "gcp-us-west1"
}

data "zilliz_cloud_providers" "example" {}
17 changes: 17 additions & 0 deletions examples/data-sources/zilliz_cloud_regions/data-source.tf
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
terraform {
required_providers {
zilliz = {
source = "zilliztech/zillizcloud"
}
}
}

provider "zilliz" {
cloud_region_id = "gcp-us-west1"
}

data "zilliz_cloud_providers" "example" {}

data "zilliz_cloud_regions" "example" {
cloud_id = data.zilliz_cloud_providers.example.cloud_providers[0].cloud_id
}
26 changes: 26 additions & 0 deletions examples/data-sources/zilliz_cluster/data-source.tf
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
terraform {
required_providers {
zilliz = {
source = "zilliztech/zillizcloud"
}
}
}

provider "zilliz" {
cloud_region_id = "gcp-us-west1"
}

data "zilliz_projects" "test" {
}

resource "zilliz_cluster" "test" {
plan = "Standard"
cluster_name = "Cluster-Test1"
cu_size = 1
cu_type = "Performance-optimized"
project_id = data.zilliz_projects.test.projects[0].project_id
}

data "zilliz_cluster" "test" {
id = zilliz_cluster.test.id
}
18 changes: 18 additions & 0 deletions examples/data-sources/zilliz_clusters/data-source.tf
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
terraform {
required_providers {
zilliz = {
source = "zilliztech/zillizcloud"
}
}
}

provider "zilliz" {
cloud_region_id = "gcp-us-west1"
}

data "zilliz_clusters" "example" {}

output "clusters" {
value = data.zilliz_clusters.example.clusters
}

13 changes: 13 additions & 0 deletions examples/data-sources/zilliz_projects/data-source.tf
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
terraform {
required_providers {
zilliz = {
source = "zilliztech/zillizcloud"
}
}
}

provider "zilliz" {
cloud_region_id = "gcp-us-west1"
}

data "zilliz_projects" "example" {}
12 changes: 10 additions & 2 deletions examples/provider/provider.tf
Original file line number Diff line number Diff line change
@@ -1,3 +1,11 @@
provider "scaffolding" {
# example configuration here
terraform {
required_providers {
zilliz = {
source = "zilliztech/zillizcloud"
}
}
}

provider "zilliz" {
cloud_region_id = "gcp-us-west1"
}
3 changes: 0 additions & 3 deletions examples/resources/scaffolding_example/resource.tf

This file was deleted.

27 changes: 27 additions & 0 deletions examples/resources/zilliz_cluster/resource.tf
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
terraform {
required_providers {
zilliz = {
source = "zilliztech/zillizcloud"
}
}
}

provider "zilliz" {
cloud_region_id = "gcp-us-west1"
}

data "zilliz_projects" "test" {
}

# resource "zilliz_cluster" "test" {
# plan = "Standard"
# cluster_name = "Cluster-01"
# cu_size = "1"
# cu_type = "Performance-optimized"
# project_id = data.zilliz_projects.test.projects[0].project_id
# }

resource "zilliz_cluster" "serverless_test" {
cluster_name = "Cluster-02"
project_id = data.zilliz_projects.test.projects[0].project_id
}

0 comments on commit 2009892

Please sign in to comment.