Skip to content

fix(gemini-enterprise): resolve stage-0 teardown, internal VIP sharing, and access day bounds - #225

Open
aghassemlouei wants to merge 1 commit into
mainfrom
fix/gemini-stage-0-fixes-174-185-186
Open

fix(gemini-enterprise): resolve stage-0 teardown, internal VIP sharing, and access day bounds#225
aghassemlouei wants to merge 1 commit into
mainfrom
fix/gemini-stage-0-fixes-174-185-186

Conversation

@aghassemlouei

@aghassemlouei aghassemlouei commented Sep 6, 2026

Copy link
Copy Markdown
Collaborator

Description

This pull request addresses three issues in blueprints/fedramp-high/gemini-enterprise/gemini-stage-0:

  1. BigQuery Analytics Dataset Deletion (delete_contents_on_destroy):
    Sets delete_contents_on_destroy = true on google_bigquery_dataset.analytics_dataset in analytics.tf. Without this flag, terraform destroy fails whenever the Discovery Engine audit log sink has written date-partitioned tables to the dataset.
  2. Internal Load Balancer Shared VIP (SHARED_LOADBALANCER_VIP):
    Sets purpose = var.deployment_type == "internal" ? "SHARED_LOADBALANCER_VIP" : null on google_compute_address.gemini_enterprise_ip in network.tf. This allows the port 80 HTTP redirect forwarding rule in stage-0 and the port 443 HTTPS forwarding rule in stage-1 to share the same internal IP address without conflicting.
  3. Access Control Day Index Alignment (CEL getDayOfWeek()):
    Corrects access_start_day and access_end_day documentation across variables.tf, deploy.sh, README.md, and terraform.tfvars.sample to reflect the 0-indexed convention of CEL's getDayOfWeek() (0 = Sunday ... 6 = Saturday) rather than ISO-8601 (1..7). Adds Terraform validation blocks enforcing the 0..6 range.

Fixes #174
Fixes #185
Fixes #186

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: AC-2 (Account Management), AC-3 (Access Enforcement), SC-7 (Boundary Protection)

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/ can be leveraged for this change.
  • My code follows the established naming conventions outlined in documentation/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, IL5, etc.).

Testing

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

Testing Performed

  • tofu fmt -check: Verified all modified Terraform files format cleanly with zero diffs.
  • bash -n deploy.sh: Verified shell syntax passes without errors.
  • terraform init -backend=false && terraform validate: Executed in blueprints/fedramp-high/gemini-enterprise/gemini-stage-0/ confirming Success! The configuration is valid.

…g, and access day bounds

- analytics.tf: Set delete_contents_on_destroy = true on google_bigquery_dataset.analytics_dataset so terraform destroy does not fail on sink-written tables. (Fixes #174)
- network.tf: Set purpose = "SHARED_LOADBALANCER_VIP" on internal compute address to allow sharing the VIP between HTTP redirect (:80) and HTTPS (:443) forwarding rules. (Fixes #185)
- variables.tf, deploy.sh, README.md, terraform.tfvars.sample: Update access_start_day and access_end_day documentation to reflect CEL getDayOfWeek convention (0=Sunday..6=Saturday) and add validation blocks for 0..6 range. (Fixes #186)
@aghassemlouei aghassemlouei added bug Something isn't working gemini enterprise Gemini Enterprise (GE) related gemini for government Gemini for Government (G4G) related Level of Effort - Low Quick, well-defined tasks with no unknowns; takes a few hours up to one day to complete Priority - High Critical issues blocking development or users; urgent bugs or core features for release labels Sep 6, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment