Skip to content

Commit

Permalink
fix: Prevent forcing table recreation after dataset table list modifi…
Browse files Browse the repository at this point in the history
…cation with enabled encryption (#121)
  • Loading branch information
hayorov authored May 6, 2021
1 parent f56f444 commit 06cc7e0
Showing 1 changed file with 18 additions and 0 deletions.
18 changes: 18 additions & 0 deletions main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -92,6 +92,12 @@ resource "google_bigquery_table" "main" {
}
}
}

lifecycle {
ignore_changes = [
encryption_configuration # managed by google_bigquery_dataset.main.default_encryption_configuration
]
}
}

resource "google_bigquery_table" "view" {
Expand All @@ -107,6 +113,12 @@ resource "google_bigquery_table" "view" {
query = each.value["query"]
use_legacy_sql = each.value["use_legacy_sql"]
}

lifecycle {
ignore_changes = [
encryption_configuration # managed by google_bigquery_dataset.main.default_encryption_configuration
]
}
}

resource "google_bigquery_table" "external_table" {
Expand Down Expand Up @@ -156,4 +168,10 @@ resource "google_bigquery_table" "external_table" {
}
}
}

lifecycle {
ignore_changes = [
encryption_configuration # managed by google_bigquery_dataset.main.default_encryption_configuration
]
}
}

0 comments on commit 06cc7e0

Please sign in to comment.