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 Jun 12, 2023
1 parent 237bae0 commit a69ec87
Show file tree
Hide file tree
Showing 10 changed files with 123 additions and 99 deletions.
15 changes: 15 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,19 @@

## [v1.0.33](https://github.com/civo/terraform-provider-civo/releases/tag/v1.0.33) (12 June 2023)

### Merged
- [#179](https://github.com/civo/terraform-provider-civo/pull/179) - Add WaitForStateto the network delete
- [#178](https://github.com/civo/terraform-provider-civo/pull/178) - Update the database
- [#171](https://github.com/civo/terraform-provider-civo/pull/171) - fix typo errors for code and documentation
- [#177](https://github.com/civo/terraform-provider-civo/pull/177) - Get Volume data-source improvement
- [#174](https://github.com/civo/terraform-provider-civo/pull/174) - feat: add ISSUE_TEMPLATES to report issues
- [#173](https://github.com/civo/terraform-provider-civo/pull/173) - feat: add bug.yml
- [#172](https://github.com/civo/terraform-provider-civo/pull/172) - nil pointer check for instance
- [#170](https://github.com/civo/terraform-provider-civo/pull/170) - Update kubernetes_cluster.md

### Commits
- [2b9a899](https://github.com/civo/terraform-provider-civo/commit/2b9a899467993492641319099c5bc08e7624d55d) - Update resource.tf

## [v1.0.31](https://github.com/civo/terraform-provider-civo/releases/tag/v1.0.31) (24 March 2023)

### Merged
Expand Down
2 changes: 2 additions & 0 deletions docs/data-sources/database.md
Original file line number Diff line number Diff line change
Expand Up @@ -33,12 +33,14 @@ data "civo_database" "test" {

### Read-Only

- `engine` (String) The engine of the database
- `firewall_id` (String) The firewall id of the Database
- `network_id` (String) The network id of the Database
- `nodes` (Number) Count of nodes
- `password` (String) The password of the database
- `size` (String) Size of the database
- `status` (String) The status of the database
- `username` (String) The username of the database
- `version` (String) The version of the database


90 changes: 90 additions & 0 deletions docs/data-sources/database_version.md
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)


4 changes: 2 additions & 2 deletions docs/data-sources/firewall.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ subcategory: ""
description: |-
Retrieve information about a firewall for use in other resources.
This data source provides all of the firewall's properties as configured on your Civo account.
Firewalls may be looked up by id or name, and you can optionally pass region if you want to make a lookup for an expecific firewall inside that region.
Firewalls may be looked up by id or name, and you can optionally pass region if you want to make a lookup for a specific firewall inside that region.
---

# civo_firewall (Data Source)
Expand All @@ -14,7 +14,7 @@ Retrieve information about a firewall for use in other resources.

This data source provides all of the firewall's properties as configured on your Civo account.

Firewalls may be looked up by id or name, and you can optionally pass region if you want to make a lookup for an expecific firewall inside that region.
Firewalls may be looked up by id or name, and you can optionally pass region if you want to make a lookup for a specific firewall inside that region.

## Example Usage

Expand Down
2 changes: 1 addition & 1 deletion docs/data-sources/instance.md
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ output "instance_output" {

### Read-Only

- `cpu_cores` (Number) Total cpu of the inatance
- `cpu_cores` (Number) Total cpu of the instance
- `created_at` (String) The date of creation of the instance
- `disk_gb` (Number) The size of the disk
- `firewall_id` (String) The ID of the firewall used
Expand Down
91 changes: 0 additions & 91 deletions docs/data-sources/instances_size.md

This file was deleted.

2 changes: 1 addition & 1 deletion docs/data-sources/loadbalancer.md
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ output "civo_loadbalancer_output" {

- `id` (String) The id of the load balancer to retrieve (You can find this id from service annotations 'kubernetes.civo.com/loadbalancer-id')
- `name` (String) The name of the load balancer (You can find this name from service annotations 'kubernetes.civo.com/loadbalancer-name')
- `region` (String) The region of the load balancer, if you delcare this field, the datasource will use this value instead of the one defined in the provider
- `region` (String) The region of the load balancer, if you declare this field, the datasource will use this value instead of the one defined in the provider

### Read-Only

Expand Down
4 changes: 2 additions & 2 deletions docs/data-sources/network.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ subcategory: ""
description: |-
Retrieve information about a network for use in other resources.
This data source provides all of the network's properties as configured on your Civo account.
Networks may be looked up by id or label, and you can optionally pass region if you want to make a lookup for an expecific network inside that region.
Networks may be looked up by id or label, and you can optionally pass region if you want to make a lookup for a specific network inside that region.
---

# civo_network (Data Source)
Expand All @@ -14,7 +14,7 @@ Retrieve information about a network for use in other resources.

This data source provides all of the network's properties as configured on your Civo account.

Networks may be looked up by id or label, and you can optionally pass region if you want to make a lookup for an expecific network inside that region.
Networks may be looked up by id or label, and you can optionally pass region if you want to make a lookup for a specific network inside that region.

## Example Usage

Expand Down
8 changes: 6 additions & 2 deletions docs/data-sources/volume.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,12 @@ An error will be raised if the provided volume name does not exist in your Civo
## Example Usage

```terraform
data "civo_volume" "mysql" {
name = "database-mysql"
data "civo_volume" "myvolume" {
name = "test-volume-name"
}
output "volume_output" {
value = data.civo_volume.myvolume
}
```

Expand Down
4 changes: 4 additions & 0 deletions docs/resources/database.md
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,8 @@ 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
}
```

Expand All @@ -37,9 +39,11 @@ resource "civo_database" "custom_database" {

### Required

- `engine` (String) The engine of the database
- `name` (String) Name of the database
- `nodes` (Number) Count of nodes
- `size` (String) Size of the database
- `version` (String) The version of the database

### Optional

Expand Down

0 comments on commit a69ec87

Please sign in to comment.