Skip to content

Commit

Permalink
Update docs and CHANGELOG.md
Browse files Browse the repository at this point in the history
  • Loading branch information
GitHub Actions committed Jan 18, 2022
1 parent 8ed3687 commit 6786a38
Show file tree
Hide file tree
Showing 4 changed files with 98 additions and 2 deletions.
5 changes: 5 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,9 @@

## [v1.0.9](https://github.com/civo/terraform-provider-civo/releases/tag/v1.0.9) (18 January 2022)

### Merged
- [#118](https://github.com/civo/terraform-provider-civo/pull/118) - Added a new datasource for the civo size

## [v1.0.8](https://github.com/civo/terraform-provider-civo/releases/tag/v1.0.8) (14 January 2022)

### Merged
Expand Down
91 changes: 91 additions & 0 deletions docs/data-sources/size.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,91 @@
---
# generated by https://github.com/hashicorp/terraform-plugin-docs
page_title: "civo_size Data Source - terraform-provider-civo"
subcategory: ""
description: |-
Retrieves information about the sizes that Civo supports, with the ability to filter the results.
---

# civo_size (Data Source)

Retrieves information about the sizes that Civo supports, with the ability to filter the results.

## Example Usage

```terraform
data "civo_size" "small" {
filter {
key = "name"
values = ["g3.small"]
match_by = "re"
}
filter {
key = "type"
values = ["instance"]
}
}
resource "civo_instance" "my-test-instance" {
hostname = "foo.com"
tags = ["python", "nginx"]
notes = "this is a note for the server"
size = element(data.civo_size.small.sizes, 0).name
disk_image = element(data.civo_disk_image.debian.diskimages, 0).id
}
```

<!-- schema generated by tfplugindocs -->
## Schema

### Optional

- **filter** (Block Set) One or more key/value pairs on which to filter results (see [below for nested schema](#nestedblock--filter))
- **id** (String) The ID of this resource.
- **sort** (Block List) One or more key/direction pairs on which to sort results (see [below for nested schema](#nestedblock--sort))

### Read-Only

- **sizes** (List of Object) (see [below for nested schema](#nestedatt--sizes))

<a id="nestedblock--filter"></a>
### Nested Schema for `filter`

Required:

- **key** (String) Filter sizes by this key. This may be one of `cpu`, `description`, `disk`, `name`, `ram`, `selectable`, `type`.
- **values** (List of String) Only retrieves `sizes` which keys has value that matches one of the values provided here

Optional:

- **all** (Boolean) Set to `true` to require that a field match all of the `values` instead of just one or more of them. This is useful when matching against multi-valued fields such as lists or sets where you want to ensure that all of the `values` are present in the list or set.
- **match_by** (String) One of `exact` (default), `re`, or `substring`. For string-typed fields, specify `re` to match by using the `values` as regular expressions, or specify `substring` to match by treating the `values` as substrings to find within the string field.


<a id="nestedblock--sort"></a>
### Nested Schema for `sort`

Required:

- **key** (String) Sort sizes by this key. This may be one of `cpu`, `description`, `disk`, `name`, `ram`, `selectable`, `type`.

Optional:

- **direction** (String) The sort direction. This may be either `asc` or `desc`.


<a id="nestedatt--sizes"></a>
### Nested Schema for `sizes`

Read-Only:

- **cpu** (Number)
- **description** (String)
- **disk** (Number)
- **name** (String)
- **ram** (Number)
- **selectable** (Boolean)
- **type** (String)


2 changes: 1 addition & 1 deletion docs/resources/kubernetes_cluster.md
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ resource "civo_kubernetes_cluster" "my-cluster" {
- **num_target_nodes** (Number) The number of instances to create (optional, the default at the time of writing is 3)
- **region** (String) The region for the cluster, if not declare we use the region in declared in the provider
- **tags** (String) Space separated list of tags, to be used freely as required
- **target_nodes_size** (String) The size of each node (optional, the default is currently g3.k3s.medium)
- **target_nodes_size** (String) The size of each node (optional, the default is currently g4s.kube.medium)

### Read-Only

Expand Down
2 changes: 1 addition & 1 deletion docs/resources/kubernetes_node_pool.md
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ resource "civo_kubernetes_node_pool" "front-end" {

- **id** (String) The ID of this resource.
- **num_target_nodes** (Number) the number of instances to create (optional, the default at the time of writing is 3)
- **target_nodes_size** (String) the size of each node (optional, the default is currently g3.k3s.medium)
- **target_nodes_size** (String) the size of each node (optional, the default is currently g4s.kube.medium)

## Import

Expand Down

0 comments on commit 6786a38

Please sign in to comment.