adding new module spanner in cluster toolkit.#5592
Conversation
Summary of ChangesHello, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed! This pull request introduces a new module to the Cluster Toolkit, enabling users to provision and configure Google Cloud Spanner resources. The module supports instance creation, database definition, and IAM member management, providing a structured way to integrate Spanner into infrastructure deployments. Highlights
Using Gemini Code AssistThe full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips. Invoking Gemini You can request assistance from Gemini at any point by creating a comment using either
Customization To customize Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a Limitations & Feedback Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counter productive. You can react with 👍 and 👎 on @gemini-code-assist comments. If you're interested in giving your feedback about your experience with Gemini Code Assist for GitHub and other Google products, sign up here. Footnotes
|
There was a problem hiding this comment.
Code Review
This pull request introduces a new Spanner module for the Cluster Toolkit, providing functionality to manage Spanner instances, databases, and IAM permissions. The review identifies several necessary improvements: relaxing the pinned Terraform version to a range for better compatibility, increasing the minimum Google provider version to support the 'edition' attribute, and evaluating the inclusion of the Spanner API resource to avoid blueprint conflicts. Furthermore, the module must be added to the global modules index as per the style guide, and the documentation should be updated to reflect the corrected version constraints.
kvenkatachala333
left a comment
There was a problem hiding this comment.
LGTM. Just a minor nit: please handle the gemini suggestion of ensuring new module is added to the index in the root modules/README.md file as required by the repository style guide
Adding a Spanner module for instance, database, and IAM management.
This module provides a standardized way to provision Google Cloud Spanner infrastructure. It supports the creation of Spanner instances and multiple databases within a single declarative block, including automated IAM configuration for database-level access.
Key Changes:
Instance Provisioning: Supports configurable processing units, regional configurations, and instance editions.
Multi-Database Management: Uses a map-based variable to provision multiple databases with individual deletion protection settings.
Automated IAM: Includes logic to flatten and apply IAM member bindings across all created databases, specifically for the roles/spanner.databaseUser role.
Service Enablement: Ensures the spanner.googleapis.com API is enabled in the target project before resource creation.
Submission Checklist
NOTE: Community submissions can take up to 2 weeks to be reviewed.
Please take the following actions before submitting this pull request.