{"id":49540353,"url":"https://github.com/kogunlowo123/terraform-gcp-spanner","last_synced_at":"2026-05-02T15:05:11.595Z","repository":{"id":343203484,"uuid":"1175452897","full_name":"kogunlowo123/terraform-gcp-spanner","owner":"kogunlowo123","description":"Terraform module for Google Cloud Spanner with instances, databases, backup schedules, and IAM bindings","archived":false,"fork":false,"pushed_at":"2026-03-07T18:23:58.000Z","size":8,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2026-03-09T14:53:40.762Z","etag":null,"topics":["database","gcp","google-cloud","spanner","terraform","terraform-module"],"latest_commit_sha":null,"homepage":null,"language":"HCL","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/kogunlowo123.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2026-03-07T18:23:55.000Z","updated_at":"2026-03-07T19:22:07.000Z","dependencies_parsed_at":null,"dependency_job_id":null,"html_url":"https://github.com/kogunlowo123/terraform-gcp-spanner","commit_stats":null,"previous_names":["kogunlowo123/terraform-gcp-spanner"],"tags_count":1,"template":false,"template_full_name":null,"purl":"pkg:github/kogunlowo123/terraform-gcp-spanner","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kogunlowo123%2Fterraform-gcp-spanner","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kogunlowo123%2Fterraform-gcp-spanner/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kogunlowo123%2Fterraform-gcp-spanner/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kogunlowo123%2Fterraform-gcp-spanner/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/kogunlowo123","download_url":"https://codeload.github.com/kogunlowo123/terraform-gcp-spanner/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kogunlowo123%2Fterraform-gcp-spanner/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":32538276,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-02T12:25:33.646Z","status":"ssl_error","status_checked_at":"2026-05-02T12:24:51.733Z","response_time":132,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["database","gcp","google-cloud","spanner","terraform","terraform-module"],"created_at":"2026-05-02T15:05:07.097Z","updated_at":"2026-05-02T15:05:11.580Z","avatar_url":"https://github.com/kogunlowo123.png","language":"HCL","funding_links":[],"categories":[],"sub_categories":[],"readme":"# terraform-gcp-spanner\n\nProduction-ready Terraform module for Google Cloud Spanner. Manages instances (regional and multi-region), databases with DDL, autoscaling, CMEK encryption, backup schedules, point-in-time recovery, and IAM bindings.\n\n## Architecture\n\n```mermaid\nflowchart TD\n    A[Terraform Module] --\u003e B[Spanner Instances]\n    A --\u003e C[Spanner Databases]\n    A --\u003e D[Backup Schedules]\n    A --\u003e E[IAM Bindings]\n\n    B --\u003e B1[Regional Config]\n    B --\u003e B2[Multi-Region Config]\n    B --\u003e B3[Autoscaling]\n    B --\u003e B4[Processing Units / Nodes]\n    C --\u003e C1[DDL Statements]\n    C --\u003e C2[CMEK Encryption]\n    C --\u003e C3[Point-in-Time Recovery]\n    C --\u003e C4[PostgreSQL Dialect]\n    C --\u003e C5[Drop Protection]\n    D --\u003e D1[Cron Schedule]\n    D --\u003e D2[Retention Period]\n    D --\u003e D3[Encrypted Backups]\n    E --\u003e E1[Instance IAM]\n    E --\u003e E2[Database IAM]\n    E --\u003e E3[Conditional Access]\n\n    style A fill:#4285F4,stroke:#1A73E8,color:#fff\n    style B fill:#34A853,stroke:#1E8E3E,color:#fff\n    style C fill:#EA4335,stroke:#D93025,color:#fff\n    style D fill:#FBBC04,stroke:#F9AB00,color:#333\n    style E fill:#9C27B0,stroke:#7B1FA2,color:#fff\n    style B1 fill:#81C784,stroke:#66BB6A,color:#333\n    style B2 fill:#81C784,stroke:#66BB6A,color:#333\n    style B3 fill:#A5D6A7,stroke:#81C784,color:#333\n    style B4 fill:#A5D6A7,stroke:#81C784,color:#333\n    style C1 fill:#EF9A9A,stroke:#EF5350,color:#333\n    style C2 fill:#EF9A9A,stroke:#EF5350,color:#333\n    style C3 fill:#EF9A9A,stroke:#EF5350,color:#333\n    style C4 fill:#EF9A9A,stroke:#EF5350,color:#333\n    style C5 fill:#EF9A9A,stroke:#EF5350,color:#333\n    style D1 fill:#FFF176,stroke:#FDD835,color:#333\n    style D2 fill:#FFF176,stroke:#FDD835,color:#333\n    style D3 fill:#FFF176,stroke:#FDD835,color:#333\n    style E1 fill:#CE93D8,stroke:#BA68C8,color:#333\n    style E2 fill:#CE93D8,stroke:#BA68C8,color:#333\n    style E3 fill:#CE93D8,stroke:#BA68C8,color:#333\n```\n\n## Usage\n\n```hcl\nmodule \"spanner\" {\n  source = \"path/to/terraform-gcp-spanner\"\n\n  project_id = \"my-gcp-project\"\n\n  instances = {\n    \"my-instance\" = {\n      display_name = \"My Spanner Instance\"\n      config       = \"regional-us-central1\"\n      num_nodes    = 1\n    }\n  }\n\n  databases = {\n    \"my-database\" = {\n      instance = \"my-instance\"\n      ddl = [\n        \"CREATE TABLE Users (UserId INT64 NOT NULL, Name STRING(256)) PRIMARY KEY(UserId)\",\n      ]\n    }\n  }\n}\n```\n\n## Features\n\n- Instance provisioning with regional and multi-region configurations\n- Autoscaling with CPU and storage utilization targets\n- Fixed capacity via processing units or node count\n- Database creation with DDL statement management\n- CMEK encryption for databases and backups\n- Point-in-time recovery via version retention period\n- PostgreSQL dialect support\n- Backup schedules with cron expressions and retention policies\n- Instance-level and database-level IAM bindings with conditional access\n- Drop protection and deletion protection for databases\n\n## Requirements\n\n| Name | Version |\n|------|---------|\n| terraform | \u003e= 1.3.0 |\n| google | \u003e= 5.0 |\n| google-beta | \u003e= 5.0 |\n\n## Inputs\n\n| Name | Description | Type | Required |\n|------|-------------|------|----------|\n| project_id | GCP project ID | `string` | yes |\n| labels | Common labels for all resources | `map(string)` | no |\n| instances | Map of Spanner instances to create | `map(object)` | no |\n| databases | Map of Spanner databases to create | `map(object)` | no |\n| backup_schedules | Map of backup schedules | `map(object)` | no |\n| instance_iam_bindings | Instance-level IAM bindings | `map(object)` | no |\n| database_iam_bindings | Database-level IAM bindings | `map(object)` | no |\n\n## Outputs\n\n| Name | Description |\n|------|-------------|\n| instance_ids | Map of instance names to resource IDs |\n| instance_names | Map of instance names to short names |\n| instance_states | Map of instance names to current state |\n| database_ids | Map of database names to resource IDs |\n| database_names | Map of database names to short names |\n| database_states | Map of database names to current state |\n| backup_schedule_ids | Map of backup schedule names to resource IDs |\n| project_id | The GCP project ID |\n\n## Examples\n\n- [Basic](examples/basic/) - Single-node regional instance with database and DDL\n- [Advanced](examples/advanced/) - Autoscaling, CMEK, backup schedules\n- [Complete](examples/complete/) - Multi-region, PostgreSQL, all IAM and backup features\n\n## License\n\nMIT License - see [LICENSE](LICENSE) for details.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkogunlowo123%2Fterraform-gcp-spanner","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fkogunlowo123%2Fterraform-gcp-spanner","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkogunlowo123%2Fterraform-gcp-spanner/lists"}