Skip to content

Commit

Permalink
Merge branch 'dynamic-tables' of https://github.com/Snowflake-Labs/te…
Browse files Browse the repository at this point in the history
…rraform-provider-snowflake into dynamic-tables
  • Loading branch information
sfc-gh-swinkler committed Oct 2, 2023
2 parents d34c753 + f186f46 commit a0a1e7d
Show file tree
Hide file tree
Showing 85 changed files with 6,268 additions and 835 deletions.
19 changes: 19 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -101,3 +101,22 @@ clean-generator-poc:
rm -f ./pkg/sdk/poc/example/*_gen.go
rm -f ./pkg/sdk/poc/example/*_gen_test.go
.PHONY: run-generator-poc

# TODO Below run-generator-% script won't generate, because there's some complications with the syntax and order how it runs
#run-generator-%: ./pkg/sdk/%_def.go ## Run go generate on definition
# go generate ./pkg/sdk/$*_def.go && go generate ./pkg/sdk/$*_dto_gen.go
#
#clean-generator-%: ./pkg/sdk/%_*_gen.go ## Clean generated files for specified resource
# rm -f ./pkg/sdk/$*_*_gen.go

# TODO For now use those like this => make file=network_policies clean-generator run-generator
clean-generator: ## Remove generated files and tests for given ${file}
rm -f ./pkg/sdk/${file}*_gen.go
rm -f ./pkg/sdk/${file}*_gen_test.go
rm -f ./pkg/sdk/${file}*_gen_integration_test.go
.PHONY: clean-generator

run-generator: ## Generate files and tests for given ${file}
go generate ./pkg/sdk/${file}_def.go
go generate ./pkg/sdk/${file}_dto_gen.go
.PHONY: run-generator
8 changes: 4 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -67,15 +67,15 @@ Integration status - indicates if given resource / datasource is using new SDK.
| Managed Account || snowflake_managed_account | snowflake_managed_account ||
| User || snowflake_user | snowflake_user ||
| Database Role || snowflake_database_role | snowflake_database_role ||
| Role | 👨‍💻 | snowflake_role | snowflake_role | 👨‍💻 |
| Role | | snowflake_role | snowflake_role | 👨‍💻 |
| Grant Privilege to Application Role || snowflake_grant_privileges_to_application_role | snowflake_grants ||
| Grant Privilege to Database Role | 👨‍💻 | snowflake_grant_privileges_to_database_role | snowflake_grants | 👨‍💻 |
| Grant Privilege to Database Role | | snowflake_grant_privileges_to_database_role | snowflake_grants | 👨‍💻 |
| Grant Privilege to Role || snowflake_grant_privileges_to_role | snowflake_grants ||
| Grant Role || snowflake_grant_role | snowflake_grants ||
| Grant Database Role || snowflake_grant_database_role | snowflake_grants ||
| Grant Application Role || snowflake_grant_application_role | snowflake_grants ||
| Grant Privilege to Share || snowflake_grant_privileges_to_share | snowflake_grants ||
| Grant Ownership | | snowflake_grant_ownership | snowflake_grants ||
| Grant Ownership | | snowflake_grant_ownership | snowflake_grants ||
| API Integration || snowflake_api_integration | snowflake_integrations ||
| Notification Integration || snowflake_notification_integration | snowflake_integrations ||
| Security Integration || snowflake_security_integration | snowflake_integrations ||
Expand All @@ -96,7 +96,7 @@ Integration status - indicates if given resource / datasource is using new SDK.
| Share || snowflake_share | snowflake_share ||
| Table | 👨‍💻 | snowflake_table | snowflake_table ||
| Dynamic Table || snowflake_dynamic_table | snowflake_dynamic_table ||
| External Table | 👨‍💻 | snowflake_external_table | snowflake_external_table ||
| External Table | | snowflake_external_table | snowflake_external_table ||
| Event Table || snowflake_event_table | snowflake_event_table ||
| View || snowflake_view | snowflake_view ||
| Materialized View || snowflake_materialized_view | snowflake_materialized_view ||
Expand Down
2 changes: 2 additions & 0 deletions docs/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,8 @@ provider "snowflake" {
- `oauth_endpoint` (String, Sensitive) Required when `oauth_refresh_token` is used. Can be sourced from `SNOWFLAKE_OAUTH_ENDPOINT` environment variable.
- `oauth_redirect_url` (String, Sensitive) Required when `oauth_refresh_token` is used. Can be sourced from `SNOWFLAKE_OAUTH_REDIRECT_URL` environment variable.
- `oauth_refresh_token` (String, Sensitive) Token for use with OAuth. Setup and generation of the token is left to other tools. Should be used in conjunction with `oauth_client_id`, `oauth_client_secret`, `oauth_endpoint`, `oauth_redirect_url`. Cannot be used with `browser_auth`, `private_key_path`, `oauth_access_token` or `password`. Can be sourced from `SNOWFLAKE_OAUTH_REFRESH_TOKEN` environment variable.
- `passcode` (String) Specifies the passcode provided by Duo when using multi-factor authentication (MFA) for login.
- `passcode_in_password` (Boolean) False by default. Set to true if the MFA passcode is embedded in the login password. Appends the MFA passcode to the end of the password.
- `password` (String, Sensitive) Password for username+password auth. Cannot be used with `browser_auth` or `private_key_path`. Can be sourced from `SNOWFLAKE_PASSWORD` environment variable.
- `port` (Number) Support custom port values to snowflake go driver for use with privatelink. Can be sourced from `SNOWFLAKE_PORT` environment variable.
- `private_key` (String, Sensitive) Private Key for username+private-key auth. Cannot be used with `browser_auth` or `password`. Can be sourced from `SNOWFLAKE_PRIVATE_KEY` environment variable.
Expand Down
3 changes: 1 addition & 2 deletions go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ require (
github.com/youmark/pkcs8 v0.0.0-20201027041543-1326539a0a0a
golang.org/x/crypto v0.7.0
golang.org/x/exp v0.0.0-20230315142452-642cacee5cc0
golang.org/x/text v0.8.0
golang.org/x/tools v0.7.0
)

Expand All @@ -35,7 +36,6 @@ require (
github.com/Masterminds/sprig/v3 v3.2.3 // indirect
github.com/agext/levenshtein v1.2.3 // indirect
github.com/andybalholm/brotli v1.0.4 // indirect
github.com/apache/arrow/go/v10 v10.0.1 // indirect
github.com/apache/arrow/go/v12 v12.0.1 // indirect
github.com/apache/thrift v0.16.0 // indirect
github.com/apparentlymart/go-textseg/v13 v13.0.0 // indirect
Expand Down Expand Up @@ -121,7 +121,6 @@ require (
golang.org/x/sync v0.1.0 // indirect
golang.org/x/sys v0.6.0 // indirect
golang.org/x/term v0.6.0 // indirect
golang.org/x/text v0.8.0 // indirect
golang.org/x/xerrors v0.0.0-20220907171357-04be3eba64a2 // indirect
google.golang.org/appengine v1.6.7 // indirect
google.golang.org/genproto v0.0.0-20230306155012-7f2fa6fef1f4 // indirect
Expand Down
Loading

0 comments on commit a0a1e7d

Please sign in to comment.