Skip to content

Commit

Permalink
Remove session parameter
Browse files Browse the repository at this point in the history
  • Loading branch information
sfc-gh-jmichalak committed Nov 22, 2024
1 parent daa0a33 commit b62ff27
Show file tree
Hide file tree
Showing 11 changed files with 6 additions and 337 deletions.
1 change: 1 addition & 0 deletions MIGRATION_GUIDE.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ All of the deprecated objects are removed from v1 release. This includes:
- `snowflake_role`
- `snowflake_oauth_integration`
- `snowflake_saml_integration`
- `snowflake_session_parameter`
- `snowflake_stream`
- `snowflake_tag_masking_policy_association`
- Data sources
Expand Down
54 changes: 0 additions & 54 deletions docs/resources/session_parameter.md

This file was deleted.

1 change: 0 additions & 1 deletion examples/resources/snowflake_session_parameter/import.sh

This file was deleted.

11 changes: 0 additions & 11 deletions examples/resources/snowflake_session_parameter/resource.tf

This file was deleted.

34 changes: 0 additions & 34 deletions pkg/datasources/parameters_acceptance_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,6 @@ import (

acc "github.com/Snowflake-Labs/terraform-provider-snowflake/pkg/acceptance"

"github.com/Snowflake-Labs/terraform-provider-snowflake/pkg/acceptance/testenvs"
"github.com/Snowflake-Labs/terraform-provider-snowflake/pkg/sdk"
"github.com/hashicorp/terraform-plugin-testing/helper/resource"
"github.com/hashicorp/terraform-plugin-testing/tfversion"
)
Expand Down Expand Up @@ -99,38 +97,6 @@ func TestAcc_Parameters_TransactionAbortOnErrorCanBeSet(t *testing.T) {
})
}

// proves https://github.com/Snowflake-Labs/terraform-provider-snowflake/issues/2353 is fixed
// done on user, to not interfere with other parallel tests on the same account
func TestAcc_Parameters_QuotedIdentifiersIgnoreCaseCanBeSet(t *testing.T) {
_ = testenvs.GetOrSkipTest(t, testenvs.EnableAcceptance)

user, userCleanup := acc.TestClient().User.CreateUser(t)
t.Cleanup(userCleanup)

resource.Test(t, resource.TestCase{
ProtoV6ProviderFactories: acc.TestAccProtoV6ProviderFactories,
PreCheck: func() { acc.TestAccPreCheck(t) },
TerraformVersionChecks: []tfversion.TerraformVersionCheck{
tfversion.RequireAbove(tfversion.Version1_5_0),
},
Steps: []resource.TestStep{
{
Config: sessionParameterOnUser(user.ID()),
},
},
})
}

func sessionParameterOnUser(userId sdk.AccountObjectIdentifier) string {
return fmt.Sprintf(
`
resource "snowflake_session_parameter" "test" {
key = "QUOTED_IDENTIFIERS_IGNORE_CASE"
value = "true"
user = %[1]s
}`, userId.FullyQualifiedName())
}

func parametersConfigOnAccount() string {
return `data "snowflake_parameters" "p" {
parameter_type = "ACCOUNT"
Expand Down
1 change: 0 additions & 1 deletion pkg/provider/provider.go
Original file line number Diff line number Diff line change
Expand Up @@ -424,7 +424,6 @@ func getResources() map[string]*schema.Resource {
"snowflake_secret_with_generic_string": resources.SecretWithGenericString(),
"snowflake_sequence": resources.Sequence(),
"snowflake_service_user": resources.ServiceUser(),
"snowflake_session_parameter": resources.SessionParameter(),
"snowflake_share": resources.Share(),
"snowflake_shared_database": resources.SharedDatabase(),
"snowflake_stage": resources.Stage(),
Expand Down
153 changes: 0 additions & 153 deletions pkg/resources/session_parameter.go

This file was deleted.

82 changes: 0 additions & 82 deletions pkg/resources/session_parameter_acceptance_test.go

This file was deleted.

2 changes: 2 additions & 0 deletions pkg/resources/user_acceptance_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -284,6 +284,8 @@ func TestAcc_User_BasicFlows(t *testing.T) {
}

// proves https://github.com/Snowflake-Labs/terraform-provider-snowflake/issues/2481 has been fixed
// proves https://github.com/Snowflake-Labs/terraform-provider-snowflake/issues/2353 has been fixed
// done on user, to not interfere with other parallel tests on the same account
func TestAcc_User_RemovedOutsideOfTerraform(t *testing.T) {
userId := acc.TestClient().Ids.RandomAccountObjectIdentifier()

Expand Down
1 change: 1 addition & 0 deletions v1-preparations/LIST_OF_REMOVED_RESOURCES_FOR_V1.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,3 +7,4 @@ Deprecated resources that are removed with the V1:
* [snowflake_saml_integration](https://registry.terraform.io/providers/Snowflake-Labs/snowflake/0.98.0/docs/resources/saml_integration)
* [snowflake_stream](https://registry.terraform.io/providers/Snowflake-Labs/snowflake/0.98.0/docs/resources/stream)
* [snowflake_tag_masking_policy_association](https://registry.terraform.io/providers/Snowflake-Labs/snowflake/0.98.0/docs/resources/tag_masking_policy_association)
* [snowflake_session_parameter](https://registry.terraform.io/providers/Snowflake-Labs/snowflake/0.98.0/docs/resources/session_parameter)
3 changes: 2 additions & 1 deletion v1-preparations/REMAINING_GA_OBJECTS.MD
Original file line number Diff line number Diff line change
Expand Up @@ -6,13 +6,14 @@ Status is one of:
- ✅ - done<br>
- ❌ - not started<br>
- 👨‍💻 - in progress<br>
- 🗑 - removed<br>

Known issues lists open issues touching the given object. Note that some of these issues may be already fixed in the newer provider versions. We will address these while working on the given object.

| Object Type | Status | Known issues |
|-----------------------------|:------:|---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| snowflake_object_parameter | 👨‍💻 | [#2446](https://github.com/Snowflake-Labs/terraform-provider-snowflake/issues/2446), [#1848](https://github.com/Snowflake-Labs/terraform-provider-snowflake/issues/1848), [#1561](https://github.com/Snowflake-Labs/terraform-provider-snowflake/issues/1561), [#1457](https://github.com/Snowflake-Labs/terraform-provider-snowflake/issues/1457) |
| snowflake_session_parameter | 👨‍💻 | [#1814](https://github.com/Snowflake-Labs/terraform-provider-snowflake/issues/1814), [#1783](https://github.com/Snowflake-Labs/terraform-provider-snowflake/issues/1783), [#1036](https://github.com/Snowflake-Labs/terraform-provider-snowflake/issues/1036) |
| snowflake_session_parameter | 🗑‍ | [#1814](https://github.com/Snowflake-Labs/terraform-provider-snowflake/issues/1814), [#1783](https://github.com/Snowflake-Labs/terraform-provider-snowflake/issues/1783), [#1036](https://github.com/Snowflake-Labs/terraform-provider-snowflake/issues/1036) |
| snowflake_account_parameter | 👨‍💻 | [#1679](https://github.com/Snowflake-Labs/terraform-provider-snowflake/issues/1679) |
| API INTEGRATION || [#2772](https://github.com/Snowflake-Labs/terraform-provider-snowflake/issues/2772), [#1445](https://github.com/Snowflake-Labs/terraform-provider-snowflake/issues/1445) |
| APPLICATION || - |
Expand Down

0 comments on commit b62ff27

Please sign in to comment.