Skip to content

Commit

Permalink
Merge branch 'main' into feature/2162/user-attach-password-policy
Browse files Browse the repository at this point in the history
  • Loading branch information
sfc-gh-asawicki authored Feb 8, 2024
2 parents 9715d2a + 018bb74 commit 25e6a2c
Show file tree
Hide file tree
Showing 414 changed files with 26,366 additions and 8,595 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -61,10 +61,10 @@ jobs:
if: ${{ steps.release.outputs.release_created }}

- name: Run GoReleaser
uses: goreleaser/goreleaser-action@v4
uses: goreleaser/goreleaser-action@v5
with:
version: latest
args: release --rm-dist
args: release --rm-dist --verbose
env:
GITHUB_TOKEN: ${{ steps.generate_token.outputs.token }}
GPG_FINGERPRINT: ${{ steps.import_gpg.outputs.fingerprint }}
Expand Down
3 changes: 2 additions & 1 deletion .github/workflows/team-jira-issues.yml
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,8 @@ jobs:
"labels": ["${{ secrets.JIRA_LABEL }}"],
"customfield_11401": {"id": "${{ secrets.JIRA_AREA }}"},
"customfield_10008": "${{ secrets.JIRA_EPIC }}",
"assignee": {"id": "${{ secrets.JIRA_ASSIGNEE }}"}
"assignee": {"id": "${{ secrets.JIRA_ASSIGNEE }}"},
"reporter": {"id": "${{ secrets.JIRA_ASSIGNEE }}"}
}
}
}'
7 changes: 1 addition & 6 deletions .goreleaser.yml
Original file line number Diff line number Diff line change
@@ -1,11 +1,6 @@
builds:
- env:
- >-
{{- if or (eq .Os "darwin") (eq .Os "windows") }}
CGO_ENABLED=1
{{- else }}
CGO_ENABLED=0
{{- end }}
- CGO_ENABLED=0
goos:
- windows
- linux
Expand Down
474 changes: 474 additions & 0 deletions CHANGELOG.md

Large diffs are not rendered by default.

44 changes: 42 additions & 2 deletions MIGRATION_GUIDE.md
Original file line number Diff line number Diff line change
@@ -1,9 +1,49 @@
# Migration guide

This document is meant to help you migrate your Terraform config to new newest version. In migration guides we will only
describe deprecations or breaking changes and help you to change your configuration to keep the same (or similar) behaviour
This document is meant to help you migrate your Terraform config to the new newest version. In migration guides, we will only
describe deprecations or breaking changes and help you to change your configuration to keep the same (or similar) behavior
across different versions.

## v0.85.0 ➞ v0.86.0
### snowflake_table_constraint resource changes

#### *(behavior change)* NOT NULL removed from possible types
The `type` of the constraint was limited back to `UNIQUE`, `PRIMARY KEY`, and `FOREIGN KEY`.
The reason for that is, that syntax for Out-of-Line constraint ([docs](https://docs.snowflake.com/en/sql-reference/sql/create-table-constraint#out-of-line-unique-primary-foreign-key)) does not contain `NOT NULL`.
It is noted as a behavior change but in some way it is not; with the previous implementation it did not work at all with `type` set to `NOT NULL` because the generated statement was not a valid Snowflake statement.

We will consider adding `NOT NULL` back because it can be set by `ALTER COLUMN columnX SET NOT NULL`, but first we want to revisit the whole resource design.

## vX.XX.X -> v0.85.0

### Migration from old (grant) resources to new ones

In recent changes, we introduced a new grant resources to replace the old ones.
To aid with the migration, we wrote a guide to show one of the possible ways to migrate deprecated resources to their new counter-parts.
As the guide is more general and applies to every version (and provider), we moved it [here](./docs/technical-documentation/resource_migration.md).

## v0.84.0 ➞ v0.85.0

### snowflake_notification_integration resource changes
#### *(behavior change)* notification_provider
`notification_provider` becomes required and has three possible values `AZURE_STORAGE_QUEUE`, `AWS_SNS`, and `GCP_PUBSUB`.
It is still possible to set it to `AWS_SQS` but because there is no underlying SQL, so it will result in an error.
Attributes `aws_sqs_arn` and `aws_sqs_role_arn` will be ignored.
Computed attributes `aws_sqs_external_id` and `aws_sqs_iam_user_arn` won't be updated.

#### *(behavior change)* force new for multiple attributes
Force new was added for the following attributes (because no usable SQL alter statements for them):
- `azure_storage_queue_primary_uri`
- `azure_tenant_id`
- `gcp_pubsub_subscription_name`
- `gcp_pubsub_topic_name`

#### *(deprecation)* direction
`direction` parameter is deprecated because it is added automatically on the SDK level.

#### *(deprecation)* type
`type` parameter is deprecated because it is added automatically on the SDK level (and basically it's always `QUEUE`).

## v0.73.0 ➞ v0.74.0
### Provider configuration changes

Expand Down
5 changes: 3 additions & 2 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ export SKIP_NOTIFICATION_INTEGRATION_TESTS=true
export SKIP_SAML_INTEGRATION_TESTS=true
export SKIP_STREAM_TEST=true
export SKIP_MANAGED_ACCOUNT_INT_TEST=true
export SKIP_MANAGED_ACCOUNT_TEST=true
export BASE_BINARY_NAME=terraform-provider-snowflake
export TERRAFORM_PLUGINS_DIR=$(HOME)/.terraform.d/plugins
export TERRAFORM_PLUGIN_LOCAL_INSTALL=$(TERRAFORM_PLUGINS_DIR)/$(BASE_BINARY_NAME)
Expand Down Expand Up @@ -66,10 +67,10 @@ test: test-client ## run unit and integration tests
go test -v -cover -timeout=30m ./...

test-acceptance: ## run acceptance tests
TF_ACC=1 go test -run "^TestAcc_" -v -cover -timeout=30m ./...
TF_ACC=1 go test -run "^TestAcc_" -v -cover -timeout=45m ./...

test-integration: ## run SDK integration tests
go test -run "^TestInt_" -v -cover -timeout=20m ./...
go test -run "^TestInt_" -v -cover -timeout=30m ./...

test-architecture: ## check architecture constraints between packages
go test ./pkg/architests/... -v
Expand Down
8 changes: 4 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
# Snowflake Terraform Provider

> ⚠️ **Please note**: If you believe you have found a security issue, _please responsibly disclose_ by contacting us at [team-cloud-foundation-tools-dl@snowflake.com](mailto:team-cloud-foundation-tools-dl@snowflake.com).
> ⚠️ **Please note**: If you believe you have found a security issue, _please responsibly disclose_ by contacting us at [triage-terraformprovider-dl@snowflake.com](mailto:triage-terraformprovider-dl@snowflake.com).
> ⚠️ **Disclaimer**: the project is still in the 0.x.x version, which means it’s still in the experimental phase (check [Go module versioning](https://go.dev/doc/modules/version-numbers#v0-number) for more details). It can be used in production but makes no stability or backward compatibility guarantees. We do not provide backward bug fixes and, therefore, always suggest using the newest version. We are providing only limited support for the provider; priorities will be assigned on a case-by-case basis.
>
> Our main current goals are stabilization, addressing existing issues, and providing the missing features (prioritizing the GA features; supporting PrPr and PuPr features are not high priorities now).
>
> Our main current goals are stabilization, addressing existing issues, and providing the missing features (prioritizing the GA features; supporting PrPr and PuPr features are not high priorities now).
>
> With all that in mind, we aim to reach V1 with a stable, reliable, and functional provider. V1 will be free of all the above limitations.
Expand Down Expand Up @@ -107,7 +107,7 @@ Migration status - indicates if given resource / datasource is using new SDK.
| External Table || snowflake_external_table | snowflake_external_table ||
| View || snowflake_view | snowflake_view ||
| Materialized View | 👨‍💻 | snowflake_materialized_view | snowflake_materialized_view ||
| Sequence | 👨‍💻 | snowflake_sequence | snowflake_sequence | |
| Sequence | | snowflake_sequence | snowflake_sequence | |
| Function || snowflake_function | snowflake_function ||
| External Function || snowflake_external_function | snowflake_external_function ||
| Stored Procedure || snowflake_procedure | snowflake_procedure ||
Expand Down
2 changes: 1 addition & 1 deletion docs/data-sources/row_access_policies.md
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ data "snowflake_row_access_policies" "current" {
### Required

- `database` (String) The database from which to return the schemas from.
- `schema` (String) The schema from which to return the row access policyfrom.
- `schema` (String) The schema from which to return the row access policy from.

### Read-Only

Expand Down
Loading

0 comments on commit 25e6a2c

Please sign in to comment.