-
Notifications
You must be signed in to change notification settings - Fork 4
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
[AV-87721] GSI release documentation for Terraform V1.4.0 #244
base: AV-87721_release_documentation_for_V1.4.0
Are you sure you want to change the base?
[AV-87721] GSI release documentation for Terraform V1.4.0 #244
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
A few comments
examples/gsi/deferred/README.md
Outdated
|
||
This example shows how to create secondary indexes on a Capella cluster. | ||
|
||
This creates 5 deferred indexes in test.test.test. Deferred indexes are best suited for large indexes, or when creating many indexes. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Maybe spell it out?
This creates 5 deferred indexes in test.test.test. Deferred indexes are best suited for large indexes, or when creating many indexes. | |
This creates 5 deferred indexes in a collection called `test`, which is located in a scope called `test` within a bucket also called `test`. Deferred indexes are best suited for large indexes, or when creating many indexes. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
In addition to what Simon indicated - which is providing the clarify - I though we had discussed this previously and we we were going to use more meaningful names and not just test, test, test - at very laest "mybucket", "myscope" and "mycollection"
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Also many indexes
to multiple indexes
. (Essentially, since we can't give a number, we can leave it as plural)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I updated the examples yesterday so this is outdated. Please see:
https://github.com/couchbasecloud/terraform-provider-couchbase-capella/blob/7147d366f6fffee59b4772e16bf910e33dc9e680/examples/gsi/deferred/README.md
The intro now says:
This example shows how to create secondary indexes on a Capella cluster.
This creates 5 deferred indexes in api.metrics.memory
Deferred indexes are best suited for large indexes (like partitioned indexes), or when creating many indexes. When in doubt, use deferred indexes :)
If creating indexes in bulk, it is strongly recommended to build indexes in batches of 100 or less.
To run configure your Couchbase Capella provider as described in README in the root of this project.
examples/gsi/non_deferred/README.md
Outdated
|
||
This example shows how to create secondary indexes on a Capella cluster. | ||
|
||
This creates 5 non-deferred indexes in test.test.test. Non-deferred indexes are best suited when creating small indexes. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Again, maybe spell it out?
This creates 5 non-deferred indexes in test.test.test. Non-deferred indexes are best suited when creating small indexes. | |
This creates 5 non-deferred indexes in a collection called `test`, which is located in a scope called `test` within a bucket also called `test`. Non-deferred indexes are best suited when creating small indexes. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is outdated. Please see:
https://github.com/couchbasecloud/terraform-provider-couchbase-capella/tree/7147d366f6fffee59b4772e16bf910e33dc9e680/examples/gsi/non_deferred
The intro now says:
This example shows how to create secondary indexes on a Capella cluster.
This creates 1 non-deferred indexes in api.metrics.memory. Non-deferred indexes are best suited when creating 1 small index.
To run configure your Couchbase Capella provider as described in README in the root of this project.
examples/gsi/non_deferred/README.md
Outdated
### Ensure you create indexes.json which is a file with indexes | ||
### Place this file in the same directory as the terraform script. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
As before, I don't like misusing the heading semantics just for emphasis.
### Ensure you create indexes.json which is a file with indexes | |
### Place this file in the same directory as the terraform script. | |
**Ensure you create `indexes.json`, which is a file with indexes.** | |
**Place this file in the same directory as the terraform script.** |
docs/index.md
Outdated
@@ -306,3 +306,7 @@ To get started, see the [Provider Example Configs](https://github.com/couchbasec | |||
|
|||
Manage Flush Bucket | |||
|
|||
* [Manage GSI](https://github.com/couchbasecloud/terraform-provider-couchbase-capella/tree/main/examples/gsi) | |||
|
|||
Manage GSI |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@l0n3star Tagging in reference to discussion on slack thread. Tagging here so we don't miss
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
please note I made significant updates (yesterday) to the non-deferred and deferred examples for several reasons. first, had to include output showing index status. this is priority for priya and request came in 2 days ago. second, updated the examples to give better guidance to users. in particular, we should encourages users to create 1 non-deferred index. third, priya wanted to use different bucket/scope/collection names to make it more user friendly.
please reference updated examples below:
https://github.com/couchbasecloud/terraform-provider-couchbase-capella/tree/7147d366f6fffee59b4772e16bf910e33dc9e680/examples/gsi
@@ -19,6 +19,7 @@ In this demo, we will perform the following operations: | |||
15. Create a new audit log settings. | |||
16. Enable private endpoint service on the cluster. | |||
17. Create a new network peer. | |||
18. Create an index. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What kind of index? GSI and deferred or non-deferred?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It's partitioned index (non-deferred).
Co-authored-by: Simon Dew <39966290+simon-dew@users.noreply.github.com>
locals { | ||
index_template = templatefile("${path.module}/indexes.json", { | ||
organization_id = var.organization_id | ||
project_id = var.project_id | ||
cluster_id = var.cluster_id | ||
}) | ||
} | ||
``` | ||
``` | ||
resource "couchbase-capella_query_indexes" "new_indexes" { | ||
for_each = jsondecode(local.index_template).resource["couchbase-capella_indexes"] | ||
organization_id = each.value.organization_id | ||
project_id = each.value.project_id | ||
cluster_id = each.value.cluster_id | ||
bucket_name = each.value.bucket_name | ||
scope_name = each.value.scope_name | ||
collection_name = each.value.collection_name | ||
index_name = each.value.index_name | ||
index_keys = each.value.index_keys | ||
} | ||
``` |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We should encourage customers to only create 1 non-deferred index. Testing shows creating multiple non-deferred indexes is problematic. So please change to :
resource "couchbase-capella_query_indexes" "idx" {
organization_id = var.organization_id
project_id = var.project_id
cluster_id = var.cluster_id
bucket_name = var.bucket_name
scope_name = var.scope_name
collection_name = var.collection_name
index_name = var.index_name
index_keys = var.index_keys
}
output "idx" {
value = couchbase-capella_query_indexes.idx
}
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This sample config is updated. Please see:
https://github.com/couchbasecloud/terraform-provider-couchbase-capella/blob/7147d366f6fffee59b4772e16bf910e33dc9e680/examples/gsi/deferred/create_indexes.tf
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This file no longer needed for non-deferred example.
Co-authored-by: Simon Dew <39966290+simon-dew@users.noreply.github.com>
… team Co-authored-by: Simon Dew <39966290+simon-dew@users.noreply.github.com>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
Jira
Description
Release documentation of GSI for terraform version V1.4.0
Type of Change
Manual Testing Approach
How was this change tested and do you have evidence? (REQUIRED: Select at least 1)
Testing
Testing
Required Checklist:
Further comments