forked from Snowflake-Labs/terraform-provider-snowflake
-
Notifications
You must be signed in to change notification settings - Fork 1
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
Pull Latest #4
Merged
Merged
Pull Latest #4
Conversation
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
Snowflake doesn't like the sql string returned by terraform because when it contains quotes. It escapes the quotes by default. This PR removes `\` and unescapes the sql.
<!-- Feel free to delete comments as you fill this in --> Adds OAuth access token support as requested [in this ticket](#37). Note this does not add logic around renewing the access token. If the access token is not valid, the user is presented with the Snowflake error. We at Flexport have a potential use case where we would like to generate short-lived OAuth tokens and distribute to an application or user for a brief period of time. <!-- summary of changes --> ## Test Plan <!-- detail ways in which this PR has been tested or needs to be tested --> * [x] Manual acceptance test: Generated valid oauth access token from Snowflake account with the correct roles, and verified that the roles are correct * [x] Manual acceptance test: Verified that when an empty access token is used, Snowflake reports "missing password" * [x] Unit test: DSN unit test corresponding to tests above ## References <!-- issues documentation links, etc --> * [Snowflake OAuth Flow for Custom Clients](https://docs.snowflake.com/en/user-guide/oauth-custom.html#configure-snowflake-oauth-for-custom-clients)
Refactor to make it easier to have consistent test results when testing our DSN generation. Previously the approach we were using would implicitly read environment variables, which means that if you had any relevant ones set (like `SNOWFLAKE_USER`) the test code would use that. ## Test Plan <!-- detail ways in which this PR has been tested or needs to be tested --> * [x] acceptance tests ## References *
Publish this provider to the terraform registry. In terraform 0.13 third party providers can be published to the terraform registry. This PR implements the necessary pieces, including signing all releases. ## Test Plan * [x] pushed 0.13.0+b2a3596 to the registry at https://registry.terraform.io/providers/chanzuckerberg/snowflake/latest?pollNotifications=true ## References * https://docs.google.com/document/d/1J4p5KFH129wZbSF0XUioDbHSB7uZA-l2o1psLa-3YS4/edit
Fix download.sh by specifying .zip and fixing the path to the checksums file. This broke with our changes to support releasing to the registry and this should fix #215. ## Test Plan * [x] acceptance tests * [x] reproduce the problem with: `curl https://raw.githubusercontent.com/chanzuckerberg/terraform-provider-snowflake/master/download.sh | bash -s -- -d -b $HOME/.terraform.d/plugins v0.13.2 ` and test the fix with `curl https://raw.githubusercontent.com/chanzuckerberg/terraform-provider-snowflake/ryanking/update_download.sh/download.sh | bash -s -- -d -b $HOME/.terraform.d/plugins v0.13.2` ## References * Fixes #215
The h1 renders with a line under it, so we get to horizontal lines in a row.
Update to latest version of go-misc and make use of the refactored version code, which fixes the version syntax for prerelease versions. ## Test Plan * [x] acceptance tests ## References * chanzuckerberg/go-misc#74 * https://semver.org/#spec-item-9
Move docs to a spot where the Terraform registry can pick them up. Once we do another release, the docs should show up [here](https://registry.terraform.io/providers/chanzuckerberg/snowflake/latest). We won't be able to test this completely until a release is done. Docs for the docs - https://www.terraform.io/docs/registry/providers/docs.html. ## Test Plan * [ ] CI ## References * https://www.terraform.io/docs/registry/providers/docs.html
The new go language server really likes to complain about these. ## Test Plan * [x] acceptance tests ## References * microsoft/vscode#97406
Updated the snowflake website
Snowflake appears to have changed something which is now causing this test to fail. Skipping it for now while I find someone who can address the problem. cc @henriblancke and @chriskuchin who worked on this originally. Any chance one of you could look at this? ## Test Plan * [ ] acceptance tests ## References * #196
Escape comments and other string fields that are not currently escaped in our query builders. ## Test Plan <!-- detail ways in which this PR has been tested or needs to be tested --> * [ ] acceptance tests ## References * Fixes #127
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Test Plan
References