-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: added cluster datasource & resource
- Loading branch information
1 parent
66afb71
commit 6e135f1
Showing
11 changed files
with
1,266 additions
and
4 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,108 @@ | ||
--- | ||
# generated by https://github.com/hashicorp/terraform-plugin-docs | ||
page_title: "cratedb_cluster Data Source - terraform-provider-cratedb" | ||
subcategory: "" | ||
description: |- | ||
To retrieve a cluster. | ||
--- | ||
|
||
# cratedb_cluster (Data Source) | ||
|
||
To retrieve a cluster. | ||
|
||
|
||
|
||
<!-- schema generated by tfplugindocs --> | ||
## Schema | ||
|
||
### Required | ||
|
||
- `id` (String) The id of the cluster. | ||
|
||
### Read-Only | ||
|
||
- `allow_custom_storage` (Boolean) The allow custom storage flag. | ||
- `allow_suspend` (Boolean) The allow suspend flag. | ||
- `backup_schedule` (String) The backup schedule. | ||
- `channel` (String) The channel of the cluster. | ||
- `crate_version` (String) The CrateDB version of the cluster. | ||
- `dc` (Attributes) The DublinCore of the cluster. (see [below for nested schema](#nestedatt--dc)) | ||
- `deletion_protected` (Boolean) The deletion protected flag. | ||
- `external_ip` (String) The external IP address. | ||
- `fqdn` (String) The Fully Qualified Domain Name. | ||
- `gc_available` (Boolean) The garbage collection available flag. | ||
- `hardware_specs` (Attributes) The hardware specs of the cluster. (see [below for nested schema](#nestedatt--hardware_specs)) | ||
- `health` (Attributes) The health of the cluster. (see [below for nested schema](#nestedatt--health)) | ||
- `ip_whitelist` (Attributes List) The IP whitelist of the cluster. (see [below for nested schema](#nestedatt--ip_whitelist)) | ||
- `last_async_operation` (Attributes) The last async operation of the cluster. (see [below for nested schema](#nestedatt--last_async_operation)) | ||
- `name` (String) The name of the cluster. | ||
- `num_nodes` (Number) The number of nodes in the cluster. | ||
- `origin` (String) The origin of the cluster. | ||
- `password` (String, Sensitive) The password of the cluster. | ||
- `product_name` (String) The product name of the cluster. | ||
- `product_tier` (String) The product tier of the cluster. | ||
- `product_unit` (Number) The product unit of the cluster. | ||
- `project_id` (String) The project id of the cluster. | ||
- `subscription_id` (String) The subscription id of the cluster. | ||
- `suspended` (Boolean) The suspended flag. | ||
- `url` (String) The URL of the cluster. | ||
- `username` (String) The username of the cluster. | ||
|
||
<a id="nestedatt--dc"></a> | ||
### Nested Schema for `dc` | ||
|
||
Read-Only: | ||
|
||
- `created` (String) The created time. | ||
- `modified` (String) The modified time. | ||
|
||
|
||
<a id="nestedatt--hardware_specs"></a> | ||
### Nested Schema for `hardware_specs` | ||
|
||
Read-Only: | ||
|
||
- `cpus_per_node` (Number) The cpus per node. | ||
- `disk_size_per_node_bytes` (Number) The disk size per node in bytes. | ||
- `disk_type` (String) The disk type. | ||
- `disks_per_node` (Number) The disks per node. | ||
- `heap_size_bytes` (Number) The heap size in bytes. | ||
- `memory_per_node_bytes` (Number) The memory per node in bytes. | ||
|
||
|
||
<a id="nestedatt--health"></a> | ||
### Nested Schema for `health` | ||
|
||
Read-Only: | ||
|
||
- `last_seen` (String) The last seen time. | ||
- `running_operation` (String) The type of the currently running operation. Returns an empty string if there is no operation in progress. | ||
- `status` (String) The health status of the cluster. | ||
|
||
|
||
<a id="nestedatt--ip_whitelist"></a> | ||
### Nested Schema for `ip_whitelist` | ||
|
||
Read-Only: | ||
|
||
- `cidr` (String) The CIDR. | ||
- `description` (String) The description. | ||
|
||
|
||
<a id="nestedatt--last_async_operation"></a> | ||
### Nested Schema for `last_async_operation` | ||
|
||
Read-Only: | ||
|
||
- `dc` (Attributes) The DublinCore of the cluster. (see [below for nested schema](#nestedatt--last_async_operation--dc)) | ||
- `id` (String) The id of the last async operation. | ||
- `status` (String) The status of the last async operation. | ||
- `type` (String) The type of the last async operation. | ||
|
||
<a id="nestedatt--last_async_operation--dc"></a> | ||
### Nested Schema for `last_async_operation.dc` | ||
|
||
Read-Only: | ||
|
||
- `created` (String) The created time. | ||
- `modified` (String) The modified time. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,90 @@ | ||
--- | ||
# generated by https://github.com/hashicorp/terraform-plugin-docs | ||
page_title: "cratedb_cluster Resource - terraform-provider-cratedb" | ||
subcategory: "" | ||
description: |- | ||
Creates and manages a cluster. | ||
--- | ||
|
||
# cratedb_cluster (Resource) | ||
|
||
Creates and manages a cluster. | ||
|
||
|
||
|
||
<!-- schema generated by tfplugindocs --> | ||
## Schema | ||
|
||
### Required | ||
|
||
- `crate_version` (String) The CrateDB version of the cluster. | ||
- `name` (String) The name of the cluster. | ||
- `organization_id` (String) The organization id of the cluster. | ||
- `password` (String, Sensitive) The password of the cluster. | ||
- `product_name` (String) The product name of the cluster. | ||
- `product_tier` (String) The product tier of the cluster. | ||
- `project_id` (String) The project id of the cluster. | ||
- `subscription_id` (String) The subscription id of the cluster. | ||
- `username` (String) The username of the cluster. | ||
|
||
### Optional | ||
|
||
- `channel` (String) The channel of the cluster. Default is 'stable'. | ||
- `hardware_specs` (Attributes) The hardware specs of the cluster. (see [below for nested schema](#nestedatt--hardware_specs)) | ||
- `product_unit` (Number) The product unit of the cluster. Default is `0`. | ||
|
||
### Read-Only | ||
|
||
- `allow_custom_storage` (Boolean) The allow custom storage flag. | ||
- `allow_suspend` (Boolean) The allow suspend flag. | ||
- `backup_schedule` (String) The backup schedule. | ||
- `dc` (Attributes) The DublinCore of the cluster. (see [below for nested schema](#nestedatt--dc)) | ||
- `deletion_protected` (Boolean) The deletion protected flag. | ||
- `external_ip` (String) The external IP address. | ||
- `fqdn` (String) The Fully Qualified Domain Name. | ||
- `gc_available` (Boolean) The garbage collection available flag. | ||
- `health` (Attributes) The health of the cluster. (see [below for nested schema](#nestedatt--health)) | ||
- `id` (String) The id of the cluster. | ||
- `ip_whitelist` (Attributes Set) The IP whitelist of the cluster. (see [below for nested schema](#nestedatt--ip_whitelist)) | ||
- `num_nodes` (Number) The number of nodes in the cluster. | ||
- `origin` (String) The origin of the cluster. | ||
- `suspended` (Boolean) The suspended flag. | ||
- `url` (String) The URL of the cluster. | ||
|
||
<a id="nestedatt--hardware_specs"></a> | ||
### Nested Schema for `hardware_specs` | ||
|
||
Optional: | ||
|
||
- `cpus_per_node` (Number) The cpus per node. | ||
- `disk_size_per_node_bytes` (Number) The disk size per node in bytes. | ||
- `disk_type` (String) The disk type. | ||
- `disks_per_node` (Number) The disks per node. | ||
- `heap_size_bytes` (Number) The heap size in bytes. | ||
- `memory_per_node_bytes` (Number) The memory per node in bytes. | ||
|
||
|
||
<a id="nestedatt--dc"></a> | ||
### Nested Schema for `dc` | ||
|
||
Read-Only: | ||
|
||
- `created` (String) The created time. | ||
- `modified` (String) The modified time. | ||
|
||
|
||
<a id="nestedatt--health"></a> | ||
### Nested Schema for `health` | ||
|
||
Read-Only: | ||
|
||
- `status` (String) The health status of the cluster. | ||
|
||
|
||
<a id="nestedatt--ip_whitelist"></a> | ||
### Nested Schema for `ip_whitelist` | ||
|
||
Read-Only: | ||
|
||
- `cidr` (String) The CIDR. | ||
- `description` (String) The description. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
terraform { | ||
required_providers { | ||
cratedb = { | ||
source = "komminarlabs/cratedb" | ||
} | ||
} | ||
} | ||
|
||
data "cratedb_cluster" "default" { | ||
id = "156e7f96-0f6e-4fcc-8940-6e2a52efcee3" | ||
} | ||
|
||
output "default_cluster" { | ||
value = data.cratedb_cluster.default | ||
sensitive = true | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
terraform { | ||
required_providers { | ||
cratedb = { | ||
source = "komminarlabs/cratedb" | ||
} | ||
} | ||
} | ||
|
||
provider "cratedb" {} | ||
|
||
resource "cratedb_cluster" "default" { | ||
organization_id = "667796de-3c06-4503-bc3c-a9adc2a849cc" | ||
crate_version = "5.8.2" | ||
name = "default-cluster" | ||
product_name = "cr4" | ||
product_tier = "default" | ||
project_id = "a99eb2a8-bcf5-418c-866f-67e65a8ada40" | ||
subscription_id = "7c156ae9-9c07-4106-8f42-df93855876c1" | ||
username = "admin" | ||
password = "zyTChd9mfcGBFLb72nJkNeVj6" | ||
} | ||
|
||
output "default_cluster" { | ||
value = cratedb_cluster.default.health | ||
sensitive = true | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.