diff --git a/docs/resources/database.md b/docs/resources/database.md index ddd3c98..af6e4ef 100644 --- a/docs/resources/database.md +++ b/docs/resources/database.md @@ -20,7 +20,7 @@ resource "random_pet" "pet_name" {} resource "astra_database" "example_db" { # Required name = substr("my-database-${random_pet.pet_name.id}", 0, 50) - keyspace = "example_keyspace" # 48 characters max + keyspace = "example_keyspace" # optional, 48 characters max cloud_provider = "gcp" regions = ["us-central1"] @@ -71,7 +71,7 @@ output "cqlsh_url" { - `db_type` (String) Database type. Currently only `vector` is supported. Omit this optional field if you want a regular severless database. - `deletion_protection` (Boolean) Whether or not to allow Terraform to destroy the instance. Unless this field is set to false in Terraform state, a `terraform destroy` or `terraform apply` command that deletes the instance will fail. Defaults to `true`. -- `keyspace` (String) Initial keyspace name. For additional keyspaces, use the astra_keyspace resource. If omitted, Astra will use its default, currently 'default_keysapce' +- `keyspace` (String) Initial keyspace name. For additional keyspaces, use the astra_keyspace resource. If omitted, Astra will use its default, currently `default_keyspace` - `timeouts` (Block, Optional) (see [below for nested schema](#nestedblock--timeouts)) ### Read-Only diff --git a/examples/resources/astra_database/resource.tf b/examples/resources/astra_database/resource.tf index a177a77..14d8674 100644 --- a/examples/resources/astra_database/resource.tf +++ b/examples/resources/astra_database/resource.tf @@ -5,7 +5,7 @@ resource "random_pet" "pet_name" {} resource "astra_database" "example_db" { # Required name = substr("my-database-${random_pet.pet_name.id}", 0, 50) - keyspace = "example_keyspace" # 48 characters max + keyspace = "example_keyspace" # optional, 48 characters max cloud_provider = "gcp" regions = ["us-central1"] diff --git a/internal/provider/resource_database.go b/internal/provider/resource_database.go index 8b54f6e..94d3103 100644 --- a/internal/provider/resource_database.go +++ b/internal/provider/resource_database.go @@ -57,7 +57,7 @@ func resourceDatabase() *schema.Resource { Type: schema.TypeString, Required: true, ForceNew: true, - ValidateFunc: validation.StringMatch(regexp.MustCompile("^.{2,}"), "name must be atleast 2 characters"), + ValidateFunc: validation.StringMatch(regexp.MustCompile("^.{2,}"), "name must be at least 2 characters"), }, "cloud_provider": { Description: "The cloud provider to launch the database. (Currently supported: aws, azure, gcp)", @@ -78,7 +78,7 @@ func resourceDatabase() *schema.Resource { }, // Optional "keyspace": { - Description: "Initial keyspace name. For additional keyspaces, use the astra_keyspace resource. If omitted, Astra will use its default, currently 'default_keysapce'", + Description: "Initial keyspace name. For additional keyspaces, use the astra_keyspace resource. If omitted, Astra will use its default, currently `default_keyspace`", Type: schema.TypeString, Optional: true, ForceNew: true,