Skip to content

fix(spanner-instance): add IAM condition support and database deletion_protection default - #276

Closed
aghassemlouei wants to merge 1 commit into
mainfrom
fix/sync-upstream-cff-modules
Closed

aghassemlouei wants to merge 1 commit into
mainfrom
fix/sync-upstream-cff-modules

Conversation

@aghassemlouei

@aghassemlouei aghassemlouei commented Oct 1, 2026 •

Copy link
Copy Markdown
Member

Description

  • Add optional IAM condition object definitions to var.iam_bindings and var.iam_bindings_additive in modules/spanner-instance/variables.tf to match the existing dynamic condition blocks in modules/spanner-instance/iam.tf.
  • Default database deletion_protection to true via coalesce(each.value.deletion_protection, true) and expose database_dialect, default_time_zone, edition, and default_backup_schedule_type in modules/spanner-instance/main.tf and modules/spanner-instance/variables.tf.

Type of Change

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • Documentation update

Deployment & Compliance Impact

  • Applicable Regimes:
    • US Region Restricted (e.g., Access Policy constraint)
    • FedRAMP Moderate
    • FedRAMP High
    • DoD IL4
    • DoD IL5
    • General / All
  • NIST 800-53r5 Controls: SC-7, SC-12, SC-13, SC-28, AC-2, AC-3, AC-6, CM-2, CM-6

Checklist

Code Quality & Reusability

  • My code adheres to the Maximize Reusability principle. I have not redefined common elements and have reused existing base configurations and modules where possible.
  • I have checked that no existing module or configuration in modules/ or fast/stages-aw/ can be leveraged for this change.
  • My code follows the established naming conventions outlined in docs/naming-convention.md.

Documentation

  • I have updated the README.md of the modified module or blueprint.
  • I have added/updated documentation for inputs (variables) and outputs.

Security

  • My change adheres to GCP security best practices and the principle of least privilege.
  • I have ensured compliance with the targeted regime (FedRAMP Moderate, FedRAMP High, IL4, IL5, etc.).

Testing

  • I have tested my changes locally.
  • I have included details of my testing in this PR.

Testing Performed

  • Executed bash tools/run_tests.sh (all Python unit tests, shell syntax checks, shell unit tests, and CodeQL AST checks pass) and python3 tools/check_documentation.py modules/spanner-instance.

@aghassemlouei

Copy link
Copy Markdown
Member Author

This will require a major release given the impact that it will have on downstream consumers of the code.

@aghassemlouei
aghassemlouei marked this pull request as ready for review October 2, 2026 15:56
@aghassemlouei
aghassemlouei enabled auto-merge (squash) October 2, 2026 15:57
@aghassemlouei

Copy link
Copy Markdown
Member Author

Ready for your review @Calvin-Cheng1!

@aghassemlouei aghassemlouei added Level of Effort - Medium Moderate task requiring thought and testing; typically takes a couple of days to a week Priority - Medium Standard features and non-blocking bugs; important for the current milestone but not urgent Scope - Module Related to reusable Terraform modules in the modules directory labels Oct 13, 2026
@aghassemlouei

Copy link
Copy Markdown
Member Author

/gemini review

@gemini-code-assist gemini-code-assist Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Code Review

This pull request introduces significant updates and refactoring across several modules, including cloud-run-v2, folder, net-lb-int, net-lb-proxy-int, and spanner-instance, to support new features such as GPUs, multi-region settings, Privileged Access Manager (PAM) entitlements, and IAM Deny policies. The review feedback highlights several key improvements: resolving a potential Terraform evaluation error in net-lb-proxy-int when forwarding_rule is null, ensuring consistency in folder by reusing the local.folder_number variable instead of redundant string replacement, and robustly handling the projects/ prefix for KMS Autokey configurations.

Comment thread modules/net-lb-proxy-int/main.tf Resolved
Comment thread modules/folder/scc-mute-configs.tf Resolved
Comment thread modules/folder/main.tf Resolved
@aghassemlouei
aghassemlouei force-pushed the fix/sync-upstream-cff-modules branch 3 times, most recently from fb0885e to f268c33 Compare October 20, 2026 02:30
@aghassemlouei aghassemlouei changed the title fix(modules): sync folder, net-lb-int, net-lb-proxy-int, spanner-instance, and cloud-run-v2 from upstream CFF fix(spanner-instance): add IAM condition support and database deletion_protection default Oct 20, 2026
@aghassemlouei aghassemlouei added Status - Ready for Review and removed Level of Effort - Medium Moderate task requiring thought and testing; typically takes a couple of days to a week Scope - Module Related to reusable Terraform modules in the modules directory Scope - Modules labels Oct 20, 2026
@aghassemlouei
aghassemlouei force-pushed the fix/sync-upstream-cff-modules branch from fd13e18 to 82f8799 Compare October 20, 2026 15:06
@aghassemlouei
aghassemlouei force-pushed the fix/sync-upstream-cff-modules branch from 82f8799 to b357c74 Compare October 20, 2026 22:33
@aghassemlouei aghassemlouei added Security Something is insecure or can be secured Level of Effort - Low Quick, well-defined tasks with no unknowns; takes a few hours up to one day to complete Scope - Module Related to reusable Terraform modules in the modules directory and removed Scope - Modules labels Oct 20, 2026
@aghassemlouei
aghassemlouei force-pushed the fix/sync-upstream-cff-modules branch from b357c74 to ec50de7 Compare October 20, 2026 22:57
@aghassemlouei
aghassemlouei force-pushed the fix/sync-upstream-cff-modules branch from ec50de7 to 64db47c Compare October 20, 2026 23:26
@aghassemlouei
aghassemlouei force-pushed the fix/sync-upstream-cff-modules branch 7 times, most recently from 887a88a to e24bc5a Compare October 22, 2026 19:09
@aghassemlouei
aghassemlouei force-pushed the fix/sync-upstream-cff-modules branch from e24bc5a to 60dcd5d Compare October 23, 2026 12:46
@aghassemlouei

Copy link
Copy Markdown
Member Author

Closing this PR in favor of #311 (v59.2.0 Cloud Foundation Fabric module sync) and upstream GoogleCloudPlatform/cloud-foundation-fabric synchronization so modules/spanner-instance does not diverge locally on the v38.0.0 baseline.

auto-merge was automatically disabled October 28, 2026 04:09

Pull request was closed

@aghassemlouei
aghassemlouei deleted the fix/sync-upstream-cff-modules branch October 28, 2026 04:09
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Bug Something isn't working Level of Effort - Low Quick, well-defined tasks with no unknowns; takes a few hours up to one day to complete Priority - Medium Standard features and non-blocking bugs; important for the current milestone but not urgent Scope - Module Related to reusable Terraform modules in the modules directory Security Something is insecure or can be secured

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants