-
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: grant privileges to share test terraform dependencies (#2473)
Had to add dependencies between share and database, because sometimes the tests are trying to drop the database before share, which is illegal 👮♂️
- Loading branch information
1 parent
a5f969c
commit ede8d95
Showing
16 changed files
with
102 additions
and
52 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
10 changes: 10 additions & 0 deletions
10
examples/resources/snowflake_grant_privileges_to_share/resource.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
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
11 changes: 6 additions & 5 deletions
11
pkg/resources/testdata/TestAcc_GrantPrivilegesToShare/OnAllTablesInSchema/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
10 changes: 6 additions & 4 deletions
10
pkg/resources/testdata/TestAcc_GrantPrivilegesToShare/OnAllTablesInSchema_NoGrant/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 |
---|---|---|
@@ -1,12 +1,14 @@ | ||
resource "snowflake_share" "test" { | ||
name = var.to_share | ||
} | ||
|
||
resource "snowflake_database" "test" { | ||
name = var.database | ||
depends_on = [snowflake_share.test] | ||
name = var.database | ||
} | ||
|
||
resource "snowflake_schema" "test" { | ||
name = var.schema | ||
database = snowflake_database.test.name | ||
} | ||
|
||
resource "snowflake_share" "test" { | ||
name = var.to_share | ||
} |
9 changes: 5 additions & 4 deletions
9
pkg/resources/testdata/TestAcc_GrantPrivilegesToShare/OnDatabase_NoGrant/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 |
---|---|---|
@@ -1,7 +1,8 @@ | ||
resource "snowflake_database" "test" { | ||
name = var.database | ||
} | ||
|
||
resource "snowflake_share" "test" { | ||
name = var.to_share | ||
} | ||
|
||
resource "snowflake_database" "test" { | ||
depends_on = [snowflake_share.test] | ||
name = var.database | ||
} |
9 changes: 5 additions & 4 deletions
9
pkg/resources/testdata/TestAcc_GrantPrivilegesToShare/OnDatabase_NoPrivileges/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
11 changes: 6 additions & 5 deletions
11
pkg/resources/testdata/TestAcc_GrantPrivilegesToShare/OnSchema/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
10 changes: 6 additions & 4 deletions
10
pkg/resources/testdata/TestAcc_GrantPrivilegesToShare/OnSchema_NoGrant/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 |
---|---|---|
@@ -1,12 +1,14 @@ | ||
resource "snowflake_share" "test" { | ||
name = var.to_share | ||
} | ||
|
||
resource "snowflake_database" "test" { | ||
name = var.database | ||
depends_on = [snowflake_share.test] | ||
name = var.database | ||
} | ||
|
||
resource "snowflake_schema" "test" { | ||
name = var.schema | ||
database = snowflake_database.test.name | ||
} | ||
|
||
resource "snowflake_share" "test" { | ||
name = var.to_share | ||
} |
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
7 changes: 6 additions & 1 deletion
7
pkg/resources/testdata/TestAcc_GrantPrivilegesToShare/OnView_NoGrant/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