@hiiretail/gcp-infra-generators 1.14.0 → 1.15.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -49,22 +49,41 @@ locals {
|
|
|
49
49
|
description = try(collection.schema, null) != null ? yamldecode(file("${get_terragrunt_dir()}/${collection.schema}")).description : try(collection.description, "")
|
|
50
50
|
ttl_field = try(collection.schema, null) != null ? try(yamldecode(file("${get_terragrunt_dir()}/${collection.schema}")).ttl_field, null) : try(collection.ttl_field, null)
|
|
51
51
|
indexes = try(collection.schema, null) != null ? try(yamldecode(file("${get_terragrunt_dir()}/${collection.schema}")).indexes, []) : try(collection.indexes, [])
|
|
52
|
+
fields = try(collection.schema, null) != null ? try(yamldecode(file("${get_terragrunt_dir()}/${collection.schema}")).fields, []) : try(collection.fields, [])
|
|
52
53
|
}
|
|
53
54
|
)
|
|
54
55
|
}
|
|
55
56
|
}
|
|
56
57
|
|
|
57
|
-
# Build field configuration for each database (TTL
|
|
58
|
+
# Build field configuration for each database (TTL + explicit field exemptions)
|
|
58
59
|
databases_field_configuration = {
|
|
59
60
|
for db_name, schemas in local.collection_schemas : db_name => flatten([
|
|
60
61
|
for schema_name, schema in schemas :
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
62
|
+
flatten([
|
|
63
|
+
# TTL field: default to empty scopes (no automatic indexing), unless overridden in fields section
|
|
64
|
+
try(schema.ttl_field, null) != null ? [
|
|
65
|
+
{
|
|
66
|
+
collection = schema_name
|
|
67
|
+
field = schema.ttl_field
|
|
68
|
+
ttl_enabled = true
|
|
69
|
+
ascending_index_query_scope = try([for f in try(schema.fields, []) : f.ascending_index_query_scope if f.field == schema.ttl_field][0], [])
|
|
70
|
+
descending_index_query_scope = try([for f in try(schema.fields, []) : f.descending_index_query_scope if f.field == schema.ttl_field][0], [])
|
|
71
|
+
array_index_query_scope = try([for f in try(schema.fields, []) : f.array_index_query_scope if f.field == schema.ttl_field][0], [])
|
|
72
|
+
}
|
|
73
|
+
] : [],
|
|
74
|
+
# Non-TTL fields from fields section
|
|
75
|
+
[
|
|
76
|
+
for f in try(schema.fields, []) : {
|
|
77
|
+
collection = schema_name
|
|
78
|
+
field = f.field
|
|
79
|
+
ttl_enabled = false
|
|
80
|
+
ascending_index_query_scope = try(f.ascending_index_query_scope, ["COLLECTION"])
|
|
81
|
+
descending_index_query_scope = try(f.descending_index_query_scope, ["COLLECTION"])
|
|
82
|
+
array_index_query_scope = try(f.array_index_query_scope, ["COLLECTION"])
|
|
83
|
+
}
|
|
84
|
+
if f.field != try(schema.ttl_field, null)
|
|
85
|
+
]
|
|
86
|
+
])
|
|
68
87
|
])
|
|
69
88
|
}
|
|
70
89
|
|
|
@@ -11528,7 +11528,7 @@
|
|
|
11528
11528
|
},
|
|
11529
11529
|
"packages/generators": {
|
|
11530
11530
|
"name": "@hiiretail/gcp-infra-generators",
|
|
11531
|
-
"version": "1.
|
|
11531
|
+
"version": "1.15.0",
|
|
11532
11532
|
"license": "MIT",
|
|
11533
11533
|
"dependencies": {
|
|
11534
11534
|
"@google-cloud/storage": "^7.18.0",
|
package/dist/package.json
CHANGED