Skip to content

feat(prebuilt/cloud-sql): Add clone instance tool for cloud sql#1845

Merged
averikitsch merged 23 commits into
googleapis:mainfrom
nandinisaini-google:cloudsql-cloneinstance-test
Dec 1, 2025
Merged

feat(prebuilt/cloud-sql): Add clone instance tool for cloud sql#1845
averikitsch merged 23 commits into
googleapis:mainfrom
nandinisaini-google:cloudsql-cloneinstance-test

Conversation

@nandinisaini-google

@nandinisaini-google nandinisaini-google commented Nov 4, 2025

Copy link
Copy Markdown
Contributor

Description


This pull request adds a new tool, cloud-sql-clone-instance, which enables cloning a Cloud SQL instance from the toolbox using the Cloud SQL Admin API. The tool supports both standard cloning and point-in-time recovery (PITR). It also supports specifying preferred zones for cloned instances via the preferredZone and preferredSecondaryZone fields.

Key Features:
Instance Cloning: The tool allows you to clone a Cloud SQL instance by specifying the source and destination instance names.
Point-in-Time Recovery (PITR): By providing a pointInTime timestamp, you can create a clone of an instance as it existed at a specific moment.
High Availability Configuration: The preferredZone and preferredSecondaryZone parameters allow you to configure the cloned instance for high availability.

Tested:
Screenshot 2025-11-11 at 12 21 47 PM

PR Checklist

Thank you for opening a Pull Request! Before submitting your PR, there are a
few things you can do to make sure it goes smoothly:

  • Make sure you reviewed
    CONTRIBUTING.md
  • Make sure to open an issue as a
    bug/issue
    before writing your code! That way we can discuss the change, evaluate
    designs, and agree on the general idea
  • Ensure the tests and linter pass
  • Code coverage does not decrease (if any source code was changed)
  • Appropriate docs were updated (if necessary)
  • Make sure to add ! if this involve a breaking change

🛠️ Fixes #1915

@nandinisaini-google nandinisaini-google force-pushed the cloudsql-cloneinstance-test branch from 5373241 to 5484e34 Compare November 4, 2025 12:42
Comment thread docs/en/resources/tools/cloudsql/cloudsqlcloneinstance.md Outdated
Comment thread docs/en/resources/tools/cloudsql/cloudsqlcloneinstance.md
Comment thread cmd/root.go
Comment thread tests/cloudsql/cloud_sql_clone_instance_test.go
@prernakakkar-google

Copy link
Copy Markdown
Contributor

Add changes for packaging

Comment thread internal/tools/cloudsql/cloudsqlcloneinstance/cloudsqlcloneinstance.go Outdated
@prernakakkar-google

Copy link
Copy Markdown
Contributor

/gcbrun

@prernakakkar-google prernakakkar-google added the tests: run Label to trigger Github Action tests. label Nov 4, 2025
@github-actions github-actions Bot removed the tests: run Label to trigger Github Action tests. label Nov 4, 2025
@prernakakkar-google

Copy link
Copy Markdown
Contributor

Fix the title of pull request

@prernakakkar-google

Copy link
Copy Markdown
Contributor

Update the description with more details

@nandinisaini-google nandinisaini-google changed the title feat(tools/cloudsql): add cloud-sql-clone-instance tool and documenta… feat(source/cloud-sql-admin): Add clone instance tool for cloud sql Nov 4, 2025
@nandinisaini-google nandinisaini-google force-pushed the cloudsql-cloneinstance-test branch 2 times, most recently from 5b02221 to 863e012 Compare November 5, 2025 06:07
@prernakakkar-google

Copy link
Copy Markdown
Contributor

/gcbrun

@prernakakkar-google prernakakkar-google added the tests: run Label to trigger Github Action tests. label Nov 5, 2025
@github-actions github-actions Bot removed the tests: run Label to trigger Github Action tests. label Nov 5, 2025
@nandinisaini-google

Copy link
Copy Markdown
Contributor Author

Fix the title of pull request

Done

@nandinisaini-google

Copy link
Copy Markdown
Contributor Author

Update the description with more details

Done

@nandinisaini-google nandinisaini-google force-pushed the cloudsql-cloneinstance-test branch 3 times, most recently from 6c44948 to 7e5d695 Compare November 5, 2025 08:38
@prernakakkar-google

Copy link
Copy Markdown
Contributor

/gcbrun

Comment thread docs/en/resources/tools/cloudsql/cloudsqlcloneinstance.md Outdated
@nandinisaini-google nandinisaini-google force-pushed the cloudsql-cloneinstance-test branch 2 times, most recently from 5e8e4a4 to 7aa053d Compare November 5, 2025 09:29
@prernakakkar-google

Copy link
Copy Markdown
Contributor

/gcbrun

@nandinisaini-google nandinisaini-google force-pushed the cloudsql-cloneinstance-test branch from 6527219 to 1233368 Compare November 5, 2025 14:39
@prernakakkar-google

Copy link
Copy Markdown
Contributor

/gcbrun

@prernakakkar-google prernakakkar-google marked this pull request as ready for review November 6, 2025 06:31
@averikitsch averikitsch added the tests: run Label to trigger Github Action tests. label Nov 26, 2025
@github-actions github-actions Bot removed the tests: run Label to trigger Github Action tests. label Nov 26, 2025
@averikitsch averikitsch added the tests: run Label to trigger Github Action tests. label Nov 26, 2025
@github-actions github-actions Bot removed the tests: run Label to trigger Github Action tests. label Nov 26, 2025
@averikitsch

Copy link
Copy Markdown
Contributor

/gcbrun

@averikitsch

Copy link
Copy Markdown
Contributor

/gcbrun

@averikitsch averikitsch added the tests: run Label to trigger Github Action tests. label Nov 26, 2025
@github-actions github-actions Bot removed the tests: run Label to trigger Github Action tests. label Nov 26, 2025
@averikitsch averikitsch added the tests: run Label to trigger Github Action tests. label Nov 26, 2025
@github-actions github-actions Bot removed the tests: run Label to trigger Github Action tests. label Nov 26, 2025
@averikitsch averikitsch added the tests: run Label to trigger Github Action tests. label Dec 1, 2025
@averikitsch

Copy link
Copy Markdown
Contributor

/gcbrun

@github-actions github-actions Bot removed the tests: run Label to trigger Github Action tests. label Dec 1, 2025
@averikitsch

Copy link
Copy Markdown
Contributor

/gcbrun

@averikitsch averikitsch added the tests: run Label to trigger Github Action tests. label Dec 1, 2025
@github-actions github-actions Bot removed the tests: run Label to trigger Github Action tests. label Dec 1, 2025
@averikitsch

Copy link
Copy Markdown
Contributor

/gcbrun

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

Labels

docs: deploy-preview Label to trigger Github Action docs preview.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Add a clone instance tool for CloudSQL ADMIN API to create a clone of an existing instance

3 participants