Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

docs: update descriptions for mysql resources and data sources #2021

Draft
wants to merge 1 commit into
base: main
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 6 additions & 6 deletions docs/data-sources/mysql.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,19 +3,19 @@
page_title: "aiven_mysql Data Source - terraform-provider-aiven"
subcategory: ""
description: |-
The MySQL data source provides information about the existing Aiven MySQL service.
Gets information about an Aiven for MySQL® service.
---

# aiven_mysql (Data Source)

The MySQL data source provides information about the existing Aiven MySQL service.
Gets information about an Aiven for MySQL® service.

## Example Usage

```terraform
data "aiven_mysql" "mysql1" {
project = data.aiven_project.foo.project
service_name = "my-mysql1"
data "aiven_mysql" "example_mysql" {
project = aiven_project.example_project.project
service_name = "example-mysql"
}
```

Expand All @@ -40,7 +40,7 @@ data "aiven_mysql" "mysql1" {
- `id` (String) The ID of this resource.
- `maintenance_window_dow` (String) Day of week when maintenance operations should be performed. One monday, tuesday, wednesday, etc.
- `maintenance_window_time` (String) Time of day when maintenance operations should be performed. UTC time in HH:mm:ss format.
- `mysql` (List of Object, Sensitive) MySQL specific server provided values (see [below for nested schema](#nestedatt--mysql))
- `mysql` (List of Object, Sensitive) MySQL server-provided values. (see [below for nested schema](#nestedatt--mysql))
- `mysql_user_config` (List of Object) Mysql user configurable settings. **Warning:** There's no way to reset advanced configuration options to default. Options that you add cannot be removed later (see [below for nested schema](#nestedatt--mysql_user_config))
- `plan` (String) Defines what kind of computing resources are allocated for the service. It can be changed after creation, though there are some restrictions when going to a smaller plan such as the new plan must have sufficient amount of disk space to store all current data and switching to a plan with fewer nodes might not be supported. The basic plan names are `hobbyist`, `startup-x`, `business-x` and `premium-x` where `x` is (roughly) the amount of memory on each node (also other attributes like number of CPUs and amount of disk space varies but naming is based on memory). The available options can be seen from the [Aiven pricing page](https://aiven.io/pricing).
- `project_vpc_id` (String) Specifies the VPC the service should run in. If the value is not set the service is not run inside a VPC. When set, the value should be given as a reference to set up dependencies correctly and the VPC must be in the same cloud and region as the service itself. Project can be freely moved to and from VPC after creation but doing so triggers migration to new servers so the operation can take significant amount of time to complete if the service has a lot of data.
Expand Down
16 changes: 8 additions & 8 deletions docs/data-sources/mysql_database.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,20 +3,20 @@
page_title: "aiven_mysql_database Data Source - terraform-provider-aiven"
subcategory: ""
description: |-
The MySQL Database data source provides information about the existing Aiven MySQL Database.
Gets information about an Aiven for MySQL® database.
---

# aiven_mysql_database (Data Source)

The MySQL Database data source provides information about the existing Aiven MySQL Database.
Gets information about an Aiven for MySQL® database.

## Example Usage

```terraform
data "aiven_mysql_database" "mydatabase" {
project = aiven_project.myproject.project
service_name = aiven_mysql.mymysql.service_name
database_name = "<DATABASE_NAME>"
data "aiven_mysql_database" "example_database" {
project = aiven_project.example_project.project
service_name = aiven_mysql.example_mysql.service_name
database_name = "example-database"
}
```

Expand All @@ -25,11 +25,11 @@ data "aiven_mysql_database" "mydatabase" {

### Required

- `database_name` (String) The name of the service database. Changing this property forces recreation of the resource.
- `database_name` (String) The name of the database. Changing this property forces recreation of the resource.
- `project` (String) The name of the project this resource belongs to. To set up proper dependencies please refer to this variable as a reference. Changing this property forces recreation of the resource.
- `service_name` (String) The name of the service that this resource belongs to. To set up proper dependencies please refer to this variable as a reference. Changing this property forces recreation of the resource.

### Read-Only

- `id` (String) The ID of this resource.
- `termination_protection` (Boolean) It is a Terraform client-side deletion protections, which prevents the database from being deleted by Terraform. It is recommended to enable this for any production databases containing critical data. The default value is `false`.
- `termination_protection` (Boolean) Client-side deletion protection that prevents the database from being deleted by Terraform. Enable this for production databases containing critical data. The default value is `false`.
22 changes: 11 additions & 11 deletions docs/data-sources/mysql_user.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,20 +3,20 @@
page_title: "aiven_mysql_user Data Source - terraform-provider-aiven"
subcategory: ""
description: |-
The MySQL User data source provides information about the existing Aiven MySQL User.
Gets information about an Aiven for MySQL® service user.
---

# aiven_mysql_user (Data Source)

The MySQL User data source provides information about the existing Aiven MySQL User.
Gets information about an Aiven for MySQL® service user.

## Example Usage

```terraform
data "aiven_mysql_user" "user" {
service_name = "my-service"
project = "my-project"
username = "user1"
data "aiven_mysql_user" "example_mysql_user" {
service_name = aiven_mysql.example_mysql.service_name
project = aiven_project.example_project.project
username = "example-mysql-user"
}
```

Expand All @@ -27,13 +27,13 @@ data "aiven_mysql_user" "user" {

- `project` (String) The name of the project this resource belongs to. To set up proper dependencies please refer to this variable as a reference. Changing this property forces recreation of the resource.
- `service_name` (String) The name of the service that this resource belongs to. To set up proper dependencies please refer to this variable as a reference. Changing this property forces recreation of the resource.
- `username` (String) The actual name of the MySQL User. To set up proper dependencies please refer to this variable as a reference. Changing this property forces recreation of the resource.
- `username` (String) The name of the MySQL service user. To set up proper dependencies please refer to this variable as a reference. Changing this property forces recreation of the resource.

### Read-Only

- `access_cert` (String, Sensitive) Access certificate for the user
- `access_key` (String, Sensitive) Access certificate key for the user
- `access_cert` (String, Sensitive) Access certificate for the user.
- `access_key` (String, Sensitive) Access certificate key for the user.
- `authentication` (String) Authentication details. The possible values are `null`, `caching_sha2_password` and `mysql_native_password`.
- `id` (String) The ID of this resource.
- `password` (String, Sensitive) The password of the MySQL User ( not applicable for all services ).
- `type` (String) Type of the user account. Tells whether the user is the primary account or a regular account.
- `password` (String, Sensitive) The password of the MySQL service user.
- `type` (String) User account type, such as primary or regular account.
36 changes: 18 additions & 18 deletions docs/resources/mysql.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,21 +3,21 @@
page_title: "aiven_mysql Resource - terraform-provider-aiven"
subcategory: ""
description: |-
The MySQL resource allows the creation and management of Aiven MySQL services.
Creates and manages an Aiven for MySQL® https://aiven.io/docs/products/mysql service.
---

# aiven_mysql (Resource)

The MySQL resource allows the creation and management of Aiven MySQL services.
Creates and manages an [Aiven for MySQL®](https://aiven.io/docs/products/mysql) service.

## Example Usage

```terraform
resource "aiven_mysql" "mysql1" {
project = data.aiven_project.foo.project
resource "aiven_mysql" "example_mysql" {
project = data.aiven_project.example_project.project
cloud_name = "google-europe-west1"
plan = "business-4"
service_name = "my-mysql1"
service_name = "example-mysql"
maintenance_window_dow = "monday"
maintenance_window_time = "10:00:00"

Expand Down Expand Up @@ -52,7 +52,7 @@ resource "aiven_mysql" "mysql1" {
- `disk_space` (String, Deprecated) Service disk space. Possible values depend on the service type, the cloud provider and the project. Therefore, reducing will result in the service rebalancing.
- `maintenance_window_dow` (String) Day of week when maintenance operations should be performed. One monday, tuesday, wednesday, etc.
- `maintenance_window_time` (String) Time of day when maintenance operations should be performed. UTC time in HH:mm:ss format.
- `mysql` (Block List, Max: 1) MySQL specific server provided values (see [below for nested schema](#nestedblock--mysql))
- `mysql` (Block List, Max: 1) MySQL server-provided values. (see [below for nested schema](#nestedblock--mysql))
- `mysql_user_config` (Block List, Max: 1) Mysql user configurable settings. **Warning:** There's no way to reset advanced configuration options to default. Options that you add cannot be removed later (see [below for nested schema](#nestedblock--mysql_user_config))
- `project_vpc_id` (String) Specifies the VPC the service should run in. If the value is not set the service is not run inside a VPC. When set, the value should be given as a reference to set up dependencies correctly and the VPC must be in the same cloud and region as the service itself. Project can be freely moved to and from VPC after creation but doing so triggers migration to new servers so the operation can take significant amount of time to complete if the service has a lot of data.
- `service_integrations` (Block Set) Service integrations to specify when creating a service. Not applied after initial service creation (see [below for nested schema](#nestedblock--service_integrations))
Expand Down Expand Up @@ -83,26 +83,26 @@ resource "aiven_mysql" "mysql1" {

Optional:

- `standby_uris` (List of String, Sensitive) MySQL standby connection URIs
- `syncing_uris` (List of String, Sensitive) MySQL syncing connection URIs
- `uris` (List of String, Sensitive) MySQL master connection URIs
- `standby_uris` (List of String, Sensitive) MySQL standby connection URIs.
- `syncing_uris` (List of String, Sensitive) MySQL syncing connection URIs.
- `uris` (List of String, Sensitive) MySQL connection URIs.

Read-Only:

- `params` (Block List) MySQL connection parameters (see [below for nested schema](#nestedblock--mysql--params))
- `replica_uri` (String, Sensitive) MySQL replica URI for services with a replica
- `params` (Block List) MySQL connection parameters. (see [below for nested schema](#nestedblock--mysql--params))
- `replica_uri` (String, Sensitive) MySQL replica URI for services with a replica.

<a id="nestedblock--mysql--params"></a>
### Nested Schema for `mysql.params`

Read-Only:

- `database_name` (String, Sensitive) Primary MySQL database name
- `host` (String, Sensitive) MySQL host IP or name
- `password` (String, Sensitive) MySQL admin user password
- `port` (Number, Sensitive) MySQL port
- `sslmode` (String, Sensitive) MySQL sslmode setting (currently always "require")
- `user` (String, Sensitive) MySQL admin user name
- `database_name` (String, Sensitive) Thr name of the primary MySQL database.
- `host` (String, Sensitive) MySQL host IP or name.
- `password` (String, Sensitive) The password for the admin service user.
- `port` (Number, Sensitive) MySQL port.
- `sslmode` (String, Sensitive) MySQL SSL mode setting. Always set to "require".
- `user` (String, Sensitive) The username for the admin service user.



Expand Down Expand Up @@ -289,5 +289,5 @@ Read-Only:
Import is supported using the following syntax:

```shell
terraform import aiven_mysql.mysql1 project/service_name
terraform import aiven_mysql.example_mysql PROJECT/SERVICE_NAME
```
18 changes: 9 additions & 9 deletions docs/resources/mysql_database.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,20 +3,20 @@
page_title: "aiven_mysql_database Resource - terraform-provider-aiven"
subcategory: ""
description: |-
The MySQL Database resource allows the creation and management of Aiven MySQL Databases.
Creates and manages an Aiven for MySQL® https://aiven.io/docs/products/mysql database.
---

# aiven_mysql_database (Resource)

The MySQL Database resource allows the creation and management of Aiven MySQL Databases.
Creates and manages an [Aiven for MySQL®](https://aiven.io/docs/products/mysql) database.

## Example Usage

```terraform
resource "aiven_mysql_database" "mydatabase" {
project = aiven_project.myproject.project
service_name = aiven_mysql.mymysql.service_name
database_name = "<DATABASE_NAME>"
resource "aiven_mysql_database" "example_mysql_database" {
project = data.aiven_project.example_project.project
service_name = aiven_mysql.example_mysql.service_name
database_name = "example-database"
}
```

Expand All @@ -25,13 +25,13 @@ resource "aiven_mysql_database" "mydatabase" {

### Required

- `database_name` (String) The name of the service database. Changing this property forces recreation of the resource.
- `database_name` (String) The name of the database. Changing this property forces recreation of the resource.
- `project` (String) The name of the project this resource belongs to. To set up proper dependencies please refer to this variable as a reference. Changing this property forces recreation of the resource.
- `service_name` (String) The name of the service that this resource belongs to. To set up proper dependencies please refer to this variable as a reference. Changing this property forces recreation of the resource.

### Optional

- `termination_protection` (Boolean) It is a Terraform client-side deletion protections, which prevents the database from being deleted by Terraform. It is recommended to enable this for any production databases containing critical data. The default value is `false`.
- `termination_protection` (Boolean) Client-side deletion protection that prevents the database from being deleted by Terraform. Enable this for production databases containing critical data. The default value is `false`.
- `timeouts` (Block, Optional) (see [below for nested schema](#nestedblock--timeouts))

### Read-Only
Expand All @@ -54,5 +54,5 @@ Optional:
Import is supported using the following syntax:

```shell
terraform import aiven_mysql_database.mydatabase PROJECT/SERVICE_NAME/DATABASE_NAME
terraform import aiven_mysql_database.example_database PROJECT/SERVICE_NAME/DATABASE_NAME
```
24 changes: 12 additions & 12 deletions docs/resources/mysql_user.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,21 +3,21 @@
page_title: "aiven_mysql_user Resource - terraform-provider-aiven"
subcategory: ""
description: |-
The MySQL User resource allows the creation and management of Aiven MySQL Users.
Creates and manages an Aiven for MySQL® service user.
---

# aiven_mysql_user (Resource)

The MySQL User resource allows the creation and management of Aiven MySQL Users.
Creates and manages an Aiven for MySQL® service user.

## Example Usage

```terraform
resource "aiven_mysql_user" "foo" {
service_name = aiven_mysql.bar.service_name
project = "my-project"
username = "user-1"
password = "Test$1234"
resource "aiven_mysql_user" "example_mysql_user" {
service_name = aiven_mysql.example_mysql.service_name
project = data.aiven_project.example_project.project
username = "example-mysql-user"
password = var.service_user_pw
}
```

Expand All @@ -28,20 +28,20 @@ resource "aiven_mysql_user" "foo" {

- `project` (String) The name of the project this resource belongs to. To set up proper dependencies please refer to this variable as a reference. Changing this property forces recreation of the resource.
- `service_name` (String) The name of the service that this resource belongs to. To set up proper dependencies please refer to this variable as a reference. Changing this property forces recreation of the resource.
- `username` (String) The actual name of the MySQL User. To set up proper dependencies please refer to this variable as a reference. Changing this property forces recreation of the resource.
- `username` (String) The name of the MySQL service user. To set up proper dependencies please refer to this variable as a reference. Changing this property forces recreation of the resource.

### Optional

- `authentication` (String) Authentication details. The possible values are `null`, `caching_sha2_password` and `mysql_native_password`.
- `password` (String, Sensitive) The password of the MySQL User ( not applicable for all services ).
- `password` (String, Sensitive) The password of the MySQL service user.
- `timeouts` (Block, Optional) (see [below for nested schema](#nestedblock--timeouts))

### Read-Only

- `access_cert` (String, Sensitive) Access certificate for the user
- `access_key` (String, Sensitive) Access certificate key for the user
- `access_cert` (String, Sensitive) Access certificate for the user.
- `access_key` (String, Sensitive) Access certificate key for the user.
- `id` (String) The ID of this resource.
- `type` (String) Type of the user account. Tells whether the user is the primary account or a regular account.
- `type` (String) User account type, such as primary or regular account.

<a id="nestedblock--timeouts"></a>
### Nested Schema for `timeouts`
Expand Down
6 changes: 3 additions & 3 deletions examples/data-sources/aiven_mysql/data-source.tf
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
data "aiven_mysql" "mysql1" {
project = data.aiven_project.foo.project
service_name = "my-mysql1"
data "aiven_mysql" "example_mysql" {
project = aiven_project.example_project.project
service_name = "example-mysql"
}
8 changes: 4 additions & 4 deletions examples/data-sources/aiven_mysql_database/data-source.tf
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
data "aiven_mysql_database" "mydatabase" {
project = aiven_project.myproject.project
service_name = aiven_mysql.mymysql.service_name
database_name = "<DATABASE_NAME>"
data "aiven_mysql_database" "example_database" {
project = aiven_project.example_project.project
service_name = aiven_mysql.example_mysql.service_name
database_name = "example-database"
}

8 changes: 4 additions & 4 deletions examples/data-sources/aiven_mysql_user/data-source.tf
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
data "aiven_mysql_user" "user" {
service_name = "my-service"
project = "my-project"
username = "user1"
data "aiven_mysql_user" "example_mysql_user" {
service_name = aiven_mysql.example_mysql.service_name
project = aiven_project.example_project.project
username = "example-mysql-user"
}
2 changes: 1 addition & 1 deletion examples/resources/aiven_mysql/import.sh
Original file line number Diff line number Diff line change
@@ -1 +1 @@
terraform import aiven_mysql.mysql1 project/service_name
terraform import aiven_mysql.example_mysql PROJECT/SERVICE_NAME
6 changes: 3 additions & 3 deletions examples/resources/aiven_mysql/resource.tf
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
resource "aiven_mysql" "mysql1" {
project = data.aiven_project.foo.project
resource "aiven_mysql" "example_mysql" {
project = data.aiven_project.example_project.project
cloud_name = "google-europe-west1"
plan = "business-4"
service_name = "my-mysql1"
service_name = "example-mysql"
maintenance_window_dow = "monday"
maintenance_window_time = "10:00:00"

Expand Down
2 changes: 1 addition & 1 deletion examples/resources/aiven_mysql_database/import.sh
Original file line number Diff line number Diff line change
@@ -1 +1 @@
terraform import aiven_mysql_database.mydatabase PROJECT/SERVICE_NAME/DATABASE_NAME
terraform import aiven_mysql_database.example_database PROJECT/SERVICE_NAME/DATABASE_NAME
8 changes: 4 additions & 4 deletions examples/resources/aiven_mysql_database/resource.tf
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
resource "aiven_mysql_database" "mydatabase" {
project = aiven_project.myproject.project
service_name = aiven_mysql.mymysql.service_name
database_name = "<DATABASE_NAME>"
resource "aiven_mysql_database" "example_mysql_database" {
project = data.aiven_project.example_project.project
service_name = aiven_mysql.example_mysql.service_name
database_name = "example-database"
}
10 changes: 5 additions & 5 deletions examples/resources/aiven_mysql_user/resource.tf
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
resource "aiven_mysql_user" "foo" {
service_name = aiven_mysql.bar.service_name
project = "my-project"
username = "user-1"
password = "Test$1234"
resource "aiven_mysql_user" "example_mysql_user" {
service_name = aiven_mysql.example_mysql.service_name
project = data.aiven_project.example_project.project
username = "example-mysql-user"
password = var.service_user_pw
}
Loading
Loading