Skip to content

Commit

Permalink
chore: Adjust before 0.92.0 (#2857)
Browse files Browse the repository at this point in the history
Changes:
- Remove the re-create plan reported in
#2851
for notification integration
- Remove secondary and shared databases from release as they're not
ready yet
  • Loading branch information
sfc-gh-jcieslak authored Jun 6, 2024
1 parent 149e55e commit 0598656
Show file tree
Hide file tree
Showing 8 changed files with 13 additions and 194 deletions.
11 changes: 0 additions & 11 deletions MIGRATION_GUIDE.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,17 +4,6 @@ This document is meant to help you migrate your Terraform config to the new newe
describe deprecations or breaking changes and help you to change your configuration to keep the same (or similar) behavior
across different versions.

## v0.91.0 ➞ v0.92.0
### snowflake_database new alternatives
As part of the [preparation for v1](https://github.com/Snowflake-Labs/terraform-provider-snowflake/blob/main/ROADMAP.md#preparing-essential-ga-objects-for-the-provider-v1), we split up the database resource into multiple ones:
- Standard database (in progress)
- Shared database - can be used as `snowflake_shared_database` (used to create databases from externally defined shares)
- Secondary database - can be used as `snowflake_secondary_database` (used to create replicas of databases from external sources)
From now on, please migrate and use the new database resources for their unique use cases. For more information, see the documentation for those resources on the [Terraform Registry](https://registry.terraform.io/providers/Snowflake-Labs/snowflake/latest/docs).

The split was done (and will be done for several objects during the refactor) to simplify the resource on maintainability and usage level.
Its purpose was also to divide the resources by their specific purpose rather than cramping every use case of an object into one resource.

## v0.89.0 ➞ v0.90.0
### snowflake_table resource changes
#### *(behavior change)* Validation to column type added
Expand Down
98 changes: 0 additions & 98 deletions docs/resources/secondary_database.md

This file was deleted.

81 changes: 0 additions & 81 deletions docs/resources/shared_database.md

This file was deleted.

2 changes: 0 additions & 2 deletions pkg/provider/provider.go
Original file line number Diff line number Diff line change
Expand Up @@ -494,11 +494,9 @@ func getResources() map[string]*schema.Resource {
"snowflake_saml_integration": resources.SAMLIntegration(),
"snowflake_schema": resources.Schema(),
"snowflake_scim_integration": resources.SCIMIntegration(),
"snowflake_secondary_database": resources.SecondaryDatabase(),
"snowflake_sequence": resources.Sequence(),
"snowflake_session_parameter": resources.SessionParameter(),
"snowflake_share": resources.Share(),
"snowflake_shared_database": resources.SharedDatabase(),
"snowflake_stage": resources.Stage(),
"snowflake_storage_integration": resources.StorageIntegration(),
"snowflake_stream": resources.Stream(),
Expand Down
1 change: 0 additions & 1 deletion pkg/resources/notification_integration.go
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,6 @@ var notificationIntegrationSchema = map[string]*schema.Schema{
Default: "QUEUE",
ValidateFunc: validation.StringInSlice([]string{"QUEUE"}, true),
Description: "A type of integration",
ForceNew: true,
Deprecated: "Will be removed - it is added automatically on the SDK level.",
},
"direction": {
Expand Down
6 changes: 6 additions & 0 deletions pkg/resources/secondary_database_acceptance_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,8 @@ import (
)

func TestAcc_CreateSecondaryDatabase_minimal(t *testing.T) {
t.Skip("To be unskipped in the next database pr")

id := acc.TestClient().Ids.RandomAccountObjectIdentifier()
comment := random.Comment()

Expand Down Expand Up @@ -98,6 +100,8 @@ func TestAcc_CreateSecondaryDatabase_minimal(t *testing.T) {
}

func TestAcc_CreateSecondaryDatabase_complete(t *testing.T) {
t.Skip("To be unskipped in the next database pr")

id := acc.TestClient().Ids.RandomAccountObjectIdentifier()
comment := random.Comment()

Expand Down Expand Up @@ -298,6 +302,8 @@ func TestAcc_CreateSecondaryDatabase_complete(t *testing.T) {
}

func TestAcc_CreateSecondaryDatabase_DataRetentionTimeInDays(t *testing.T) {
t.Skip("To be unskipped in the next database pr")

id := acc.TestClient().Ids.RandomAccountObjectIdentifier()

_, externalPrimaryId, primaryDatabaseCleanup := acc.SecondaryTestClient().Database.CreatePrimaryDatabase(t, []sdk.AccountIdentifier{
Expand Down
6 changes: 6 additions & 0 deletions pkg/resources/shared_database_acceptance_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,8 @@ import (
)

func TestAcc_CreateSharedDatabase_minimal(t *testing.T) {
t.Skip("To be unskipped in the next database pr")

id := acc.TestClient().Ids.RandomAccountObjectIdentifier()
comment := random.Comment()

Expand Down Expand Up @@ -85,6 +87,8 @@ func TestAcc_CreateSharedDatabase_minimal(t *testing.T) {
}

func TestAcc_CreateSharedDatabase_complete(t *testing.T) {
t.Skip("To be unskipped in the next database pr")

id := acc.TestClient().Ids.RandomAccountObjectIdentifier()
comment := random.Comment()
externalShareId := createShareableDatabase(t)
Expand Down Expand Up @@ -179,6 +183,8 @@ func TestAcc_CreateSharedDatabase_complete(t *testing.T) {
}

func TestAcc_CreateSharedDatabase_InvalidValues(t *testing.T) {
t.Skip("To be unskipped in the next database pr")

comment := random.Comment()

configVariables := func(
Expand Down
2 changes: 1 addition & 1 deletion pkg/sdk/identifier_helpers.go
Original file line number Diff line number Diff line change
Expand Up @@ -123,7 +123,7 @@ func NewAccountIdentifier(organizationName, accountName string) AccountIdentifie

func NewAccountIdentifierFromAccountLocator(accountLocator string) AccountIdentifier {
return AccountIdentifier{
accountLocator: strings.Trim(accountLocator, `"`),
accountLocator: accountLocator,
}
}

Expand Down

0 comments on commit 0598656

Please sign in to comment.