Files
hunfabric/modules/firestore
Hemanand eaa420534b Add agent engine BYOC support (#3885)
* feat(agent-engine): add support for container and custom image specs

- Add container_config to deployment_files.
- Add image_spec with build_args to source_config.
- Make agent_framework optional and document supported values.
- Implement dynamic specs for container and source deployments.
- Add examples and automated tests for new deployment types.

* chore: update Google provider version to 7.28.0 across modules

Mechanical update of versions.tf and versions.tofu files using tools/versions.py.

* feat(agent-engine): refactor for container deployments and API alignment

- Group deployment settings under 'deployment_config' (renamed from 'deployment_files').
- Support container-based deployments via 'container_config' and 'image_spec'.
- Refactor 'source_files_config' (renamed from 'source_config') to include mutually exclusive 'python_spec' and 'image_spec'.
- Support 'developer_connect_config' as a source code type.
- Group engine settings (framework, env, secrets) under 'agent_engine_config'.
- Add support for 'memory_bank_config' persistent memory.
- Overhaul reasoning engine resources with dynamic blocks to match provider schema.
- Update all documentation examples, add TOC, and refresh test inventories.

* Update dynamic python_spec block and related example yamls

* Ignore changes setting for developer_connect_source under lifecycle management

* fixing review comments for `try` and default path for `source_path`

---------

Co-authored-by: Hemanand <hemr@google.com>
Co-authored-by: Julio Castillo <jccb@google.com>
2026-04-21 17:46:20 +00:00
..
2026-04-18 10:07:14 +02:00
2024-06-27 07:36:19 +02:00

Firestore

This module allows to crete a firestore datatabase, fields, indexes and documents.

Examples

New database

module "firestore" {
  source     = "./fabric/modules/firestore"
  project_id = "my-project"
  database = {
    name        = "my-database"
    location_id = "nam5"
    type        = "FIRESTORE_NATIVE"
  }
}
# tftest modules=1 resources=1 inventory=new-database.yaml

New database with weekly backup

module "firestore" {
  source     = "./fabric/modules/firestore"
  project_id = "my-project"
  database = {
    name        = "my-database"
    location_id = "nam5"
    type        = "FIRESTORE_NATIVE"
  }
  backup_schedule = {
    retention         = "86400s"
    weekly_recurrence = "MONDAY"
  }
}
# tftest modules=1 resources=2 inventory=new-database-with-weekly-backup.yaml

New database with document

module "firestore" {
  source     = "./fabric/modules/firestore"
  project_id = "my-project"
  database = {
    name        = "my-database"
    location_id = "nam5"
    type        = "FIRESTORE_NATIVE"
  }
  documents = {
    my-doc-1 = {
      collection  = "my-coll"
      document_id = "d3db1c14-e56d-4597-af1c-f95c2d2290c1"
      fields = {
        field1 = "value1"
        field2 = "value2"
      }
    }
  }
}
# tftest modules=1 resources=2 inventory=new-database-with-document.yaml

Existing database with document

module "firestore" {
  source     = "./fabric/modules/firestore"
  project_id = "my-project"
  database = {
    name = "my-database"
  }
  database_create = false
  documents = {
    my-doc-1 = {
      collection  = "my-coll"
      document_id = "d3db1c14-e56d-4597-af1c-f95c2d2290c1"
      fields = {
        field1 = "value1"
        field2 = "value2"
      }
    }
  }
}
# tftest modules=1 resources=1 inventory=existing-database-with-document.yaml

New database with field

module "firestore" {
  source     = "./fabric/modules/firestore"
  project_id = "my-project"
  database = {
    name        = "my-database"
    location_id = "name5"
    type        = "FIRESTORE_NATIVE"
  }
  fields = {
    my-field-in-my-coll = {
      collection = "my-coll"
      field      = "my-field"
      indexes = [
        {
          order       = "ASCENDING"
          query_scope = "COLLECTION_GROUP"
        },
        {
          array_config = "CONTAINS"
        }
      ]
    }
  }
}
# tftest modules=1 resources=2 inventory=new-database-with-field.yaml

New database with index

module "firestore" {
  source     = "./fabric/modules/firestore"
  project_id = "my-project"
  database = {
    name        = "my-database"
    location_id = "name5"
    type        = "FIRESTORE_NATIVE"
  }
  indexes = {
    my-index = {
      collection = "my-coll"
      fields = [
        {
          field_path = "name"
          order      = "ASCENDING"
        },
        {
          field_path = "description"
          order      = "DESCENDING"
        }
      ]
    }
  }
}
# tftest modules=1 resources=2 inventory=new-database-with-index.yaml

Variables

name description type required default
database Database attributes. object({…})
project_id Project id. string
backup_schedule Backup schedule. object({…}) null
database_create Flag indicating whether the database should be created of not. string "true"
documents Documents. map(object({…})) {}
fields Fields. map(object({…})) {}
indexes Indexes. map(object({…})) {}

Outputs

name description sensitive
firestore_database Firestore database.
firestore_document_ids Firestore document ids.
firestore_documents Firestore documents.
firestore_field_ids Firestore field ids.
firestore_fields Firestore fields.
firestore_index_ids Firestore index ids.
firestore_indexes Firestore indexes.