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

Implement new cloud SQL API switchover #18807

Closed
lychgoogle opened this issue Jul 22, 2024 · 2 comments
Closed

Implement new cloud SQL API switchover #18807

lychgoogle opened this issue Jul 22, 2024 · 2 comments

Comments

@lychgoogle
Copy link

lychgoogle commented Jul 22, 2024

Community Note

  • Please vote on this issue by adding a 👍 reaction to the original issue to help the community and maintainers prioritize this request.
  • Please do not leave +1 or me too comments, they generate extra noise for issue followers and do not help prioritize the request.
  • If you are interested in working on this issue or have submitted a pull request, please leave a comment.
  • If an issue is assigned to a user, that user is claiming responsibility for the issue.
  • Customers working with a Google Technical Account Manager or Customer Engineer can ask them to reach out internally to expedite investigation and resolution of this issue.

Description

We have new API switchover on cloud SQL (API doc) https://cloud.google.com/sql/docs/mysql/admin-api/rest/v1/instances/switchover , and we want to support them in terraform.

New or Affected Resource(s)

  • google_sql_database_instance

Potential Terraform Configuration

Suppose we have "original-primary" and "original-replica", then we make following change to the replica to trigger switchover.

resource "google_sql_database_instance" "original-replica" {
  provider = google-beta
  name = "original-replica"
  project = "my-project"
-  instance_type = "READ_REPLICA_INSTANCE"
+  instance_type = "CLOUD_SQL_INSTANCE" 
+  replica_names = ["original-primary"]
# irrelevant fields are omitted.
}

References

No response

b/359238666

@github-actions github-actions bot added forward/review In review; remove label to forward service/sqladmin-cp labels Jul 22, 2024
@lychgoogle
Copy link
Author

Addition on assignee: I'd like to work it myself, but not sure how to make me as an assignee.

@lychgoogle
Copy link
Author

main PR merged, so my job seems done.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants