-
Notifications
You must be signed in to change notification settings - Fork 53
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
GitHub Actions
committed
Jan 18, 2022
1 parent
8ed3687
commit 6786a38
Showing
4 changed files
with
98 additions
and
2 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,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) | ||
|
||
|
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