Skip to content

Commit a9e9cde

Browse files
SamPooleSamuZad
authored andcommitted
Add default_partition_expiration_ms
1 parent 49dbd7c commit a9e9cde

File tree

5 files changed

+27
-0
lines changed

5 files changed

+27
-0
lines changed

README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -191,6 +191,7 @@ This module provisions a dataset and a list of tables with associated JSON schem
191191
| dataset\_labels | Key value pairs in a map for dataset labels | `map(string)` | `{}` | no |
192192
| dataset\_name | Friendly name for the dataset being provisioned. | `string` | `null` | no |
193193
| default\_table\_expiration\_ms | TTL of tables using the dataset in MS | `number` | `null` | no |
194+
| default\_partition\_expiration\_ms | The default partition expiration for all partitioned tables in the dataset, in MS | `number` | `null` | no |
194195
| delete\_contents\_on\_destroy | (Optional) If set to true, delete all the tables in the dataset when destroying the resource; otherwise, destroying the resource will fail if tables are present. | `bool` | `null` | no |
195196
| deletion\_protection | Whether or not to allow deletion of tables and external tables defined by this module. Can be overriden by table-level deletion\_protection configuration. | `bool` | `false` | no |
196197
| description | Dataset description. | `string` | `null` | no |

main.tf

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,17 @@ resource "google_bigquery_dataset" "main" {
3939
project = var.project_id
4040
labels = var.dataset_labels
4141
resource_tags = var.resource_tags
42+
dataset_id = var.dataset_id
43+
friendly_name = var.dataset_name
44+
description = var.description
45+
location = var.location
46+
delete_contents_on_destroy = var.delete_contents_on_destroy
47+
default_table_expiration_ms = var.default_table_expiration_ms
48+
default_partition_expiration_ms = var.default_partition_expiration_ms
49+
max_time_travel_hours = var.max_time_travel_hours
50+
storage_billing_model = var.storage_billing_model
51+
project = var.project_id
52+
labels = var.dataset_labels
4253

4354
dynamic "default_encryption_configuration" {
4455
for_each = var.encryption_key == null ? [] : [var.encryption_key]

metadata.display.yaml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,9 @@ spec:
4242
default_table_expiration_ms:
4343
name: default_table_expiration_ms
4444
title: Default Table Expiration Ms
45+
default_partition_expiration_ms:
46+
name: default_partition_expiration_ms
47+
title: Default Partition Expiration Ms
4548
delete_contents_on_destroy:
4649
name: delete_contents_on_destroy
4750
title: Delete Contents On Destroy

metadata.yaml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -66,6 +66,12 @@ spec:
6666
description: The regional location for the dataset only US and EU are allowed in module
6767
varType: string
6868
defaultValue: US
69+
- name: default_table_expiration_ms
70+
description: TTL of tables using the dataset in MS
71+
varType: number
72+
- name: default_partition_expiration_ms
73+
description: The default partition expiration for all partitioned tables in the dataset, in MS
74+
varType: number
6975
- name: delete_contents_on_destroy
7076
description: (Optional) If set to true, delete all the tables in the dataset when destroying the resource; otherwise, destroying the resource will fail if tables are present.
7177
varType: bool

variables.tf

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -55,6 +55,12 @@ variable "default_table_expiration_ms" {
5555
default = null
5656
}
5757

58+
variable "default_partition_expiration_ms" {
59+
description = "The default partition expiration for all partitioned tables in the dataset, in MS"
60+
type = number
61+
default = null
62+
}
63+
5864
variable "max_time_travel_hours" {
5965
description = "Defines the time travel window in hours"
6066
type = number

0 commit comments

Comments
 (0)