Skip to content

Commit 06cc7e0

Browse files
authored
fix: Prevent forcing table recreation after dataset table list modification with enabled encryption (#121)
1 parent f56f444 commit 06cc7e0

File tree

1 file changed

+18
-0
lines changed

1 file changed

+18
-0
lines changed

main.tf

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -92,6 +92,12 @@ resource "google_bigquery_table" "main" {
9292
}
9393
}
9494
}
95+
96+
lifecycle {
97+
ignore_changes = [
98+
encryption_configuration # managed by google_bigquery_dataset.main.default_encryption_configuration
99+
]
100+
}
95101
}
96102

97103
resource "google_bigquery_table" "view" {
@@ -107,6 +113,12 @@ resource "google_bigquery_table" "view" {
107113
query = each.value["query"]
108114
use_legacy_sql = each.value["use_legacy_sql"]
109115
}
116+
117+
lifecycle {
118+
ignore_changes = [
119+
encryption_configuration # managed by google_bigquery_dataset.main.default_encryption_configuration
120+
]
121+
}
110122
}
111123

112124
resource "google_bigquery_table" "external_table" {
@@ -156,4 +168,10 @@ resource "google_bigquery_table" "external_table" {
156168
}
157169
}
158170
}
171+
172+
lifecycle {
173+
ignore_changes = [
174+
encryption_configuration # managed by google_bigquery_dataset.main.default_encryption_configuration
175+
]
176+
}
159177
}

0 commit comments

Comments
 (0)