-
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.
Add Cluster resource, tests, and examples.
- Loading branch information
Showing
23 changed files
with
1,960 additions
and
20 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1 @@ | ||
531cc68ef20d0f9d3d2ab7dfe292438 | ||
acad9b55947f600d9c4d0d0416e13c19 |
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,109 @@ | ||
--- | ||
# generated by https://github.com/hashicorp/terraform-plugin-docs | ||
page_title: "bonsai_cluster Data Source - terraform-provider-bonsai" | ||
subcategory: "" | ||
description: |- | ||
Cluster represents a single cluster on your account. | ||
--- | ||
|
||
# bonsai_cluster (Data Source) | ||
|
||
Cluster represents a single cluster on your account. | ||
|
||
## Example Usage | ||
|
||
```terraform | ||
data "bonsai_cluster" "get_by_slug" { | ||
slug = "dcek-group-llc-5240651189" | ||
} | ||
``` | ||
|
||
<!-- schema generated by tfplugindocs --> | ||
## Schema | ||
|
||
### Optional | ||
|
||
- `slug` (String) A unique, machine-readable name for the cluster. A cluster slug is based its name at creation, to which a random integer is concatenated. | ||
|
||
### Read-Only | ||
|
||
- `access` (Attributes) Access holds information about connecting to the cluster. (see [below for nested schema](#nestedatt--access)) | ||
- `name` (String) The human-readable name of the cluster. | ||
- `plan` (Attributes) Plan holds some information about the cluster's current subscription plan. (see [below for nested schema](#nestedatt--plan)) | ||
- `release` (Attributes) Release holds some information about the cluster's current release. (see [below for nested schema](#nestedatt--release)) | ||
- `space` (Attributes) Space holds some information about where the cluster is running. (see [below for nested schema](#nestedatt--space)) | ||
- `state` (Attributes) State represents the current state of the cluster. This indicates what the cluster is doing at any given moment. (see [below for nested schema](#nestedatt--state)) | ||
- `stats` (Attributes) Stats holds *some* statistics about the cluster. | ||
|
||
This attribute should not be used for real-time monitoring! Stats are updated every 10-15 minutes. To monitor real-time metrics, monitor your cluster directly, via the Index Stats API. (see [below for nested schema](#nestedatt--stats)) | ||
- `uri` (String) A URI to retrieve more information about this cluster. | ||
|
||
<a id="nestedatt--access"></a> | ||
### Nested Schema for `access` | ||
|
||
Optional: | ||
|
||
- `password` (String, Sensitive) Pass holds the password to access the cluster with. | ||
|
||
Only shown once, during cluster creation. | ||
- `user` (String, Sensitive) User holds the username to access the cluster with. | ||
|
||
Only shown once, during cluster creation. | ||
|
||
Read-Only: | ||
|
||
- `host` (String) Host name of the cluster. | ||
- `port` (Number) HTTP Port the cluster is running on. | ||
- `scheme` (String) HTTP Scheme needed to access the cluster. Default: "https". | ||
- `url` (String) URL is the Cluster endpoint for access. | ||
|
||
Only shown once, during cluster creation. | ||
|
||
|
||
<a id="nestedatt--plan"></a> | ||
### Nested Schema for `plan` | ||
|
||
Read-Only: | ||
|
||
- `slug` (String) A machine-readable name for the plan. | ||
- `uri` (String) A URI to retrieve more information about this Plan. | ||
|
||
|
||
<a id="nestedatt--release"></a> | ||
### Nested Schema for `release` | ||
|
||
Read-Only: | ||
|
||
- `package_name` (String) PackageName is the package name of the release. | ||
- `service_type` (String) The service type of the deployment - for example, "elasticsearch". | ||
- `slug` (String) The machine-readable name for the deployment. | ||
- `uri` (String) A URI to retrieve more information about this Release. | ||
- `version` (String) The version of the release. | ||
|
||
|
||
<a id="nestedatt--space"></a> | ||
### Nested Schema for `space` | ||
|
||
Read-Only: | ||
|
||
- `path` (String) A machine-readable name for the server group. | ||
- `region` (String) The geographic region in which the cluster is running. | ||
- `uri` (String) A URI to retrieve more information about this Space. | ||
|
||
|
||
<a id="nestedatt--state"></a> | ||
### Nested Schema for `state` | ||
|
||
Read-Only: | ||
|
||
- `state` (String) The state of the cluster. | ||
|
||
|
||
<a id="nestedatt--stats"></a> | ||
### Nested Schema for `stats` | ||
|
||
Read-Only: | ||
|
||
- `data_bytes_used` (Number) Number of bytes the cluster is using on-disk. | ||
- `docs` (Number) Number of documents in the index. | ||
- `shards_used` (Number) Number of shards the cluster is using. |
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,114 @@ | ||
--- | ||
# generated by https://github.com/hashicorp/terraform-plugin-docs | ||
page_title: "bonsai_clusters Data Source - terraform-provider-bonsai" | ||
subcategory: "" | ||
description: |- | ||
A list of all active clusters on your account. | ||
--- | ||
|
||
# bonsai_clusters (Data Source) | ||
|
||
A list of all **active** clusters on your account. | ||
|
||
## Example Usage | ||
|
||
```terraform | ||
data "bonsai_clusters" "list" {} | ||
``` | ||
|
||
<!-- schema generated by tfplugindocs --> | ||
## Schema | ||
|
||
### Read-Only | ||
|
||
- `clusters` (Attributes List) Cluster represents a single cluster on your account. (see [below for nested schema](#nestedatt--clusters)) | ||
|
||
<a id="nestedatt--clusters"></a> | ||
### Nested Schema for `clusters` | ||
|
||
Optional: | ||
|
||
- `slug` (String) A unique, machine-readable name for the cluster. A cluster slug is based its name at creation, to which a random integer is concatenated. | ||
|
||
Read-Only: | ||
|
||
- `access` (Attributes) Access holds information about connecting to the cluster. (see [below for nested schema](#nestedatt--clusters--access)) | ||
- `name` (String) The human-readable name of the cluster. | ||
- `plan` (Attributes) Plan holds some information about the cluster's current subscription plan. (see [below for nested schema](#nestedatt--clusters--plan)) | ||
- `release` (Attributes) Release holds some information about the cluster's current release. (see [below for nested schema](#nestedatt--clusters--release)) | ||
- `space` (Attributes) Space holds some information about where the cluster is running. (see [below for nested schema](#nestedatt--clusters--space)) | ||
- `state` (Attributes) State represents the current state of the cluster. This indicates what the cluster is doing at any given moment. (see [below for nested schema](#nestedatt--clusters--state)) | ||
- `stats` (Attributes) Stats holds *some* statistics about the cluster. | ||
|
||
This attribute should not be used for real-time monitoring! Stats are updated every 10-15 minutes. To monitor real-time metrics, monitor your cluster directly, via the Index Stats API. (see [below for nested schema](#nestedatt--clusters--stats)) | ||
- `uri` (String) A URI to retrieve more information about this cluster. | ||
|
||
<a id="nestedatt--clusters--access"></a> | ||
### Nested Schema for `clusters.access` | ||
|
||
Optional: | ||
|
||
- `password` (String, Sensitive) Pass holds the password to access the cluster with. | ||
|
||
Only shown once, during cluster creation. | ||
- `user` (String, Sensitive) User holds the username to access the cluster with. | ||
|
||
Only shown once, during cluster creation. | ||
|
||
Read-Only: | ||
|
||
- `host` (String) Host name of the cluster. | ||
- `port` (Number) HTTP Port the cluster is running on. | ||
- `scheme` (String) HTTP Scheme needed to access the cluster. Default: "https". | ||
- `url` (String) URL is the Cluster endpoint for access. | ||
|
||
Only shown once, during cluster creation. | ||
|
||
|
||
<a id="nestedatt--clusters--plan"></a> | ||
### Nested Schema for `clusters.plan` | ||
|
||
Read-Only: | ||
|
||
- `slug` (String) A machine-readable name for the plan. | ||
- `uri` (String) A URI to retrieve more information about this Plan. | ||
|
||
|
||
<a id="nestedatt--clusters--release"></a> | ||
### Nested Schema for `clusters.release` | ||
|
||
Read-Only: | ||
|
||
- `package_name` (String) PackageName is the package name of the release. | ||
- `service_type` (String) The service type of the deployment - for example, "elasticsearch". | ||
- `slug` (String) The machine-readable name for the deployment. | ||
- `uri` (String) A URI to retrieve more information about this Release. | ||
- `version` (String) The version of the release. | ||
|
||
|
||
<a id="nestedatt--clusters--space"></a> | ||
### Nested Schema for `clusters.space` | ||
|
||
Read-Only: | ||
|
||
- `path` (String) A machine-readable name for the server group. | ||
- `region` (String) The geographic region in which the cluster is running. | ||
- `uri` (String) A URI to retrieve more information about this Space. | ||
|
||
|
||
<a id="nestedatt--clusters--state"></a> | ||
### Nested Schema for `clusters.state` | ||
|
||
Read-Only: | ||
|
||
- `state` (String) The state of the cluster. | ||
|
||
|
||
<a id="nestedatt--clusters--stats"></a> | ||
### Nested Schema for `clusters.stats` | ||
|
||
Read-Only: | ||
|
||
- `data_bytes_used` (Number) Number of bytes the cluster is using on-disk. | ||
- `docs` (Number) Number of documents in the index. | ||
- `shards_used` (Number) Number of shards the cluster is using. |
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,136 @@ | ||
--- | ||
# generated by https://github.com/hashicorp/terraform-plugin-docs | ||
page_title: "bonsai_cluster Resource - terraform-provider-bonsai" | ||
subcategory: "" | ||
description: |- | ||
Provides and manages a Cluster on your account. | ||
--- | ||
|
||
# bonsai_cluster (Resource) | ||
|
||
Provides and manages a Cluster on your account. | ||
|
||
## Example Usage | ||
|
||
```terraform | ||
resource "bonsai_cluster" "test" { | ||
name = "comped example" | ||
plan = { | ||
slug = "standard-nano-comped" | ||
} | ||
space = { | ||
path = "omc/bonsai/us-east-1/common" | ||
} | ||
release = { | ||
slug = "opensearch-2.6.0-mt" | ||
} | ||
} | ||
``` | ||
|
||
<!-- schema generated by tfplugindocs --> | ||
## Schema | ||
|
||
### Required | ||
|
||
- `name` (String) The human-readable name of the cluster. | ||
|
||
### Optional | ||
|
||
- `plan` (Attributes) Plan holds some information about the cluster's current subscription plan. (see [below for nested schema](#nestedatt--plan)) | ||
- `release` (Attributes) Release holds some information about the cluster's current release. (see [below for nested schema](#nestedatt--release)) | ||
- `space` (Attributes) Space holds some information about where the cluster is running. (see [below for nested schema](#nestedatt--space)) | ||
|
||
### Read-Only | ||
|
||
- `access` (Attributes) Access holds information about connecting to the cluster. (see [below for nested schema](#nestedatt--access)) | ||
- `id` (String) The ID of this resource. | ||
- `message` (String) Message received during Cluster creation | ||
- `monitor` (String) Monitor received during Cluster creation | ||
- `slug` (String) A unique, machine-readable name for the cluster. A cluster slug is based its name at creation, to which a random integer is concatenated. | ||
- `state` (Attributes) State represents the current state of the cluster. This indicates what the cluster is doing at any given moment. (see [below for nested schema](#nestedatt--state)) | ||
- `stats` (Attributes) Stats holds *some* statistics about the cluster. | ||
|
||
This attribute should not be used for real-time monitoring! Stats are updated every 10-15 minutes. To monitor real-time metrics, monitor your cluster directly, via the Index Stats API. (see [below for nested schema](#nestedatt--stats)) | ||
- `uri` (String) A URI to retrieve more information about this cluster. | ||
|
||
<a id="nestedatt--plan"></a> | ||
### Nested Schema for `plan` | ||
|
||
Required: | ||
|
||
- `slug` (String) A machine-readable name for the plan. | ||
|
||
Read-Only: | ||
|
||
- `uri` (String) A URI to retrieve more information about this Plan. | ||
|
||
|
||
<a id="nestedatt--release"></a> | ||
### Nested Schema for `release` | ||
|
||
Optional: | ||
|
||
- `slug` (String) The machine-readable name for the deployment. | ||
|
||
Read-Only: | ||
|
||
- `package_name` (String) PackageName is the package name of the release. | ||
- `service_type` (String) The service type of the deployment - for example, "elasticsearch". | ||
- `uri` (String) A URI to retrieve more information about this Release. | ||
- `version` (String) The version of the release. | ||
|
||
|
||
<a id="nestedatt--space"></a> | ||
### Nested Schema for `space` | ||
|
||
Optional: | ||
|
||
- `path` (String) A machine-readable name for the server group. | ||
|
||
Read-Only: | ||
|
||
- `region` (String) The geographic region in which the cluster is running. | ||
- `uri` (String) A URI to retrieve more information about this Space. | ||
|
||
|
||
<a id="nestedatt--access"></a> | ||
### Nested Schema for `access` | ||
|
||
Optional: | ||
|
||
- `password` (String, Sensitive) Pass holds the password to access the cluster with. | ||
|
||
Only shown once, during cluster creation. | ||
- `user` (String, Sensitive) User holds the username to access the cluster with. | ||
|
||
Only shown once, during cluster creation. | ||
|
||
Read-Only: | ||
|
||
- `host` (String) Host name of the cluster. | ||
- `port` (Number) HTTP Port the cluster is running on. | ||
- `scheme` (String) HTTP Scheme needed to access the cluster. Default: "https". | ||
- `url` (String) URL is the Cluster endpoint for access. | ||
|
||
Only shown once, during cluster creation. | ||
|
||
|
||
<a id="nestedatt--state"></a> | ||
### Nested Schema for `state` | ||
|
||
Read-Only: | ||
|
||
- `state` (String) The state of the cluster. | ||
|
||
|
||
<a id="nestedatt--stats"></a> | ||
### Nested Schema for `stats` | ||
|
||
Read-Only: | ||
|
||
- `data_bytes_used` (Number) Number of bytes the cluster is using on-disk. | ||
- `docs` (Number) Number of documents in the index. | ||
- `shards_used` (Number) Number of shards the cluster is using. |
Oops, something went wrong.