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 PSQL 13 to docs and change defaults on SQL Version field #4210

Closed
wants to merge 7 commits into from

Conversation

upodroid
Copy link
Contributor

@upodroid upodroid commented Nov 9, 2020

Fixes hashicorp/terraform-provider-google#7772
Fixes hashicorp/terraform-provider-google#5212

If this PR is for Terraform, I acknowledge that I have:

  • Searched through the issue tracker for an open issue that this either resolves or contributes to, commented on it to claim it, and written "fixes {url}" or "part of {url}" in this PR description. If there were no relevant open issues, I opened one and commented that I would like to work on it (not necessary for very small changes).
  • Generated Terraform, and ran make test and make lint to ensure it passes unit and linter tests.
  • Ensured that all new fields I added that can be set by a user appear in at least one example (for generated resources) or third_party test (for handwritten resources or update tests).
  • Ran relevant acceptance tests (If the acceptance tests do not yet pass or you are unable to run them, please let your reviewer know).
  • Read the Release Notes Guide before writing my release note below.

Release Note Template for Downstream PRs (will be copied)

sql: the default value for `database_version` of `google_sql_database_instance`has been changed to MYSQL_5_7 . Please update your configuration to match this.

@google-cla google-cla bot added the cla: yes label Nov 9, 2020
@modular-magician
Copy link
Collaborator

Hello! I am a robot who works on Magic Modules PRs.

I have detected that you are a community contributor, so your PR will be assigned to someone with a commit-bit on this repo for initial review.

Thanks for your contribution! A human will be with you soon.

@c2thorn, please review this PR or find an appropriate assignee.

@upodroid
Copy link
Contributor Author

upodroid commented Nov 9, 2020

I'm aware that this change might cause issues for the 0.0001 % of terraform users who forgot to specify mysql5.6 as their version and now need to set the field.

There is a fat warning here about the API being in beta and receiving backward incompatible changes.
https://cloud.google.com/sql/docs/mysql/admin-api

I changed the default because google is currently defaulting to 5.7 which you can verify by running

echo '{"kind": "sql#instance", "name": "foo-11111", "project": "REDACTED", "region": "us-central", "settings": {"kind": "sql#settings", "pricingPlan": "PER_USE", "replicationType": "SYNCHRONOUS", "tier": "db-n1-standard-1"}}'| http POST https://sqladmin.googleapis.com/sql/v1beta4/projects/REDACTED/instances "Authorization: Bearer $(gcloud auth print-access-token)"

gcloud sql instances list --format yaml

@modular-magician
Copy link
Collaborator

Hi! I'm the modular magician. Your PR generated some diffs in downstreams - here they are.

Diff report:

Terraform GA: Diff ( 2 files changed, 3 insertions(+), 3 deletions(-))
Terraform Beta: Diff ( 2 files changed, 3 insertions(+), 3 deletions(-))

@c2thorn
Copy link
Member

c2thorn commented Nov 10, 2020

Hey @upodroid this should be saved for the next major release. I've made an issue here to track, and we can revisit this when it comes time.

@upodroid
Copy link
Contributor Author

Fixes points to the correct issue now

@c2thorn
Copy link
Member

c2thorn commented Sep 30, 2021

@upodroid We will likely just make this field required instead of updating the default every time. Currently @shuyama1 is assigned, so she'll likely take that up.

If you think that's acceptable, I think we can close this.

@upodroid
Copy link
Contributor Author

Yeah, make it required. It makes the resource less fragile.

@c2thorn
Copy link
Member

c2thorn commented Oct 1, 2021

Thanks @upodroid.

@c2thorn c2thorn closed this Oct 1, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Update database_version default or make required Make google_sql_database_instance version required
3 participants