-
Notifications
You must be signed in to change notification settings - Fork 427
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix a few small bugs All of them have appropriate tests showing the error before and correct behavior after. #### Fix blocked roles issue in oauth integration (#2358) `BLOCKED_ROLES_LIST ` was cast to wrong type which caused panic (https://github.com/Snowflake-Labs/terraform-provider-snowflake/blob/main/pkg/resources/oauth_integration.go#L313). #### Fix database replication setup in resource (#2369) No old config for blocked roles was causing empty list access (https://github.com/Snowflake-Labs/terraform-provider-snowflake/blob/e3d086eddc05e0d4963234f82e09e174a018bb08/pkg/resources/database.go#L271). Some other errors were discovered, so implementation was slightly improved. #### Do not read query for dynamic table (#2329) Cutting query from returned DDL was too greedy (https://github.com/Snowflake-Labs/terraform-provider-snowflake/blob/e3d086eddc05e0d4963234f82e09e174a018bb08/pkg/resources/dynamic_table.go#L204). It is not that simple to read the right part. We may skip reading it, though, but it will make the import not fully functional. At the end, the matching was improved to handle more cases and appropriate test cases were added. The full explanation in https://github.com/Snowflake-Labs/terraform-provider-snowflake/pull/2421/files#diff-33718834696cbceb48b07f4a6aa4f739d1aa9052e190996a309f650c2e5a9edcR258. #### Fix incorrectly merged streamlits Formatting and `createStage` usage. Fix #2358 Fix #2369 Fix #2329
- Loading branch information
1 parent
129d24c
commit dec7cd9
Showing
11 changed files
with
267 additions
and
32 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
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
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
27 changes: 27 additions & 0 deletions
27
pkg/resources/testdata/TestAcc_DynamicTable_issue2329/1/test.tf
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,27 @@ | ||
resource "snowflake_table" "t" { | ||
database = var.database | ||
schema = var.schema | ||
name = var.table_name | ||
change_tracking = true | ||
column { | ||
name = "id" | ||
type = "NUMBER(38,0)" | ||
} | ||
column { | ||
name = "data" | ||
type = "VARCHAR(16)" | ||
} | ||
} | ||
|
||
resource "snowflake_dynamic_table" "dt" { | ||
depends_on = [snowflake_table.t] | ||
name = var.name | ||
database = var.database | ||
schema = var.schema | ||
target_lag { | ||
maximum_duration = "2 minutes" | ||
} | ||
warehouse = var.warehouse | ||
query = var.query | ||
comment = var.comment | ||
} |
Oops, something went wrong.