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

add master to sql database instance field to clarify documentation #9409

Merged
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
3 changes: 3 additions & 0 deletions .changelog/4897.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
```release-note:none

```
16 changes: 8 additions & 8 deletions website/docs/d/sql_database_instance.html.markdown
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ description: |-

Use this data source to get information about a Cloud SQL instance

## Example Usage
## Example Usage


```hcl
Expand All @@ -31,27 +31,27 @@ The following arguments are supported:
## Attributes Reference

In addition to the arguments listed above, the following attributes are exported:

* `settings` - The settings to use for the database. The
configuration is detailed below.

* `database_version` - The MySQL, PostgreSQL or SQL Server (beta) version to use.

* `master_instance_name` - The name of the instance that will act as
* `master_instance_name` - The name of the existing instance that will act as
the master in the replication setup.

* `replica_configuration` - The configuration for replication. The
configuration is detailed below.

* `root_password` - Initial root password. Required for MS SQL Server, ignored by MySQL and PostgreSQL.

* `encryption_key_name` - [Beta](https://terraform.io/docs/providers/google/guides/provider_versions.html))
The full path to the encryption key used for the CMEK disk encryption.

The `settings` block contains:

* `tier` - The machine type to use.

* `activation_policy` - This specifies when the instance should be
active. Can be either `ALWAYS` or `NEVER`.

Expand Down Expand Up @@ -97,7 +97,7 @@ The `settings.backup_configuration` subblock contains:

The `settings.ip_configuration` subblock contains:

* `ipv4_enabled` - Whether this Cloud SQL instance should be assigned a public IPV4 address.
* `ipv4_enabled` - Whether this Cloud SQL instance should be assigned a public IPV4 address.

* `private_network` - The VPC network from which the Cloud SQL instance is accessible for private IP.

Expand Down Expand Up @@ -148,7 +148,7 @@ The `replica_configuration` block contains:

* `connect_retry_interval` - The number of seconds between connect retries.

* `dump_file_path` - Path to a SQL file in GCS from which replica instances are created.
* `dump_file_path` - Path to a SQL file in GCS from which replica instances are created.

* `failover_target` - Specifies if the replica is the failover target.

Expand Down
22 changes: 11 additions & 11 deletions website/docs/r/sql_database_instance.html.markdown
Original file line number Diff line number Diff line change
Expand Up @@ -18,13 +18,13 @@ for more details.
To upgrade your First-generation instance, update your Terraform config that the instance has
* `settings.ip_configuration.ipv4_enabled=true`
* `settings.backup_configuration.enabled=true`
* `settings.backup_configuration.binary_log_enabled=true`.
* `settings.backup_configuration.binary_log_enabled=true`.
Apply the terraform config, then upgrade the instance in the console as described in the documentation.
Once upgraded, update the following attributes in your Terraform config to the correct value according to
the above documentation:
* `region`
* `database_version` (if applicable)
* `tier`
* `tier`
Remove any fields that are not applicable to Second-generation instances:
* `settings.crash_safe_replication`
* `settings.replication_type`
Expand Down Expand Up @@ -198,8 +198,8 @@ The following arguments are supported:

* `database_version` - (Optional, Default: `MYSQL_5_6`) The MySQL, PostgreSQL or
SQL Server (beta) version to use. Supported values include `MYSQL_5_6`,
`MYSQL_5_7`, `MYSQL_8_0`, `POSTGRES_9_6`,`POSTGRES_10`, `POSTGRES_11`,
`POSTGRES_12`, `POSTGRES_13`, `SQLSERVER_2017_STANDARD`,
`MYSQL_5_7`, `MYSQL_8_0`, `POSTGRES_9_6`,`POSTGRES_10`, `POSTGRES_11`,
`POSTGRES_12`, `POSTGRES_13`, `SQLSERVER_2017_STANDARD`,
`SQLSERVER_2017_ENTERPRISE`, `SQLSERVER_2017_EXPRESS`, `SQLSERVER_2017_WEB`.
[Database Version Policies](https://cloud.google.com/sql/docs/db-versions)
includes an up-to-date reference of supported versions.
Expand All @@ -209,16 +209,16 @@ includes an up-to-date reference of supported versions.
created. This is done because after a name is used, it cannot be reused for
up to [one week](https://cloud.google.com/sql/docs/delete-instance).

* `master_instance_name` - (Optional) The name of the instance that will act as
the master in the replication setup. Note, this requires the master to have
`binary_log_enabled` set, as well as existing backups.
* `master_instance_name` - (Optional) The name of the existing instance that will
act as the master in the replication setup. Note, this requires the master to
have `binary_log_enabled` set, as well as existing backups.

* `project` - (Optional) The ID of the project in which the resource belongs. If it
is not provided, the provider project is used.

* `replica_configuration` - (Optional) The configuration for replication. The
configuration is detailed below. Valid only for MySQL instances.

* `root_password` - (Optional) Initial root password. Required for MS SQL Server, ignored by MySQL and PostgreSQL.

* `encryption_key_name` - (Optional, [Beta](https://terraform.io/docs/providers/google/guides/provider_versions.html))
Expand All @@ -237,9 +237,9 @@ in Terraform state, a `terraform destroy` or `terraform apply` command that dele
* `restore_backup_context` - (optional) The context needed to restore the database to a backup run. This field will
cause Terraform to trigger the database to restore from the backup run indicated. The configuration is detailed below.
**NOTE:** Restoring from a backup is an imperative action and not recommended via Terraform. Adding or modifying this
block during resource creation/update will trigger the restore action after the resource is created/updated.
block during resource creation/update will trigger the restore action after the resource is created/updated.

* `clone` - (Optional) The context needed to create this instance as a clone of another instance. When this field is set during
* `clone` - (Optional) The context needed to create this instance as a clone of another instance. When this field is set during
resource creation, Terraform will attempt to clone another instance as indicated in the context. The
configuration is detailed below.

Expand Down Expand Up @@ -413,7 +413,7 @@ The optional `clone` block supports:

The optional `restore_backup_context` block supports:
**NOTE:** Restoring from a backup is an imperative action and not recommended via Terraform. Adding or modifying this
block during resource creation/update will trigger the restore action after the resource is created/updated.
block during resource creation/update will trigger the restore action after the resource is created/updated.

* `backup_run_id` - (Required) The ID of the backup run to restore from.

Expand Down