-
Notifications
You must be signed in to change notification settings - Fork 1.8k
Open
Description
Community Note
- Please vote on this issue by adding a 👍 reaction to the original issue to help the community and maintainers prioritize this request.
- Please do not leave +1 or me too comments, they generate extra noise for issue followers and do not help prioritize the request.
- If you are interested in working on this issue or have submitted a pull request, please leave a comment.
- If an issue is assigned to a user, that user is claiming responsibility for the issue.
- Customers working with a Google Technical Account Manager or Customer Engineer can ask them to reach out internally to expedite investigation and resolution of this issue.
Terraform Version & Provider Version(s)
Terraform v1.6.3
on
- provider registry.terraform.io/hashicorp/google v7.12.0
- provider registry.terraform.io/hashicorp/google-beta vX.X.X (not tested)
Affected Resource(s)
google_firestore_field
Terraform Configuration
resource "google_firestore_database" "database" {
name = var.db_name
location_id = var.db_location
deletion_policy = "ABANDON"
database_edition = "ENTERPRISE"
project = var.project_id
type = "FIRESTORE_NATIVE"
}
resource "google_firestore_field" "ttl" {
project = var.project_id
for_each = { for cfg in var.ttl_config : "${cfg.collection}.${cfg.field}" => cfg }
database = var.db_name
collection = each.value.collection
field = each.value.field
ttl_config {
}
// Disable all single field indexes for the timestamp property.
index_config {}
}Debug Output
Error: Error creating Field: googleapi: Error 400: Enterprise databases are not allowed to update field configuration other than TTL.
with module.mongo-db.module.dev-shared-state-db[0].google_firestore_field.ttl["events.expiresAt"]
on ../../modules/lib-mongo-db/main.tf line 15, in resource "google_firestore_field" "ttl":
resource "google_firestore_field" "ttl" {
Expected Behavior
Create TTL policy based on the specified field. The error is unclear since i do only intend to set TTL
Actual Behavior
Fails to create the resource which should set the TTL policy
Steps to reproduce
terraform apply
Important Factoids
Reason for using enterprise mode is that only that has mongo compatibility which is a requirement.
References
No response
b/464537660
970uraj and 977smoreira