couchbasecloud / terraform-provider-couchbase-capella

Terraform Couchbase Capella Provider: Deploy, update, and manage Couchbase Capella infrastructure as code through HashiCorp Terraform
Apache License 2.0
32 stars 4 forks source link

[AV-84160] Make cluster timezone optional #215

Closed Lagher0 closed 2 months ago

Lagher0 commented 3 months ago

Jira

Description

Timezones field for clusters is optional in management API, but not in terraform. This change makes timezone field optional and throws an improved error for invalid timezones for basic support plan.

Type of Change

Manual Testing Approach

Exclude timezone for basic package ``` Terraform apply data.couchbase-capella_clusters.existing_clusters: Reading... data.couchbase-capella_clusters.existing_clusters: Read complete after 1s Terraform used the selected providers to generate the following execution plan. Resource actions are indicated with the following symbols: + create Terraform will perform the following actions: # couchbase-capella_cluster.new_cluster will be created + resource "couchbase-capella_cluster" "new_cluster" { + app_service_id = (known after apply) + audit = (known after apply) + availability = { + type = "single" } + cloud_provider = { + cidr = "192.168.0.0/20" + region = "us-east-1" + type = "aws" } + couchbase_server = (known after apply) + current_state = (known after apply) + description = "My first test cluster for multiple services." + etag = (known after apply) + id = (known after apply) + name = "Terraform Cluster" + organization_id = "8bg13g4b-9cgj-6f5h-d389-g945675c16d0" + project_id = "d2c30c19-1a90-4bf6-9a2e-8dc3a9a43afd" + service_groups = [ + { + node = { + compute = { + cpu = 4 + ram = 16 } + disk = { + autoexpansion = (known after apply) + iops = 5000 + storage = 50 + type = "io2" } } + num_of_nodes = 3 + services = [ + "data", + "index", + "query", ] }, ] + support = { + plan = "basic" + timezone = (known after apply) } } Plan: 1 to add, 0 to change, 0 to destroy. Changes to Outputs: + cluster_id = (known after apply) + clusters_list = { + data = [ + { + app_service_id = null + audit = { + created_at = "2024-08-14 22:05:15.973136361 +0000 UTC" + created_by = "99b8dc97-b8ae-44af-8ccd-897e3802c3cb" + modified_at = "2024-08-14 22:16:30.048801207 +0000 UTC" + modified_by = "99b8dc97-b8ae-44af-8ccd-897e3802c3cb" + version = 9 } + availability = { + type = "multi" } + cloud_provider = { + cidr = "10.0.11.0/24" + region = "us-east-1" + type = "aws" } + couchbase_server = { + version = "7.6.2" } + current_state = "turnedOff" + description = "" + id = "78a4f313-fd4a-4e6c-a8f8-91d8e7f01fca" + name = "xdcr-s" + organization_id = "8bg13g4b-9cgj-6f5h-d389-g945675c16d0" + project_id = "d2c30c19-1a90-4bf6-9a2e-8dc3a9a43afd" + service_groups = [ + { + node = { + compute = { + cpu = 8 + ram = 16 } + disk = { + autoexpansion = null + iops = 3000 + storage = 50 + type = "gp3" } } + num_of_nodes = 3 + services = [ + "index", + "data", + "query", ] }, ] + support = { + plan = "developer pro" + timezone = "PT" } }, + { + app_service_id = null + audit = { + created_at = "2024-08-15 01:58:11.418207711 +0000 UTC" + created_by = "15c82fa5-d24e-4bd6-b7ae-acf3d026a133" + modified_at = "2024-08-15 02:00:57.762728749 +0000 UTC" + modified_by = "15c82fa5-d24e-4bd6-b7ae-acf3d026a133" + version = 5 } + availability = { + type = "single" } + cloud_provider = { + cidr = "10.0.10.0/24" + region = "us-east-1" + type = "aws" } + couchbase_server = { + version = "7.6.2" } + current_state = "healthy" + description = "" + id = "e8bad75c-1acc-4a8d-a00f-70dd4993936f" + name = "mintdennisritchie" + organization_id = "8bg13g4b-9cgj-6f5h-d389-g945675c16d0" + project_id = "d2c30c19-1a90-4bf6-9a2e-8dc3a9a43afd" + service_groups = [ + { + node = { + compute = { + cpu = 4 + ram = 16 } + disk = { + autoexpansion = null + iops = 3000 + storage = 50 + type = "gp3" } } + num_of_nodes = 1 + services = [ + "search", + "index", + "data", + "query", ] }, ] + support = { + plan = "developer pro" + timezone = "PT" } }, + { + app_service_id = null + audit = { + created_at = "2024-08-15 06:14:35.605118068 +0000 UTC" + created_by = "fa7fa7ea-ed3c-4252-9dc5-366378c4f123" + modified_at = "2024-08-15 06:17:26.683888099 +0000 UTC" + modified_by = "fa7fa7ea-ed3c-4252-9dc5-366378c4f123" + version = 5 } + availability = { + type = "single" } + cloud_provider = { + cidr = "10.0.13.0/24" + region = "us-east-1" + type = "aws" } + couchbase_server = { + version = "7.6.2" } + current_state = "healthy" + description = "" + id = "f609bbc4-d7cb-4afa-9439-c1993e7bd3bf" + name = "karan-test" + organization_id = "8bg13g4b-9cgj-6f5h-d389-g945675c16d0" + project_id = "d2c30c19-1a90-4bf6-9a2e-8dc3a9a43afd" + service_groups = [ + { + node = { + compute = { + cpu = 4 + ram = 16 } + disk = { + autoexpansion = null + iops = 3000 + storage = 50 + type = "gp3" } } + num_of_nodes = 1 + services = [ + "search", + "index", + "data", + "query", ] }, ] + support = { + plan = "developer pro" + timezone = "PT" } }, ] + organization_id = "8bg13g4b-9cgj-6f5h-d389-g945675c16d0" + project_id = "d2c30c19-1a90-4bf6-9a2e-8dc3a9a43afd" } + new_cluster = { + app_service_id = (known after apply) + audit = (known after apply) + availability = { + type = "single" } + cloud_provider = { + cidr = "192.168.0.0/20" + region = "us-east-1" + type = "aws" } + couchbase_server = (known after apply) + current_state = (known after apply) + description = "My first test cluster for multiple services." + etag = (known after apply) + id = (known after apply) + if_match = null + name = "Terraform Cluster" + organization_id = "8bg13g4b-9cgj-6f5h-d389-g945675c16d0" + project_id = "d2c30c19-1a90-4bf6-9a2e-8dc3a9a43afd" + service_groups = [ + { + node = { + compute = { + cpu = 4 + ram = 16 } + disk = { + autoexpansion = (known after apply) + iops = 5000 + storage = 50 + type = "io2" } } + num_of_nodes = 3 + services = [ + "data", + "index", + "query", ] }, ] + support = { + plan = "basic" + timezone = (known after apply) } } Do you want to perform these actions? Terraform will perform the actions described above. Only 'yes' will be accepted to approve. Enter a value: yes couchbase-capella_cluster.new_cluster: Creating... couchbase-capella_cluster.new_cluster: Still creating... [10s elapsed] couchbase-capella_cluster.new_cluster: Still creating... [20s elapsed] couchbase-capella_cluster.new_cluster: Still creating... [30s elapsed] couchbase-capella_cluster.new_cluster: Still creating... [40s elapsed] couchbase-capella_cluster.new_cluster: Still creating... [50s elapsed] couchbase-capella_cluster.new_cluster: Still creating... [1m0s elapsed] couchbase-capella_cluster.new_cluster: Still creating... [1m10s elapsed] couchbase-capella_cluster.new_cluster: Still creating... [1m20s elapsed] couchbase-capella_cluster.new_cluster: Still creating... [1m30s elapsed] couchbase-capella_cluster.new_cluster: Still creating... [1m40s elapsed] couchbase-capella_cluster.new_cluster: Still creating... [1m50s elapsed] couchbase-capella_cluster.new_cluster: Still creating... [2m0s elapsed] couchbase-capella_cluster.new_cluster: Still creating... [2m10s elapsed] couchbase-capella_cluster.new_cluster: Still creating... [2m20s elapsed] couchbase-capella_cluster.new_cluster: Still creating... [2m30s elapsed] couchbase-capella_cluster.new_cluster: Still creating... [2m40s elapsed] couchbase-capella_cluster.new_cluster: Still creating... [2m50s elapsed] couchbase-capella_cluster.new_cluster: Still creating... [3m0s elapsed] couchbase-capella_cluster.new_cluster: Creation complete after 3m1s [id=b7926d4f-0d94-4b70-9734-4aa250ac288a] Apply complete! Resources: 1 added, 0 changed, 0 destroyed. Outputs: cluster_id = "b7926d4f-0d94-4b70-9734-4aa250ac288a" clusters_list = { "data" = tolist([ { "app_service_id" = tostring(null) "audit" = { "created_at" = "2024-08-14 22:05:15.973136361 +0000 UTC" "created_by" = "99b8dc97-b8ae-44af-8ccd-897e3802c3cb" "modified_at" = "2024-08-14 22:16:30.048801207 +0000 UTC" "modified_by" = "99b8dc97-b8ae-44af-8ccd-897e3802c3cb" "version" = 9 } "availability" = { "type" = "multi" } "cloud_provider" = { "cidr" = "10.0.11.0/24" "region" = "us-east-1" "type" = "aws" } "couchbase_server" = { "version" = "7.6.2" } "current_state" = "turnedOff" "description" = "" "id" = "78a4f313-fd4a-4e6c-a8f8-91d8e7f01fca" "name" = "xdcr-s" "organization_id" = "8bg13g4b-9cgj-6f5h-d389-g945675c16d0" "project_id" = "d2c30c19-1a90-4bf6-9a2e-8dc3a9a43afd" "service_groups" = tolist([ { "node" = { "compute" = { "cpu" = 8 "ram" = 16 } "disk" = { "autoexpansion" = tobool(null) "iops" = 3000 "storage" = 50 "type" = "gp3" } } "num_of_nodes" = 3 "services" = tolist([ "index", "data", "query", ]) }, ]) "support" = { "plan" = "developer pro" "timezone" = "PT" } }, { "app_service_id" = tostring(null) "audit" = { "created_at" = "2024-08-15 01:58:11.418207711 +0000 UTC" "created_by" = "15c82fa5-d24e-4bd6-b7ae-acf3d026a133" "modified_at" = "2024-08-15 02:00:57.762728749 +0000 UTC" "modified_by" = "15c82fa5-d24e-4bd6-b7ae-acf3d026a133" "version" = 5 } "availability" = { "type" = "single" } "cloud_provider" = { "cidr" = "10.0.10.0/24" "region" = "us-east-1" "type" = "aws" } "couchbase_server" = { "version" = "7.6.2" } "current_state" = "healthy" "description" = "" "id" = "e8bad75c-1acc-4a8d-a00f-70dd4993936f" "name" = "mintdennisritchie" "organization_id" = "8bg13g4b-9cgj-6f5h-d389-g945675c16d0" "project_id" = "d2c30c19-1a90-4bf6-9a2e-8dc3a9a43afd" "service_groups" = tolist([ { "node" = { "compute" = { "cpu" = 4 "ram" = 16 } "disk" = { "autoexpansion" = tobool(null) "iops" = 3000 "storage" = 50 "type" = "gp3" } } "num_of_nodes" = 1 "services" = tolist([ "search", "index", "data", "query", ]) }, ]) "support" = { "plan" = "developer pro" "timezone" = "PT" } }, { "app_service_id" = tostring(null) "audit" = { "created_at" = "2024-08-15 06:14:35.605118068 +0000 UTC" "created_by" = "fa7fa7ea-ed3c-4252-9dc5-366378c4f123" "modified_at" = "2024-08-15 06:17:26.683888099 +0000 UTC" "modified_by" = "fa7fa7ea-ed3c-4252-9dc5-366378c4f123" "version" = 5 } "availability" = { "type" = "single" } "cloud_provider" = { "cidr" = "10.0.13.0/24" "region" = "us-east-1" "type" = "aws" } "couchbase_server" = { "version" = "7.6.2" } "current_state" = "healthy" "description" = "" "id" = "f609bbc4-d7cb-4afa-9439-c1993e7bd3bf" "name" = "karan-test" "organization_id" = "8bg13g4b-9cgj-6f5h-d389-g945675c16d0" "project_id" = "d2c30c19-1a90-4bf6-9a2e-8dc3a9a43afd" "service_groups" = tolist([ { "node" = { "compute" = { "cpu" = 4 "ram" = 16 } "disk" = { "autoexpansion" = tobool(null) "iops" = 3000 "storage" = 50 "type" = "gp3" } } "num_of_nodes" = 1 "services" = tolist([ "search", "index", "data", "query", ]) }, ]) "support" = { "plan" = "developer pro" "timezone" = "PT" } }, ]) "organization_id" = "8bg13g4b-9cgj-6f5h-d389-g945675c16d0" "project_id" = "d2c30c19-1a90-4bf6-9a2e-8dc3a9a43afd" } new_cluster = { "app_service_id" = tostring(null) "audit" = { "created_at" = "2024-08-15 09:02:31.953609263 +0000 UTC" "created_by" = "dauB4uH5NvuJtsGdLplNlcExgVHCyYEM" "modified_at" = "2024-08-15 09:05:24.65201911 +0000 UTC" "modified_by" = "apikey-apikey-dauB4uH5NvuJtsGdLplNlcExgVHCyYEM" "version" = 5 } "availability" = { "type" = "single" } "cloud_provider" = { "cidr" = "192.168.0.0/20" "region" = "us-east-1" "type" = "aws" } "couchbase_server" = { "version" = "7.6" } "current_state" = "healthy" "description" = "My first test cluster for multiple services." "etag" = "Version: 5" "id" = "b7926d4f-0d94-4b70-9734-4aa250ac288a" "if_match" = tostring(null) "name" = "Terraform Cluster" "organization_id" = "8bg13g4b-9cgj-6f5h-d389-g945675c16d0" "project_id" = "d2c30c19-1a90-4bf6-9a2e-8dc3a9a43afd" "service_groups" = toset([ { "node" = { "compute" = { "cpu" = 4 "ram" = 16 } "disk" = { "autoexpansion" = tobool(null) "iops" = 5000 "storage" = 50 "type" = "io2" } } "num_of_nodes" = 3 "services" = toset([ "data", "index", "query", ]) }, ]) "support" = { "plan" = "basic" "timezone" = "PT" } } ```
Throw error on non-PT timezone for create ``` terraform apply data.couchbase-capella_clusters.existing_clusters: Reading... data.couchbase-capella_clusters.existing_clusters: Read complete after 1s Terraform used the selected providers to generate the following execution plan. Resource actions are indicated with the following symbols: + create Terraform will perform the following actions: # couchbase-capella_cluster.new_cluster will be created + resource "couchbase-capella_cluster" "new_cluster" { + app_service_id = (known after apply) + audit = (known after apply) + availability = { + type = "single" } + cloud_provider = { + cidr = "192.168.0.0/20" + region = "us-east-1" + type = "aws" } + couchbase_server = (known after apply) + current_state = (known after apply) + description = "My first test cluster for multiple services." + etag = (known after apply) + id = (known after apply) + name = "Terraform Cluster" + organization_id = "8bg13g4b-9cgj-6f5h-d389-g945675c16d0" + project_id = "d2c30c19-1a90-4bf6-9a2e-8dc3a9a43afd" + service_groups = [ + { + node = { + compute = { + cpu = 4 + ram = 16 } + disk = { + autoexpansion = (known after apply) + iops = 5000 + storage = 50 + type = "io2" } } + num_of_nodes = 3 + services = [ + "data", + "index", + "query", ] }, ] + support = { + plan = "basic" + timezone = "GMT" } } Plan: 1 to add, 0 to change, 0 to destroy. Changes to Outputs: + cluster_id = (known after apply) + clusters_list = { + data = [ + { + app_service_id = null + audit = { + created_at = "2024-08-15 01:58:11.418207711 +0000 UTC" + created_by = "15c82fa5-d24e-4bd6-b7ae-acf3d026a133" + modified_at = "2024-08-15 02:00:57.762728749 +0000 UTC" + modified_by = "15c82fa5-d24e-4bd6-b7ae-acf3d026a133" + version = 5 } + availability = { + type = "single" } + cloud_provider = { + cidr = "10.0.10.0/24" + region = "us-east-1" + type = "aws" } + couchbase_server = { + version = "7.6.2" } + current_state = "healthy" + description = "" + id = "e8bad75c-1acc-4a8d-a00f-70dd4993936f" + name = "mintdennisritchie" + organization_id = "8bg13g4b-9cgj-6f5h-d389-g945675c16d0" + project_id = "d2c30c19-1a90-4bf6-9a2e-8dc3a9a43afd" + service_groups = [ + { + node = { + compute = { + cpu = 4 + ram = 16 } + disk = { + autoexpansion = null + iops = 3000 + storage = 50 + type = "gp3" } } + num_of_nodes = 1 + services = [ + "search", + "index", + "data", + "query", ] }, ] + support = { + plan = "developer pro" + timezone = "PT" } }, + { + app_service_id = null + audit = { + created_at = "2024-08-15 06:14:35.605118068 +0000 UTC" + created_by = "fa7fa7ea-ed3c-4252-9dc5-366378c4f123" + modified_at = "2024-08-15 06:17:26.683888099 +0000 UTC" + modified_by = "fa7fa7ea-ed3c-4252-9dc5-366378c4f123" + version = 5 } + availability = { + type = "single" } + cloud_provider = { + cidr = "10.0.13.0/24" + region = "us-east-1" + type = "aws" } + couchbase_server = { + version = "7.6.2" } + current_state = "healthy" + description = "" + id = "f609bbc4-d7cb-4afa-9439-c1993e7bd3bf" + name = "karan-test" + organization_id = "8bg13g4b-9cgj-6f5h-d389-g945675c16d0" + project_id = "d2c30c19-1a90-4bf6-9a2e-8dc3a9a43afd" + service_groups = [ + { + node = { + compute = { + cpu = 4 + ram = 16 } + disk = { + autoexpansion = null + iops = 3000 + storage = 50 + type = "gp3" } } + num_of_nodes = 1 + services = [ + "search", + "index", + "data", + "query", ] }, ] + support = { + plan = "developer pro" + timezone = "PT" } }, ] + organization_id = "8bg13g4b-9cgj-6f5h-d389-g945675c16d0" + project_id = "d2c30c19-1a90-4bf6-9a2e-8dc3a9a43afd" } + new_cluster = { + app_service_id = (known after apply) + audit = (known after apply) + availability = { + type = "single" } + cloud_provider = { + cidr = "192.168.0.0/20" + region = "us-east-1" + type = "aws" } + couchbase_server = (known after apply) + current_state = (known after apply) + description = "My first test cluster for multiple services." + etag = (known after apply) + id = (known after apply) + if_match = null + name = "Terraform Cluster" + organization_id = "8bg13g4b-9cgj-6f5h-d389-g945675c16d0" + project_id = "d2c30c19-1a90-4bf6-9a2e-8dc3a9a43afd" + service_groups = [ + { + node = { + compute = { + cpu = 4 + ram = 16 } + disk = { + autoexpansion = (known after apply) + iops = 5000 + storage = 50 + type = "io2" } } + num_of_nodes = 3 + services = [ + "data", + "index", + "query", ] }, ] + support = { + plan = "basic" + timezone = "GMT" } } Do you want to perform these actions? Terraform will perform the actions described above. Only 'yes' will be accepted to approve. Enter a value: yes couchbase-capella_cluster.new_cluster: Creating... ╷ │ Error: Error creating cluster │ │ with couchbase-capella_cluster.new_cluster, │ on create_cluster.tf line 9, in resource "couchbase-capella_cluster" "new_cluster": │ 9: resource "couchbase-capella_cluster" "new_cluster" { │ │ Could not create cluster, unexpected error: Invalid timezone provided for basic cluster ```
Throw error on non-PT timezone for update ``` terraform apply data.couchbase-capella_clusters.existing_clusters: Reading... couchbase-capella_cluster.new_cluster: Refreshing state... [id=b7926d4f-0d94-4b70-9734-4aa250ac288a] data.couchbase-capella_clusters.existing_clusters: Read complete after 1s Terraform used the selected providers to generate the following execution plan. Resource actions are indicated with the following symbols: ~ update in-place Terraform will perform the following actions: # couchbase-capella_cluster.new_cluster will be updated in-place ~ resource "couchbase-capella_cluster" "new_cluster" { + app_service_id = (known after apply) ~ audit = { ~ created_at = "2024-08-15 09:02:31.953609263 +0000 UTC" -> (known after apply) ~ created_by = "dauB4uH5NvuJtsGdLplNlcExgVHCyYEM" -> (known after apply) ~ modified_at = "2024-08-15 09:21:25.354903101 +0000 UTC" -> (known after apply) ~ modified_by = "apikey-apikey-dauB4uH5NvuJtsGdLplNlcExgVHCyYEM" -> (known after apply) ~ version = 10 -> (known after apply) } -> (known after apply) ~ current_state = "healthy" -> (known after apply) ~ etag = "Version: 10" -> (known after apply) id = "b7926d4f-0d94-4b70-9734-4aa250ac288a" name = "Terraform Cluster" ~ service_groups = [ - { - node = { - compute = { - cpu = 4 -> null - ram = 16 -> null } -> null - disk = { - iops = 5000 -> null - storage = 50 -> null - type = "io2" -> null } -> null } -> null - num_of_nodes = 3 -> null - services = [ - "data", - "index", - "query", ] -> null }, + { + node = { + compute = { + cpu = 4 + ram = 16 } + disk = { + autoexpansion = (known after apply) + iops = 5000 + storage = 50 + type = "io2" } } + num_of_nodes = 3 + services = [ + "data", + "index", + "query", ] }, ] ~ support = { ~ timezone = "PT" -> "GMT" # (1 unchanged attribute hidden) } # (6 unchanged attributes hidden) } Plan: 0 to add, 1 to change, 0 to destroy. Changes to Outputs: ~ clusters_list = { ~ data = [ ~ { ~ audit = { ~ created_at = "2024-08-14 22:05:15.973136361 +0000 UTC" -> "2024-08-15 09:02:31.953609263 +0000 UTC" ~ created_by = "99b8dc97-b8ae-44af-8ccd-897e3802c3cb" -> "dauB4uH5NvuJtsGdLplNlcExgVHCyYEM" ~ modified_at = "2024-08-14 22:16:30.048801207 +0000 UTC" -> "2024-08-15 09:21:25.354903101 +0000 UTC" ~ modified_by = "99b8dc97-b8ae-44af-8ccd-897e3802c3cb" -> "apikey-apikey-dauB4uH5NvuJtsGdLplNlcExgVHCyYEM" ~ version = 9 -> 10 } ~ availability = { ~ type = "multi" -> "single" } ~ cloud_provider = { ~ cidr = "10.0.11.0/24" -> "192.168.0.0/20" # (2 unchanged attributes hidden) } ~ current_state = "turnedOff" -> "healthy" ~ description = "" -> "My first test cluster for multiple services." ~ id = "78a4f313-fd4a-4e6c-a8f8-91d8e7f01fca" -> "b7926d4f-0d94-4b70-9734-4aa250ac288a" ~ name = "xdcr-s" -> "Terraform Cluster" ~ service_groups = [ ~ { ~ node = { ~ compute = { ~ cpu = 8 -> 4 # (1 unchanged attribute hidden) } ~ disk = { ~ iops = 3000 -> 5000 ~ type = "gp3" -> "io2" # (2 unchanged attributes hidden) } } # (2 unchanged attributes hidden) }, ] ~ support = { ~ plan = "developer pro" -> "basic" # (1 unchanged attribute hidden) } # (4 unchanged attributes hidden) }, - { - app_service_id = null - audit = { - created_at = "2024-08-15 09:02:31.953609263 +0000 UTC" - created_by = "dauB4uH5NvuJtsGdLplNlcExgVHCyYEM" - modified_at = "2024-08-15 09:05:24.65201911 +0000 UTC" - modified_by = "apikey-apikey-dauB4uH5NvuJtsGdLplNlcExgVHCyYEM" - version = 5 } - availability = { - type = "single" } - cloud_provider = { - cidr = "192.168.0.0/20" - region = "us-east-1" - type = "aws" } - couchbase_server = { - version = "7.6.2" } - current_state = "healthy" - description = "My first test cluster for multiple services." - id = "b7926d4f-0d94-4b70-9734-4aa250ac288a" - name = "Terraform Cluster" - organization_id = "8bg13g4b-9cgj-6f5h-d389-g945675c16d0" - project_id = "d2c30c19-1a90-4bf6-9a2e-8dc3a9a43afd" - service_groups = [ - { - node = { - compute = { - cpu = 4 - ram = 16 } - disk = { - autoexpansion = null - iops = 5000 - storage = 50 - type = "io2" } } - num_of_nodes = 3 - services = [ - "index", - "data", - "query", ] }, ] - support = { - plan = "basic" - timezone = "PT" } }, { app_service_id = null audit = { created_at = "2024-08-15 01:58:11.418207711 +0000 UTC" created_by = "15c82fa5-d24e-4bd6-b7ae-acf3d026a133" modified_at = "2024-08-15 02:00:57.762728749 +0000 UTC" modified_by = "15c82fa5-d24e-4bd6-b7ae-acf3d026a133" version = 5 } availability = { type = "single" } cloud_provider = { cidr = "10.0.10.0/24" region = "us-east-1" type = "aws" } couchbase_server = { version = "7.6.2" } current_state = "healthy" description = "" id = "e8bad75c-1acc-4a8d-a00f-70dd4993936f" name = "mintdennisritchie" organization_id = "8bg13g4b-9cgj-6f5h-d389-g945675c16d0" project_id = "d2c30c19-1a90-4bf6-9a2e-8dc3a9a43afd" service_groups = [ { node = { compute = { cpu = 4 ram = 16 } disk = { autoexpansion = null iops = 3000 storage = 50 type = "gp3" } } num_of_nodes = 1 services = [ "search", "index", "data", "query", ] }, ] support = { plan = "developer pro" timezone = "PT" } }, # (1 unchanged element hidden) ] # (2 unchanged attributes hidden) } ~ new_cluster = { + app_service_id = (known after apply) ~ audit = { - created_at = "2024-08-15 09:02:31.953609263 +0000 UTC" - created_by = "dauB4uH5NvuJtsGdLplNlcExgVHCyYEM" - modified_at = "2024-08-15 09:05:24.65201911 +0000 UTC" - modified_by = "apikey-apikey-dauB4uH5NvuJtsGdLplNlcExgVHCyYEM" - version = 5 } -> (known after apply) ~ current_state = "healthy" -> (known after apply) ~ etag = "Version: 5" -> (known after apply) id = "b7926d4f-0d94-4b70-9734-4aa250ac288a" name = "Terraform Cluster" ~ service_groups = [ ~ { ~ node = { ~ disk = { + autoexpansion = (known after apply) # (3 unchanged attributes hidden) } # (1 unchanged attribute hidden) } # (2 unchanged attributes hidden) }, ] ~ support = { ~ timezone = "PT" -> "GMT" # (1 unchanged attribute hidden) } # (7 unchanged attributes hidden) } Do you want to perform these actions? Terraform will perform the actions described above. Only 'yes' will be accepted to approve. Enter a value: yes couchbase-capella_cluster.new_cluster: Modifying... [id=b7926d4f-0d94-4b70-9734-4aa250ac288a] ╷ │ Error: Error creating cluster │ │ with couchbase-capella_cluster.new_cluster, │ on create_cluster.tf line 9, in resource "couchbase-capella_cluster" "new_cluster": │ 9: resource "couchbase-capella_cluster" "new_cluster" { │ │ Could not update cluster, unexpected error: Invalid timezone provided for basic cluster ```

