-
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
Jun 12, 2023
1 parent
237bae0
commit a69ec87
Showing
10 changed files
with
123 additions
and
99 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
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: "civo_database_version Data Source - terraform-provider-civo" | ||
subcategory: "" | ||
description: |- | ||
Retrieves information about the database versions that Civo supports, with the ability to filter the results. | ||
--- | ||
|
||
# civo_database_version (Data Source) | ||
|
||
Retrieves information about the database versions that Civo supports, with the ability to filter the results. | ||
|
||
## Example Usage | ||
|
||
```terraform | ||
# Example for mysql | ||
data civo_database_version "mysql" { | ||
filter { | ||
key = "engine" | ||
values = ["mysql"] | ||
} | ||
} | ||
# Example for postgresql | ||
data civo_database_version "postgresql" { | ||
filter { | ||
key = "engine" | ||
values = ["postgresql"] | ||
} | ||
} | ||
# To use this data source, make sure you have a database cluster created. | ||
resource "civo_database" "custom_database" { | ||
name = "custom_database" | ||
size = element(data.civo_size.small.sizes, 0).name | ||
nodes = 2 | ||
engine = element(data.civo_database_version.mysql.versions, 0).engine | ||
version = element(data.civo_database_version.mysql.versions, 0).version | ||
} | ||
``` | ||
|
||
<!-- 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)) | ||
- `sort` (Block List) One or more key/direction pairs on which to sort results (see [below for nested schema](#nestedblock--sort)) | ||
|
||
### Read-Only | ||
|
||
- `id` (String) The ID of this resource. | ||
- `versions` (List of Object) (see [below for nested schema](#nestedatt--versions)) | ||
|
||
<a id="nestedblock--filter"></a> | ||
### Nested Schema for `filter` | ||
|
||
Required: | ||
|
||
- `key` (String) Filter versions by this key. This may be one of `default`, `engine`, `version`. | ||
- `values` (List of String) Only retrieves `versions` 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 versions by this key. This may be one of `default`, `engine`, `version`. | ||
|
||
Optional: | ||
|
||
- `direction` (String) The sort direction. This may be either `asc` or `desc`. | ||
|
||
|
||
<a id="nestedatt--versions"></a> | ||
### Nested Schema for `versions` | ||
|
||
Read-Only: | ||
|
||
- `default` (Boolean) | ||
- `engine` (String) | ||
- `version` (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
This file was deleted.
Oops, something went wrong.
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
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