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

Updated release documentation for GSI #245

Merged
merged 6 commits into from
Dec 11, 2024
Merged
Show file tree
Hide file tree
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 18 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,23 @@
# Changelog

## [v1.4.0](https://github.com/couchbasecloud/terraform-provider-couchbase-capella/tree/v1.4.0) (2024-12-09)

[Full Changelog](https://github.com/couchbasecloud/terraform-provider-couchbase-capella/compare/v1.3.0...v1.4.0)

**Implemented enhancements:**
- \[AV-90715\] Add support for `zones` in Cluster [\#241](https://github.com/couchbasecloud/terraform-provider-couchbase-capella/pull/241) ([PaulomeeCb](https://github.com/PaulomeeCb))
- \[AV-82735\] Add Support for Bucket Flush [\#234](https://github.com/couchbasecloud/terraform-provider-couchbase-capella/pull/234) ([Lagher0](https://github.com/Lagher0))
a-atri marked this conversation as resolved.
Show resolved Hide resolved
- \[AV-76498\] Add Support for GSI Index Management [\#233](https://github.com/couchbasecloud/terraform-provider-couchbase-capella/pull/233) ([l0n3star](https://github.com/l0n3star))
a-atri marked this conversation as resolved.
Show resolved Hide resolved
- \[AV-87139\] Updated gorunner version [\#229](https://github.com/couchbasecloud/terraform-provider-couchbase-capella/pull/229)([a-atri](https://github.com/a-atri))
a-atri marked this conversation as resolved.
Show resolved Hide resolved
- \[AV-78889\] Add support for Azure VNET Peering [\#216](https://github.com/couchbasecloud/terraform-provider-couchbase-capella/pull/216) ([PaulomeeCb](https://github.com/PaulomeeCb))

**Fixed bugs:**
- \[AV-90385\] Added check for unsupported `storage` and `IOPS` values in case of `Azure Premium Disk` [\#240](https://github.com/couchbasecloud/terraform-provider-couchbase-capella/pull/240) ([PaulomeeCb](https://github.com/PaulomeeCb))
a-atri marked this conversation as resolved.
Show resolved Hide resolved
- \[AV-87077\] Resolved false positives in acceptance tests by correcting handling of computed values [\#227](https://github.com/couchbasecloud/terraform-provider-couchbase-capella/pull/202) ([l0n3star](https://github.com/l0n3star))
a-atri marked this conversation as resolved.
Show resolved Hide resolved
- \[AV-86105\] Initialized `autoexpansion` field with null value [\#226](https://github.com/couchbasecloud/terraform-provider-couchbase-capella/pull/226) ([aniket-Kumar-c](https://github.com/aniket-Kumar-c))
a-atri marked this conversation as resolved.
Show resolved Hide resolved



## [v1.3.0](https://github.com/couchbasecloud/terraform-provider-couchbase-capella/tree/v1.3.0) (2024-09-11)

[Full Changelog](https://github.com/couchbasecloud/terraform-provider-couchbase-capella/compare/v1.2.1...v1.3.0)
Expand Down
94 changes: 94 additions & 0 deletions docs/guides/1.4.0-upgrade-guide.md
a-atri marked this conversation as resolved.
Show resolved Hide resolved
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,13 @@ New features in 1.4.0
## New Features
* Enable Flush Bucket [`couchbase-capella_flush`](https://registry.terraform.io/providers/couchbasecloud/couchbase-capella/latest/docs/resources/flush)
* Enable Azure Network Peer [`couchbase-capella_network_peer`](https://registry.terraform.io/providers/couchbasecloud/couchbase-capella/latest/docs/resources/network_peer)
* GSI [`couchbase-capella_query_indexes`](https://registry.terraform.io/providers/couchbasecloud/couchbase-capella/latest/docs/resources/query_indexes)

## Changes

There are no deprecations as part of this release.

1.4.0 also includes general improvements and bug fixes. See the [CHANGELOG](https://github.com/couchbasecloud/terraform-provider-couchbase-capella/blob/master/CHANGELOG.md) for more specific information.


## Flush Bucket
Expand Down Expand Up @@ -114,6 +121,93 @@ resource "couchbase-capella_network_peer" "new_network_peer" {
```
For more information, see the [network peer examples](https://github.com/couchbasecloud/terraform-provider-couchbase-capella/tree/main/examples/network_peer).

## GSI
To create a deferred index, use the `query_indexes` resource as follows:
```
locals {
index_template = templatefile("${path.module}/indexes3.json", {
a-atri marked this conversation as resolved.
Show resolved Hide resolved
organization_id = var.organization_id
project_id = var.project_id
cluster_id = var.cluster_id
})

decoded_template = jsondecode(local.index_template)
index_names = [for idx, details in local.decoded_template.resource["couchbase-capella_indexes"] : details.index_name]
}
```
```
a-atri marked this conversation as resolved.
Show resolved Hide resolved
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
with = {
defer_build = each.value.with.defer_build
}
}
```
```
resource "couchbase-capella_query_indexes" "build_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

build_indexes = local.index_names

depends_on = [couchbase-capella_query_indexes.new_indexes]
}
```
```
data "couchbase-capella_query_index_monitor" "mon_indexes" {
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
indexes = local.index_names

depends_on = [couchbase-capella_query_indexes.build_idx]
}
```
```
output "new_indexes" {
value = couchbase-capella_query_indexes.new_indexes
}
```
For more information, see the [query_indexes](https://github.com/couchbasecloud/terraform-provider-couchbase-capella/tree/main/examples/gsi/deferred).
a-atri marked this conversation as resolved.
Show resolved Hide resolved

To create a non-deferred index, use the `query_indexs` resource as follows:
a-atri marked this conversation as resolved.
Show resolved Hide resolved
```
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
}
```
For more information, see the [query_indexes](https://github.com/couchbasecloud/terraform-provider-couchbase-capella/tree/main/examples/gsi/non_deferred).
a-atri marked this conversation as resolved.
Show resolved Hide resolved

### Helpful Links

- [Getting Started with the Terraform Provider](https://github.com/couchbasecloud/terraform-provider-couchbase-capella/blob/master/examples/getting_started)
Expand Down
Loading