How was this change tested and do you have evidence? (REQUIRED: Select at least 1)

Testing

In ticket comments

Required Checklist:

SaicharanCB commented 2 months ago

adding the test result go test -timeout=1000m -run TestAccClusterResourceWithReqFieldsAWSBasicPlan raw state map[%:15 audit.%:5 audit.created_at:2024-08-27 18:47:52.439933683 +0000 UTC audit.created_by:7hH8aOcQmkEw40i3LxqFTA6LAQ8vczqx audit.modified_at:2024-08-27 18:50:51.999779447 +0000 UTC audit.modified_by:apikey-apikey-7hH8aOcQmkEw40i3LxqFTA6LAQ8vczqx audit.version:5 availability.%:1 availability.type:single cloud_provider.%:3 cloud_provider.cidr:10.255.250.0/23 cloud_provider.region:us-east-1 cloud_provider.type:aws couchbase_server.%:1 couchbase_server.version:7.6 current_state:healthy description: etag:Version: 5 id:eb9a8cb9-da32-4619-aa77-092466cefaf1 name:acc_cluster_bgthplxumk organization_id:6af08c0a-8cab-4c1c-b257-b521575c16d0 project_id:7bb6ad70-bc85-4406-9cb9-ad5f57f192f1 service_groups.#:1 service_groups.0.%:3 service_groups.0.node.%:2 service_groups.0.node.compute.%:2 service_groups.0.node.compute.cpu:4 service_groups.0.node.compute.ram:16 service_groups.0.node.disk.%:4 service_groups.0.node.disk.iops:3000 service_groups.0.node.disk.storage:50 service_groups.0.node.disk.type:io2 service_groups.0.num_of_nodes:3 service_groups.0.services.#:3 service_groups.0.services.0:data service_groups.0.services.1:index service_groups.0.services.2:query support.%:2 support.plan:basic support.timezone:PT]raw state map[%:15 audit.%:5 audit.created_at:2024-08-27 18:47:52.439933683 +0000 UTC audit.created_by:7hH8aOcQmkEw40i3LxqFTA6LAQ8vczqx audit.modified_at:2024-08-27 18:50:51.999779447 +0000 UTC audit.modified_by:apikey-apikey-7hH8aOcQmkEw40i3LxqFTA6LAQ8vczqx audit.version:5 availability.%:1 availability.type:single cloud_provider.%:3 cloud_provider.cidr:10.255.250.0/23 cloud_provider.region:us-east-1 cloud_provider.type:aws couchbase_server.%:1 couchbase_server.version:7.6 current_state:healthy description: etag:Version: 5 id:eb9a8cb9-da32-4619-aa77-092466cefaf1 name:acc_cluster_bgthplxumk organization_id:6af08c0a-8cab-4c1c-b257-b521575c16d0 project_id:7bb6ad70-bc85-4406-9cb9-ad5f57f192f1 service_groups.#:1 service_groups.0.%:3 service_groups.0.node.%:2 service_groups.0.node.compute.%:2 service_groups.0.node.compute.cpu:4 service_groups.0.node.compute.ram:16 service_groups.0.node.disk.%:4 service_groups.0.node.disk.iops:3000 service_groups.0.node.disk.storage:50 service_groups.0.node.disk.type:io2 service_groups.0.num_of_nodes:3 service_groups.0.services.#:3 service_groups.0.services.0:data service_groups.0.services.1:index service_groups.0.services.2:query support.%:2 support.plan:basic support.timezone:PT]raw state map[%:15 audit.%:5 audit.created_at:2024-08-27 18:47:52.439933683 +0000 UTC audit.created_by:7hH8aOcQmkEw40i3LxqFTA6LAQ8vczqx audit.modified_at:2024-08-27 18:57:35.799099912 +0000 UTC audit.modified_by:apikey-apikey-7hH8aOcQmkEw40i3LxqFTA6LAQ8vczqx audit.version:11 availability.%:1 availability.type:single cloud_provider.%:3 cloud_provider.cidr:10.255.250.0/23 cloud_provider.region:us-east-1 cloud_provider.type:aws couchbase_server.%:1 couchbase_server.version:7.6 current_state:healthy description:Cluster Updated. etag:Version: 11 id:eb9a8cb9-da32-4619-aa77-092466cefaf1 if_match:5 name:Terraform Acceptance Test Cluster Update organization_id:6af08c0a-8cab-4c1c-b257-b521575c16d0 project_id:7bb6ad70-bc85-4406-9cb9-ad5f57f192f1 service_groups.#:2 service_groups.0.%:3 service_groups.0.node.%:2 service_groups.0.node.compute.%:2 service_groups.0.node.compute.cpu:4 service_groups.0.node.compute.ram:16 service_groups.0.node.disk.%:4 service_groups.0.node.disk.iops:3001 service_groups.0.node.disk.storage:51 service_groups.0.node.disk.type:gp3 service_groups.0.num_of_nodes:3 service_groups.0.services.#:1 service_groups.0.services.0:data service_groups.1.%:3 service_groups.1.node.%:2 service_groups.1.node.compute.%:2 service_groups.1.node.compute.cpu:8 service_groups.1.node.compute.ram:32 service_groups.1.node.disk.%:4 service_groups.1.node.disk.iops:3001 service_groups.1.node.disk.storage:51 service_groups.1.node.disk.type:gp3 service_groups.1.num_of_nodes:2 service_groups.1.services.#:2 service_groups.1.services.0:index service_groups.1.services.1:query support.%:2 support.plan:basic support.timezone:PT]raw state map[%:15 audit.%:5 audit.created_at:2024-08-27 19:00:05.23384721 +0000 UTC audit.created_by:7hH8aOcQmkEw40i3LxqFTA6LAQ8vczqx audit.modified_at:2024-08-27 19:03:56.347768732 +0000 UTC audit.modified_by:apikey-apikey-7hH8aOcQmkEw40i3LxqFTA6LAQ8vczqx audit.version:5 availability.%:1 availability.type:multi cloud_provider.%:3 cloud_provider.cidr:10.255.250.0/23 cloud_provider.region:us-east-1 cloud_provider.type:aws couchbase_server.%:1 couchbase_server.version:7.6 current_state:healthy description:Cluster Updated. etag:Version: 5 id:34de600b-be57-4e37-8fd5-b3b09814b626 name:Terraform Acceptance Test Cluster Update 2 organization_id:6af08c0a-8cab-4c1c-b257-b521575c16d0 project_id:7bb6ad70-bc85-4406-9cb9-ad5f57f192f1 service_groups.#:2 service_groups.0.%:3 service_groups.0.node.%:2 service_groups.0.node.compute.%:2 service_groups.0.node.compute.cpu:4 service_groups.0.node.compute.ram:16 service_groups.0.node.disk.%:4 service_groups.0.node.disk.iops:3001 service_groups.0.node.disk.storage:51 service_groups.0.node.disk.type:gp3 service_groups.0.num_of_nodes:3 service_groups.0.services.#:1 service_groups.0.services.0:data service_groups.1.%:3 service_groups.1.node.%:2 service_groups.1.node.compute.%:2 service_groups.1.node.compute.cpu:8 service_groups.1.node.compute.ram:32 service_groups.1.node.disk.%:4 service_groups.1.node.disk.iops:3001 service_groups.1.node.disk.storage:51 service_groups.1.node.disk.type:gp3 service_groups.1.num_of_nodes:2 service_groups.1.services.#:2 service_groups.1.services.0:index service_groups.1.services.1:query support.%:2 support.plan:enterprise support.timezone:IST]PASS ok github.com/couchbasecloud/terraform-provider-couchbase-capella/internal/resources/acceptance_tests 1157.706s