-
Notifications
You must be signed in to change notification settings - Fork 52
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix bigquery table replace hitting "already exists" issue (#2498)
Bigquery materialized views on tables seem to be structural, so due to pulumi/pulumi#918 the normal pulumi replace of creating and then deleting does not work. This PR enables DeleteBeforeRelace by default for the resource, fixing the issue. fixes #2491
- Loading branch information
1 parent
9ec1b4c
commit 8a2ca11
Showing
3 changed files
with
79 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
53 changes: 53 additions & 0 deletions
53
provider/test-programs/bigquery-table-materialized-view/Pulumi.yaml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,53 @@ | ||
name: bigquery-table-materialized-view | ||
runtime: yaml | ||
resources: | ||
randomName: | ||
type: random:RandomString | ||
properties: | ||
length: 16 | ||
special: false | ||
upper: false | ||
number: false | ||
default: | ||
type: gcp:bigquery:Dataset | ||
properties: | ||
datasetId: ${randomName.id} | ||
friendlyName: test | ||
description: This is a test description | ||
location: EU | ||
defaultTableExpirationMs: 3.6e+06 | ||
labels: | ||
env: default | ||
defaultTable: | ||
type: gcp:bigquery:Table | ||
properties: | ||
deletionProtection: false | ||
datasetId: ${default.datasetId} | ||
tableId: bar | ||
timePartitioning: | ||
type: DAY | ||
labels: | ||
env: default | ||
schema: | | ||
[ | ||
{ | ||
"name": "permalink", | ||
"type": "STRING", | ||
"mode": "NULLABLE", | ||
"description": "The Permalink" | ||
}, | ||
{ | ||
"name": "state", | ||
"type": "STRING", | ||
"mode": "NULLABLE", | ||
"description": "State where the head office is located" | ||
} | ||
] | ||
sheet: | ||
type: gcp:bigquery:Table | ||
properties: | ||
deletionProtection: false | ||
datasetId: ${default.datasetId} | ||
tableId: sheet | ||
materializedView: | ||
query: <QUERY> |