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

Update the descriptions for sql_database_instance disk_size and disk_autoresize #11005

Open
wants to merge 4 commits into
base: main
Choose a base branch
from

Conversation

jharshika
Copy link

@jharshika jharshika commented Jun 20, 2024

Added a warning in sql_database_instance#disk_size documentation as requested in hashicorp/terraform-provider-google#9845.

Under default configuration i.e. disk_autoresize set to true, setting the value for disk_size will delete the instance to automatically expand the disk. Added a warning for the customers about this in the fields disk_autoresize and disk_size.

Release Note Template for Downstream PRs (will be copied)

sql: improved disk_size and disk_autoresize docs

In admin API, we don't have validation for host of on-premise instances. Host can take the value of IP address or DNS address. As of now it is validating that host contain the IP address in terraform, in order to be consistent with admin API and accept DNS address as well, removing the validation function for host.
Copy link

Hello! I am a robot. Tests will require approval from a repository maintainer to run.

@rileykarson, a repository maintainer, has been assigned to review your changes. If you have not received review feedback within 2 business days, please leave a comment on this PR asking them to take a look.

You can help make sure that review is quick by doing a self-review and by running impacted tests locally.

@modular-magician modular-magician added the awaiting-approval Pull requests that needs reviewer's approval to run presubmit tests label Jun 20, 2024
Copy link

@rileykarson This PR has been waiting for review for 3 weekdays. Please take a look! Use the label disable-review-reminders to disable these notifications.

Copy link
Member

@rileykarson rileykarson left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Some suggestions- we should sync the final descriptions w/ the ones inline on the resource.

@@ -292,11 +292,11 @@ The `settings` block supports:

* `enable_google_ml_integration` - (Optional) Enables [Cloud SQL instances to connect to Vertex AI](https://cloud.google.com/sql/docs/postgres/integrate-cloud-sql-with-vertex-ai) and pass requests for real-time predictions and insights. Defaults to `false`.

* `disk_autoresize` - (Optional) Enables auto-resizing of the storage size. Defaults to `true`.
* `disk_autoresize` - (Optional) Enables auto-resizing of the storage size. Defaults to `true`. Note that future terraform apply calls will attempt to delete the instance in order to resize the disk to the value specified in disk_size.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
* `disk_autoresize` - (Optional) Enables auto-resizing of the storage size. Defaults to `true`. Note that future terraform apply calls will attempt to delete the instance in order to resize the disk to the value specified in disk_size.
* `disk_autoresize` - (Optional) Enables auto-resizing of the storage size. Defaults to `true`. Note that if `disk_size` is set, future `terraform apply` calls will attempt to delete the instance in order to resize the disk to the value specified in disk_size if it has been resized. To avoid this, ensure that `lifecycle.ignore_changes` is applied to `disk_size`.


* `disk_autoresize_limit` - (Optional) The maximum size to which storage capacity can be automatically increased. The default value is 0, which specifies that there is no limit.

* `disk_size` - (Optional) The size of data disk, in GB. Size of a running instance cannot be reduced but can be increased. The minimum value is 10GB.
* `disk_size` - (Optional) The size of data disk, in GB. Size of a running instance cannot be reduced but can be increased. The minimum value is 10GB. Note that future terraform apply calls will attempt to delete the instance in order to expand the instance if disk_autoresize is true.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
* `disk_size` - (Optional) The size of data disk, in GB. Size of a running instance cannot be reduced but can be increased. The minimum value is 10GB. Note that future terraform apply calls will attempt to delete the instance in order to expand the instance if disk_autoresize is true.
* `disk_size` - (Optional) The size of data disk, in GB. Size of a running instance cannot be reduced but can be increased. The minimum value is 10GB. Note that this value will override the resizing from `disk_autoresize` if that feature is enabled. To avoid this, set `lifecycle.ignore_changes` on this field.

Copy link

github-actions bot commented Jul 9, 2024

@jharshika, this PR is waiting for action from you. Please address any comments or change requests, or re-request review from a core reviewer if no action is required.

Image showing the re-request review button

If no action is taken, this PR will be closed in 28 days.

This notification can be disabled with the disable-automatic-closure label.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
awaiting-approval Pull requests that needs reviewer's approval to run presubmit tests
Projects
None yet
3 participants