Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: schema name is optional for future snowflake_stage_grant #1466

Merged

Conversation

bennylu2
Copy link
Contributor

@bennylu2 bennylu2 commented Jan 10, 2023

Closes #1100
Closes #1477

make test
CGO_ENABLED=1 go test -race -coverprofile=coverage.txt -covermode=atomic  ./...
?       github.com/Snowflake-Labs/terraform-provider-snowflake  [no test files]
ok      github.com/Snowflake-Labs/terraform-provider-snowflake/pkg/datasources  2.843s  coverage: 3.6% of statements
?       github.com/Snowflake-Labs/terraform-provider-snowflake/pkg/db   [no test files]
?       github.com/Snowflake-Labs/terraform-provider-snowflake/pkg/helpers      [no test files]
ok      github.com/Snowflake-Labs/terraform-provider-snowflake/pkg/provider     4.256s  coverage: 25.5% of statements
ok      github.com/Snowflake-Labs/terraform-provider-snowflake/pkg/resources    13.904s coverage: 46.9% of statements
ok      github.com/Snowflake-Labs/terraform-provider-snowflake/pkg/snowflake    0.676s  coverage: 46.8% of statements
?       github.com/Snowflake-Labs/terraform-provider-snowflake/pkg/testhelpers  [no test files]
ok      github.com/Snowflake-Labs/terraform-provider-snowflake/pkg/validation   0.439s  coverage: 31.8% of statements
?       github.com/Snowflake-Labs/terraform-provider-snowflake/pkg/version      [no test files]

var builder snowflake.GrantBuilder
if futureStages {
if onFuture {
builder = snowflake.FutureStageGrant(dbName, schemaName)
} else {
builder = snowflake.StageGrant(dbName, schemaName, stageName)
Copy link
Contributor Author

@bennylu2 bennylu2 Jan 10, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

L132-137 when setting grant, should we be passing roles to generate a unique grant id? I think that would be a breaking change if we added tho

@bennylu2 bennylu2 changed the title Future snowflake stage grant 1100 fix: r/snowflake_stage_grant - schema_name is optional Jan 10, 2023
@bennylu2 bennylu2 changed the title fix: r/snowflake_stage_grant - schema_name is optional fix: schema name is optional for future snowflake_stage_grant Jan 21, 2023
@sfc-gh-swinkler sfc-gh-swinkler merged commit 0b4d814 into Snowflake-Labs:main Jan 26, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
2 participants