diff --git a/examples/allowlist/create_allowlist.tf b/examples/allowlist/create_allowlist.tf index c9158811..e980234b 100644 --- a/examples/allowlist/create_allowlist.tf +++ b/examples/allowlist/create_allowlist.tf @@ -1,12 +1,12 @@ output "new_allowlist" { - value = capella_allowlist.new_allowlist + value = couchbase-capella_allowlist.new_allowlist } output "allowlist_id" { - value = capella_allowlist.new_allowlist.id + value = couchbase-capella_allowlist.new_allowlist.id } -resource "capella_allowlist" "new_allowlist" { +resource "couchbase-capella_allowlist" "new_allowlist" { organization_id = var.organization_id project_id = var.project_id cluster_id = var.cluster_id diff --git a/examples/allowlist/list_allowlists.tf b/examples/allowlist/list_allowlists.tf index 01b42921..bb8a3a66 100644 --- a/examples/allowlist/list_allowlists.tf +++ b/examples/allowlist/list_allowlists.tf @@ -1,8 +1,8 @@ output "allowlists_list" { - value = data.capella_allowlists.existing_allowlists + value = data.couchbase-capella_allowlists.existing_allowlists } -data "capella_allowlists" "existing_allowlists" { +data "couchbase-capella_allowlists" "existing_allowlists" { organization_id = var.organization_id project_id = var.project_id cluster_id = var.cluster_id diff --git a/examples/apikey/create_apikey.tf b/examples/apikey/create_apikey.tf index 0ae8c18a..de47f544 100644 --- a/examples/apikey/create_apikey.tf +++ b/examples/apikey/create_apikey.tf @@ -1,13 +1,13 @@ output "new_apikey" { - value = capella_apikey.new_apikey + value = couchbase-capella_apikey.new_apikey sensitive = true } output "apikey_id" { - value = capella_apikey.new_apikey.id + value = couchbase-capella_apikey.new_apikey.id } -resource "capella_apikey" "new_apikey" { +resource "couchbase-capella_apikey" "new_apikey" { organization_id = var.organization_id name = var.apikey.name description = var.apikey.description diff --git a/examples/apikey/list_apikeys.tf b/examples/apikey/list_apikeys.tf index 15cc7039..504caf46 100644 --- a/examples/apikey/list_apikeys.tf +++ b/examples/apikey/list_apikeys.tf @@ -1,7 +1,7 @@ output "apikeys_list" { - value = data.capella_apikeys.existing_apikeys + value = data.couchbase-capella_apikeys.existing_apikeys } -data "capella_apikeys" "existing_apikeys" { +data "couchbase-capella_apikeys" "existing_apikeys" { organization_id = var.organization_id } diff --git a/examples/appservice/create_app_service.tf b/examples/appservice/create_app_service.tf index 5e76ec84..48021f20 100644 --- a/examples/appservice/create_app_service.tf +++ b/examples/appservice/create_app_service.tf @@ -1,12 +1,12 @@ output "new_app_service" { - value = capella_app_service.new_app_service + value = couchbase-capella_app_service.new_app_service } output "appservice_id" { - value = capella_app_service.new_app_service.id + value = couchbase-capella_app_service.new_app_service.id } -resource "capella_app_service" "new_app_service" { +resource "couchbase-capella_app_service" "new_app_service" { organization_id = var.organization_id project_id = var.project_id cluster_id = var.cluster_id diff --git a/examples/appservice/list_app_services.tf b/examples/appservice/list_app_services.tf index d6d4d8ed..2a3652f7 100644 --- a/examples/appservice/list_app_services.tf +++ b/examples/appservice/list_app_services.tf @@ -1,7 +1,7 @@ output "app_services_list" { - value = data.capella_app_services.existing_app_services + value = data.couchbase-capella_app_services.existing_app_services } -data "capella_app_services" "existing_app_services" { +data "couchbase-capella_app_services" "existing_app_services" { organization_id = var.organization_id } \ No newline at end of file diff --git a/examples/backup/create_backup.tf b/examples/backup/create_backup.tf index 6500c24c..26923cca 100644 --- a/examples/backup/create_backup.tf +++ b/examples/backup/create_backup.tf @@ -1,8 +1,8 @@ output "new_backup" { - value = capella_backup.new_backup + value = couchbase-capella_backup.new_backup } -resource "capella_backup" "new_backup" { +resource "couchbase-capella_backup" "new_backup" { organization_id = var.organization_id project_id = var.project_id cluster_id = var.cluster_id diff --git a/examples/backup/list_backups.tf b/examples/backup/list_backups.tf index 254b2a2e..19255f90 100644 --- a/examples/backup/list_backups.tf +++ b/examples/backup/list_backups.tf @@ -1,8 +1,8 @@ output "backups_list" { - value = data.capella_backups.existing_backups + value = data.couchbase-capella_backups.existing_backups } -data "capella_backups" "existing_backups" { +data "couchbase-capella_backups" "existing_backups" { organization_id = var.organization_id project_id = var.project_id cluster_id = var.cluster_id diff --git a/examples/backup_schedule/create_backup_schedule.tf b/examples/backup_schedule/create_backup_schedule.tf index 3cd2edc7..5b12196c 100644 --- a/examples/backup_schedule/create_backup_schedule.tf +++ b/examples/backup_schedule/create_backup_schedule.tf @@ -1,8 +1,8 @@ output "new_backup_schedule" { - value = capella_backup_schedule.new_backup_schedule + value = couchbase-capella_backup_schedule.new_backup_schedule } -resource "capella_backup_schedule" "new_backup_schedule" { +resource "couchbase-capella_backup_schedule" "new_backup_schedule" { organization_id = var.organization_id project_id = var.project_id cluster_id = var.cluster_id diff --git a/examples/bucket/create_bucket.tf b/examples/bucket/create_bucket.tf index 33a40c18..24996178 100644 --- a/examples/bucket/create_bucket.tf +++ b/examples/bucket/create_bucket.tf @@ -1,12 +1,12 @@ output "new_bucket" { - value = capella_bucket.new_bucket + value = couchbase-capella_bucket.new_bucket } output "bucket_id" { - value = capella_bucket.new_bucket.id + value = couchbase-capella_bucket.new_bucket.id } -resource "capella_bucket" "new_bucket" { +resource "couchbase-capella_bucket" "new_bucket" { name = var.bucket.name organization_id = var.organization_id project_id = var.project_id diff --git a/examples/bucket/list_buckets.tf b/examples/bucket/list_buckets.tf index cb5e21df..b616a675 100644 --- a/examples/bucket/list_buckets.tf +++ b/examples/bucket/list_buckets.tf @@ -1,8 +1,8 @@ output "buckets_list" { - value = data.capella_buckets.existing_buckets + value = data.couchbase-capella_buckets.existing_buckets } -data "capella_buckets" "existing_buckets" { +data "couchbase-capella_buckets" "existing_buckets" { organization_id = var.organization_id project_id = var.project_id cluster_id = var.cluster_id diff --git a/examples/certificate/get_certificate.tf b/examples/certificate/get_certificate.tf index e779e970..c59cf10d 100644 --- a/examples/certificate/get_certificate.tf +++ b/examples/certificate/get_certificate.tf @@ -1,8 +1,8 @@ output "existing_certificate" { - value = data.capella_certificate.existing_certificate + value = data.couchbase-capella_certificate.existing_certificate } -data "capella_certificate" "existing_certificate" { +data "couchbase-capella_certificate" "existing_certificate" { organization_id = var.organization_id project_id = var.project_id cluster_id = var.cluster_id diff --git a/examples/cluster/create_cluster.tf b/examples/cluster/create_cluster.tf index 50d4f40b..0f747a9d 100644 --- a/examples/cluster/create_cluster.tf +++ b/examples/cluster/create_cluster.tf @@ -1,12 +1,12 @@ output "new_cluster" { - value = capella_cluster.new_cluster + value = couchbase-capella_cluster.new_cluster } output "cluster_id" { - value = capella_cluster.new_cluster.id + value = couchbase-capella_cluster.new_cluster.id } -resource "capella_cluster" "new_cluster" { +resource "couchbase-capella_cluster" "new_cluster" { organization_id = var.organization_id project_id = var.project_id name = var.cluster.name diff --git a/examples/database_credential/create_database_credential.tf b/examples/database_credential/create_database_credential.tf index 58e2ccbf..2246bb57 100644 --- a/examples/database_credential/create_database_credential.tf +++ b/examples/database_credential/create_database_credential.tf @@ -1,13 +1,13 @@ output "new_database_credential" { - value = capella_database_credential.new_database_credential + value = couchbase-capella_database_credential.new_database_credential sensitive = true } output "database_credential_id" { - value = capella_database_credential.new_database_credential.id + value = couchbase-capella_database_credential.new_database_credential.id } -resource "capella_database_credential" "new_database_credential" { +resource "couchbase-capella_database_credential" "new_database_credential" { name = var.database_credential.database_credential_name organization_id = var.organization_id project_id = var.project_id diff --git a/examples/database_credential/list_database_credentials.tf b/examples/database_credential/list_database_credentials.tf index 7bb9bdd8..d1992741 100644 --- a/examples/database_credential/list_database_credentials.tf +++ b/examples/database_credential/list_database_credentials.tf @@ -1,8 +1,8 @@ output "database_credentials_list" { - value = data.capella_database_credentials.existing_credentials + value = data.couchbase-capella_database_credentials.existing_credentials } -data "capella_database_credentials" "existing_credentials" { +data "couchbase-capella_database_credentials" "existing_credentials" { organization_id = var.organization_id project_id = var.project_id cluster_id = var.cluster_id diff --git a/examples/demo/allowlist.tf b/examples/demo/allowlist.tf deleted file mode 100644 index 2f84e687..00000000 --- a/examples/demo/allowlist.tf +++ /dev/null @@ -1,8 +0,0 @@ -resource "capella_allowlist" "new_allowlist" { - organization_id = var.organization_id - project_id = capella_project.new_project.id - cluster_id = capella_cluster.new_cluster.id - cidr = var.cidr - comment = var.comment - expires_at = var.expires_at -} diff --git a/examples/demo/certificate.tf b/examples/demo/certificate.tf deleted file mode 100644 index 6824eaef..00000000 --- a/examples/demo/certificate.tf +++ /dev/null @@ -1,11 +0,0 @@ -# Stores the certificate details in an output variable. -# Can be viewed using `terraform output certificate` command -output "certificate" { - value = data.capella_certificate.existing_certificate -} - -data "capella_certificate" "existing_certificate" { - organization_id = var.organization_id - project_id = capella_project.new_project.id - cluster_id = capella_cluster.new_cluster.id -} diff --git a/examples/demo/README.md b/examples/getting_started/README.md similarity index 100% rename from examples/demo/README.md rename to examples/getting_started/README.md diff --git a/examples/getting_started/allowlist.tf b/examples/getting_started/allowlist.tf new file mode 100644 index 00000000..f4f83538 --- /dev/null +++ b/examples/getting_started/allowlist.tf @@ -0,0 +1,8 @@ +resource "couchbase-capella_allowlist" "new_allowlist" { + organization_id = var.organization_id + project_id = couchbase-capella_project.new_project.id + cluster_id = couchbase-capella_cluster.new_cluster.id + cidr = var.cidr + comment = var.comment + expires_at = var.expires_at +} diff --git a/examples/demo/apikey.tf b/examples/getting_started/apikey.tf similarity index 74% rename from examples/demo/apikey.tf rename to examples/getting_started/apikey.tf index f84ee943..df32c79d 100644 --- a/examples/demo/apikey.tf +++ b/examples/getting_started/apikey.tf @@ -1,18 +1,18 @@ # Stores the API key details in an output variable. # Can be viewed using `terraform output apikey` command output "apikey" { - value = capella_apikey.new_apikey + value = couchbase-capella_apikey.new_apikey sensitive = true } -resource "capella_apikey" "new_apikey" { +resource "couchbase-capella_apikey" "new_apikey" { organization_id = var.organization_id name = var.apikey.name organization_roles = var.apikey.organization_roles allowed_cidrs = var.apikey.allowed_cidrs resources = [ { - id = capella_project.new_project.id + id = couchbase-capella_project.new_project.id roles = ["projectManager", "projectDataReader"] type = "project" } diff --git a/examples/demo/appservice.tf b/examples/getting_started/appservice.tf similarity index 52% rename from examples/demo/appservice.tf rename to examples/getting_started/appservice.tf index b3ace22c..d56703e8 100644 --- a/examples/demo/appservice.tf +++ b/examples/getting_started/appservice.tf @@ -1,13 +1,13 @@ # Stores the app service details in an output variable. # Can be viewed using `terraform output app_service` command output "app_service" { - value = capella_app_service.new_app_service + value = couchbase-capella_app_service.new_app_service } -resource "capella_app_service" "new_app_service" { +resource "couchbase-capella_app_service" "new_app_service" { organization_id = var.organization_id - project_id = capella_project.new_project.id - cluster_id = capella_cluster.new_cluster.id + project_id = couchbase-capella_project.new_project.id + cluster_id = couchbase-capella_cluster.new_cluster.id name = var.app_service.name description = var.app_service.description nodes = var.app_service.nodes @@ -15,5 +15,6 @@ resource "capella_app_service" "new_app_service" { cpu = var.app_service.compute.cpu ram = var.app_service.compute.ram } - version = var.app_service.version + version = var.app_service.version + depends_on = [couchbase-capella_cluster.new_cluster, couchbase-capella_bucket.new_bucket] } \ No newline at end of file diff --git a/examples/demo/bucket.tf b/examples/getting_started/bucket.tf similarity index 75% rename from examples/demo/bucket.tf rename to examples/getting_started/bucket.tf index 53c12069..afae5d12 100644 --- a/examples/demo/bucket.tf +++ b/examples/getting_started/bucket.tf @@ -1,14 +1,14 @@ # Stores the bucket name in an output variable. # Can be viewed using `terraform output bucket` command output "bucket" { - value = capella_bucket.new_bucket.name + value = couchbase-capella_bucket.new_bucket.name } -resource "capella_bucket" "new_bucket" { +resource "couchbase-capella_bucket" "new_bucket" { name = var.bucket.name organization_id = var.organization_id - project_id = capella_project.new_project.id - cluster_id = capella_cluster.new_cluster.id + project_id = couchbase-capella_project.new_project.id + cluster_id = couchbase-capella_cluster.new_cluster.id type = var.bucket.type storage_backend = var.bucket.storage_backend memory_allocation_in_mb = var.bucket.memory_allocation_in_mb diff --git a/examples/getting_started/certificate.tf b/examples/getting_started/certificate.tf new file mode 100644 index 00000000..a87e3b67 --- /dev/null +++ b/examples/getting_started/certificate.tf @@ -0,0 +1,11 @@ +# Stores the certificate details in an output variable. +# Can be viewed using `terraform output certificate` command +output "certificate" { + value = data.couchbase-capella_certificate.existing_certificate +} + +data "couchbase-capella_certificate" "existing_certificate" { + organization_id = var.organization_id + project_id = couchbase-capella_project.new_project.id + cluster_id = couchbase-capella_cluster.new_cluster.id +} diff --git a/examples/demo/cluster.tf b/examples/getting_started/cluster.tf similarity index 86% rename from examples/demo/cluster.tf rename to examples/getting_started/cluster.tf index 5f99124c..575ec6f3 100644 --- a/examples/demo/cluster.tf +++ b/examples/getting_started/cluster.tf @@ -1,12 +1,12 @@ # Stores the cluster details in an output variable. # Can be viewed using `terraform output cluster` command output "cluster" { - value = capella_cluster.new_cluster + value = couchbase-capella_cluster.new_cluster } -resource "capella_cluster" "new_cluster" { +resource "couchbase-capella_cluster" "new_cluster" { organization_id = var.organization_id - project_id = capella_project.new_project.id + project_id = couchbase-capella_project.new_project.id name = var.cluster.name description = "My first test cluster for multiple services." cloud_provider = { diff --git a/examples/demo/database_credential.tf b/examples/getting_started/database_credential.tf similarity index 55% rename from examples/demo/database_credential.tf rename to examples/getting_started/database_credential.tf index a5b03fc3..6ce5f370 100644 --- a/examples/demo/database_credential.tf +++ b/examples/getting_started/database_credential.tf @@ -1,15 +1,15 @@ # Stores the database_credential details in an output variable. # Can be viewed using `terraform output database_credential` command output "database_credential" { - value = capella_database_credential.new_database_credential + value = couchbase-capella_database_credential.new_database_credential sensitive = true } -resource "capella_database_credential" "new_database_credential" { +resource "couchbase-capella_database_credential" "new_database_credential" { name = var.database_credential_name organization_id = var.organization_id - project_id = capella_project.new_project.id - cluster_id = capella_cluster.new_cluster.id + project_id = couchbase-capella_project.new_project.id + cluster_id = couchbase-capella_cluster.new_cluster.id password = var.password access = var.access } diff --git a/examples/demo/main.tf b/examples/getting_started/main.tf similarity index 100% rename from examples/demo/main.tf rename to examples/getting_started/main.tf diff --git a/examples/demo/organization.tf b/examples/getting_started/organization.tf similarity index 58% rename from examples/demo/organization.tf rename to examples/getting_started/organization.tf index 9775687c..5376245c 100644 --- a/examples/demo/organization.tf +++ b/examples/getting_started/organization.tf @@ -1,9 +1,9 @@ # Stores the organization name in an output variable. # Can be viewed using `terraform output organization` command output "organization" { - value = data.capella_organization.existing_organization + value = data.couchbase-capella_organization.existing_organization } -data "capella_organization" "existing_organization" { +data "couchbase-capella_organization" "existing_organization" { organization_id = var.organization_id } diff --git a/examples/demo/project.tf b/examples/getting_started/project.tf similarity index 72% rename from examples/demo/project.tf rename to examples/getting_started/project.tf index 5374582e..d8799520 100644 --- a/examples/demo/project.tf +++ b/examples/getting_started/project.tf @@ -1,10 +1,10 @@ # Stores the project name in an output variable. # Can be viewed using `terraform output project` command output "project" { - value = capella_project.new_project.name + value = couchbase-capella_project.new_project.name } -resource "capella_project" "new_project" { +resource "couchbase-capella_project" "new_project" { organization_id = var.organization_id name = var.project_name description = "A Capella Project that will host many Capella clusters." diff --git a/examples/demo/terraform.template.tfvars b/examples/getting_started/terraform.template.tfvars similarity index 98% rename from examples/demo/terraform.template.tfvars rename to examples/getting_started/terraform.template.tfvars index 312326d0..d253e03c 100644 --- a/examples/demo/terraform.template.tfvars +++ b/examples/getting_started/terraform.template.tfvars @@ -59,7 +59,7 @@ access = [ comment = "Allow access from a public IP" cidr = "8.8.8.8/32" -expires_at = "2023-11-30T23:59:59.465Z" +expires_at = "2043-11-30T23:59:59.465Z" bucket = { name = "new_terraform_bucket" diff --git a/examples/demo/user.tf b/examples/getting_started/user.tf similarity index 74% rename from examples/demo/user.tf rename to examples/getting_started/user.tf index 60ac594f..c99358e6 100644 --- a/examples/demo/user.tf +++ b/examples/getting_started/user.tf @@ -1,10 +1,10 @@ # Stores the user details in an output variable. # Can be viewed using `terraform output user` command output "user" { - value = capella_user.new_user + value = couchbase-capella_user.new_user } -resource "capella_user" "new_user" { +resource "couchbase-capella_user" "new_user" { organization_id = var.organization_id name = var.user.name @@ -17,7 +17,7 @@ resource "capella_user" "new_user" { resources = [ { type = "project" - id = capella_project.new_project.id + id = couchbase-capella_project.new_project.id roles = [ "projectViewer", "projectDataReaderWriter" diff --git a/examples/demo/variables.tf b/examples/getting_started/variables.tf similarity index 100% rename from examples/demo/variables.tf rename to examples/getting_started/variables.tf diff --git a/examples/organization/get_organization.tf b/examples/organization/get_organization.tf index c4e935d4..19ed8b1a 100644 --- a/examples/organization/get_organization.tf +++ b/examples/organization/get_organization.tf @@ -1,7 +1,7 @@ output "organizations_get" { - value = data.capella_organization.existing_organization + value = data.couchbase-capella_organization.existing_organization } -data "capella_organization" "existing_organization" { +data "couchbase-capella_organization" "existing_organization" { organization_id = var.organization_id } diff --git a/examples/project/create_project.tf b/examples/project/create_project.tf index 6b393b1c..36b20710 100644 --- a/examples/project/create_project.tf +++ b/examples/project/create_project.tf @@ -1,12 +1,12 @@ output "new_project" { - value = capella_project.new_project + value = couchbase-capella_project.new_project } output "project_id" { - value = capella_project.new_project.id + value = couchbase-capella_project.new_project.id } -resource "capella_project" "new_project" { +resource "couchbase-capella_project" "new_project" { organization_id = var.organization_id name = var.project_name description = "A Capella Project that will host many Capella clusters." diff --git a/examples/project/list_projects.tf b/examples/project/list_projects.tf index 1f0b3ade..0362f030 100644 --- a/examples/project/list_projects.tf +++ b/examples/project/list_projects.tf @@ -1,7 +1,7 @@ output "projects_list" { - value = data.capella_projects.existing_projects + value = data.couchbase-capella_projects.existing_projects } -data "capella_projects" "existing_projects" { +data "couchbase-capella_projects" "existing_projects" { organization_id = var.organization_id } diff --git a/examples/user/create_user.tf b/examples/user/create_user.tf index 2d65a373..7b5dd43f 100644 --- a/examples/user/create_user.tf +++ b/examples/user/create_user.tf @@ -1,12 +1,12 @@ output "new_user" { - value = capella_user.new_user + value = couchbase-capella_user.new_user } output "user_id" { - value = capella_user.new_user.id + value = couchbase-capella_user.new_user.id } -resource "capella_user" "new_user" { +resource "couchbase-capella_user" "new_user" { organization_id = var.organization_id name = var.user.name diff --git a/examples/user/list_users.tf b/examples/user/list_users.tf index c8fef87a..d5ab90d7 100644 --- a/examples/user/list_users.tf +++ b/examples/user/list_users.tf @@ -1,7 +1,7 @@ output "users_list" { - value = data.capella_users.existing_users + value = data.couchbase-capella_users.existing_users } -data "capella_users" "existing_users" { +data "couchbase-capella_users" "existing_users" { organization_id = var.organization_id }