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 Feb 1, 2023
1 parent 2af28da commit 0674cb8
Show file tree
Hide file tree
Showing 6 changed files with 126 additions and 3 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.29](https://github.com/civo/terraform-provider-civo/releases/tag/v1.0.29) (1 February 2023)

### Merged
- [#162](https://github.com/civo/terraform-provider-civo/pull/162) - Added support for Database

## [v1.0.28](https://github.com/civo/terraform-provider-civo/releases/tag/v1.0.28) (15 December 2022)

### Merged
Expand Down
44 changes: 44 additions & 0 deletions docs/data-sources/database.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
---
# generated by https://github.com/hashicorp/terraform-plugin-docs
page_title: "civo_database Data Source - terraform-provider-civo"
subcategory: ""
description: |-
Get information of an Database for use in other resources. This data source provides all of the Database's properties as configured on your Civo account.
Note: This data source returns a single Database. When specifying a name, an error will be raised if more than one Databases with the same name found.
---

# civo_database (Data Source)

Get information of an Database for use in other resources. This data source provides all of the Database's properties as configured on your Civo account.

Note: This data source returns a single Database. When specifying a name, an error will be raised if more than one Databases with the same name found.

## Example Usage

```terraform
data "civo_database" "test" {
name = "test-database"
region = "LON1"
}
```

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

### Optional

- `id` (String) The ID of the Database
- `name` (String) The name of the Database
- `region` (String) The region of an existing Database

### Read-Only

- `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


2 changes: 1 addition & 1 deletion docs/data-sources/firewall.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ Firewalls may be looked up by id or name, and you can optionally pass region if
```terraform
data "civo_firewall" "test" {
name = "test-firewall"
region = "NYC1"
region = "LON1"
}
```

Expand Down
2 changes: 1 addition & 1 deletion docs/data-sources/instances.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ Note: You can use the `civo_instance` data source to obtain metadata about a sin

```terraform
data "civo_instances" "small-size" {
region = "NYC1"
region = "LON1"
filter {
key = "size"
values = [g3.small]
Expand Down
2 changes: 1 addition & 1 deletion docs/data-sources/network.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ Networks may be looked up by id or label, and you can optionally pass region if
```terraform
data "civo_network" "test" {
label = "test-network"
region = "NYC1"
region = "LON1"
}
```

Expand Down
74 changes: 74 additions & 0 deletions docs/resources/database.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,74 @@
---
# generated by https://github.com/hashicorp/terraform-plugin-docs
page_title: "civo_database Resource - terraform-provider-civo"
subcategory: ""
description: |-
---

# civo_database (Resource)



## Example Usage

```terraform
data "civo_size" "small" {
filter {
key = "name"
values = ["db.small"]
match_by = "re"
}
filter {
key = "type"
values = ["database"]
}
}
resource "civo_database" "custom_database" {
name = "custom_database"
size = element(data.civo_size.small.sizes, 0).name
nodes = 2
}
```

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

### Required

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

### Optional

- `firewall_id` (String) The ID of the firewall to use, from the current list. If left blank or not sent, the default firewall will be used (open to all)
- `network_id` (String) The id of the associated network
- `region` (String) The region where the database will be created.
- `timeouts` (Block, Optional) (see [below for nested schema](#nestedblock--timeouts))

### Read-Only

- `id` (String) The ID of this resource.
- `password` (String) The password of the database
- `status` (String) The status of the database
- `username` (String) The username of the database

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

Optional:

- `create` (String)
- `delete` (String)
- `update` (String)

## Import

Import is supported using the following syntax:

```shell
# using ID
terraform import civo_database.mydb 29fcd1c4-fb61-44c7-b49c-dc7b98e9927e
```

0 comments on commit 0674cb8

Please sign in to comment.