Skip to content

Commit a009b16

Browse files
chore: Handle BCR 2025-06 (#4036)
- Update the BCR Migration guide with an 2025_06 entry. - Add notes about missing features in resource documentation. - Fix pre-push. - Adjust service test assertions. ## TODO - Adjust the authentication policy resource to this BCR (SNOW-2332934) ## References SNOW-2301041
1 parent f8416ee commit a009b16

File tree

8 files changed

+63
-21
lines changed

8 files changed

+63
-21
lines changed

SNOWFLAKE_BCR_MIGRATION_GUIDE.md

Lines changed: 33 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -32,19 +32,48 @@ To use the provider with the bundles containing this change:
3232

3333
Reference: [BCR-1944](https://docs.snowflake.com/release-notes/bcr-bundles/un-bundled/bcr-1944)
3434

35-
### `MFA_AUTHENTICATION_METHODS` property in authentication policies is now deprecated
35+
## [Bundle 2025_06](https://docs.snowflake.com/en/release-notes/bcr-bundles/2025_06_bundle)
36+
37+
### Changes in authentication policies
3638
<!-- TODO(SNOW-2187814): Update this entry. -->
3739

3840
> [!IMPORTANT]
39-
> This change has been rolled back from the BCR 2025_04.
41+
> The [BCR-2086](https://docs.snowflake.com/en/release-notes/bcr-bundles/2025_06/bcr-2086) change has been rolled back from the BCR 2025_04 and was moved to 2025_06.
4042
4143
> [!IMPORTANT]
42-
> This change has not been addressed in the provider yet. This will be addressed in the next versions of the provider.
44+
> These change has not been addressed in the provider yet. They will be addressed in the next versions of the provider.
45+
> As a workaround, please use the [execute](https://registry.terraform.io/providers/snowflakedb/snowflake/latest/docs/resources/execute) resource.
4346
4447
The `MFA_AUTHENTICATION_METHODS` property is deprecated. Setting the `MFA_AUTHENTICATION_METHODS` property returns an error. If you use the [authentication_policy](https://registry.terraform.io/providers/snowflakedb/snowflake/latest/docs/resources/authentication_policy) resource with `mfa_authentication_methods` field
4548
and have this bundle enabled, the provider will return an error.
49+
The new way of handling authentication methods is `ENFORCE_MFA_ON_EXTERNAL_AUTHENTICATION` which will be handled in this resource in the next versions.
4650

47-
Reference: [BCR-1971](https://docs.snowflake.com/en/release-notes/bcr-bundles/2025_04/bcr-1971)
51+
Additionally, the allowed values for `MFA_ENROLLMENT` are changed: `OPTIONAL` is removed and `REQUIRED_PASSWORD_ONLY` and `REQUIRED_SNOWFLAKE_UI_PASSWORD_ONLY` are added.
52+
53+
54+
Reference: [BCR-2086](https://docs.snowflake.com/en/release-notes/bcr-bundles/2025_06/bcr-2086), [BCR-2097](https://docs.snowflake.com/en/release-notes/bcr-bundles/2025_06/bcr-2097)
55+
56+
### Snowflake OAuth authentication: Change in the network policy used for a request from client to Snowflake
57+
58+
This change modifies the behavior of authentication with active network policies. Please verify that your network policy configuration allows connection by the provider after activating this change.
59+
60+
Additionally, this change adds the possibility to assign network policies to External Oauth integrations.
61+
62+
Setting the `network_policy` field in `external_oauth_integration` resource is not yet supported in the provider, and it will be handled in the future. As a workaround, please use the [execute](https://registry.terraform.io/providers/snowflakedb/snowflake/latest/docs/resources/execute) resource.
63+
64+
Reference: [BCR-2094](https://docs.snowflake.com/en/release-notes/bcr-bundles/2025_06/bcr-2094)
65+
66+
### Snowpark Container Services job service: Retention-time increase
67+
68+
In the provider, the job_service resource forces setting the `ASYNC` option.
69+
70+
Before the change, Snowflake automatically deletes the job service 7 days after completion.
71+
72+
After the change, Snowflake retains job services for 14 days after completion.
73+
74+
In most cases, this change in Snowflake should have no effect on the provider. Optionally, you can manually drop the completed jobs.
75+
76+
Reference: [BCR-2093](https://docs.snowflake.com/en/release-notes/bcr-bundles/2025_06/bcr-2093)
4877

4978
## [Bundle 2025_05](https://docs.snowflake.com/en/release-notes/bcr-bundles/2025_05_bundle)
5079

docs/resources/authentication_policy.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,8 @@ description: |-
99

1010
!> **Note** According to Snowflake [docs](https://docs.snowflake.com/en/sql-reference/sql/drop-authentication-policy#usage-notes), an authentication policy cannot be dropped successfully if it is currently assigned to another object. Currently, the provider does not unassign such objects automatically. Before dropping the resource, first unassign the policy from the relevant objects. See [guide](../guides/unassigning_policies) for more details.
1111

12+
-> **Note** This resource is not yet adjusted to the changes in BCR 2025_06 (see our [BCR Migration Guide](https://github.com/snowflakedb/terraform-provider-snowflake/blob/main/SNOWFLAKE_BCR_MIGRATION_GUIDE.md#bundle-2025_06)). As a workaround, please use the [execute](https://registry.terraform.io/providers/snowflakedb/snowflake/latest/docs/resources/execute) resource.
13+
1214
# snowflake_authentication_policy (Resource)
1315

1416
Resource used to manage authentication policy objects. For more information, check [authentication policy documentation](https://docs.snowflake.com/en/sql-reference/sql/create-authentication-policy).

docs/resources/external_oauth_integration.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,10 @@ description: |-
77

88
!> **Note** The provider does not detect external changes on security integration type. In this case, remove the integration of wrong type manually with `terraform destroy` and recreate the resource. It will be addressed in the future.
99

10+
<!-- TODO(SNOW-1844996): Remove this note.-->
11+
-> **Note** Field `NETWORK_POLICY` added in BCR 2025_06 (read our [BCR Migration Guide](https://github.com/snowflakedb/terraform-provider-snowflake/blob/main/SNOWFLAKE_BCR_MIGRATION_GUIDE.md#bundle-2025_06)) is currently missing. It will be added in the future.
12+
As a workaround, please use the [execute](https://registry.terraform.io/providers/snowflakedb/snowflake/latest/docs/resources/execute) resource.
13+
1014
# snowflake_external_oauth_integration (Resource)
1115

1216
Resource used to manage external oauth security integration objects. For more information, check [security integrations documentation](https://docs.snowflake.com/en/sql-reference/sql/create-security-integration-oauth-external).

pkg/acceptance/bettertestspoc/assert/objectassert/semantic_view_describe_snowflake_ext.go

Lines changed: 12 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,7 @@ func SemanticViewDetails(t *testing.T, id sdk.SchemaObjectIdentifier) *SemanticV
2222
return &SemanticViewDetailsAssert{
2323
assert.NewSnowflakeObjectAssertWithTestClientObjectProvider(sdk.ObjectTypeSemanticView, id, func(testClient *helpers.TestClient) assert.ObjectProvider[SemanticViewDetailsCollection, sdk.SchemaObjectIdentifier] {
2424
return func(t *testing.T, id sdk.SchemaObjectIdentifier) (*SemanticViewDetailsCollection, error) {
25+
t.Helper()
2526
details, err := testClient.SemanticView.Describe(t, id)
2627
if err != nil {
2728
return nil, err
@@ -61,20 +62,20 @@ func (s *SemanticViewDetailsAssert) ContainsDetail(expected sdk.SemanticViewDeta
6162
}
6263

6364
func NewSemanticViewDetails(
64-
ObjectKind string,
65-
ObjectName string,
66-
ParentEntity *string,
67-
Property string,
68-
PropertyValue string,
65+
objectKind string,
66+
objectName string,
67+
parentEntity *string,
68+
property string,
69+
propertyValue string,
6970
) sdk.SemanticViewDetails {
7071
details := sdk.SemanticViewDetails{
71-
ObjectKind: ObjectKind,
72-
ObjectName: ObjectName,
73-
Property: Property,
74-
PropertyValue: PropertyValue,
72+
ObjectKind: objectKind,
73+
ObjectName: objectName,
74+
Property: property,
75+
PropertyValue: propertyValue,
7576
}
76-
if ParentEntity != nil {
77-
details.ParentEntity = ParentEntity
77+
if parentEntity != nil {
78+
details.ParentEntity = parentEntity
7879
}
7980

8081
return details

pkg/sdk/testint/semantic_view_integration_test.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -102,13 +102,13 @@ func TestInt_SemanticView(t *testing.T) {
102102
).WithRelationshipAlias(*relAliasRequest).WithRelationshipRefColumnNames([]sdk.SemanticViewColumnRequest{*relRefCol})
103103

104104
// facts
105-
factSynonymRequest := sdk.NewSynonymsRequest().WithWithSynonyms([]sdk.Synonym{{"F1"}})
105+
factSynonymRequest := sdk.NewSynonymsRequest().WithWithSynonyms([]sdk.Synonym{{Synonym: "F1"}})
106106
factSemanticExpression := sdk.NewSemanticExpressionRequest(&sdk.QualifiedExpressionNameRequest{QualifiedExpressionName: "table1.fact1"}, &sdk.SemanticSqlExpressionRequest{SqlExpression: "FIRST_C"}).
107107
WithSynonyms(*factSynonymRequest).
108108
WithComment("fact comment")
109109

110110
// dimensions
111-
dimensionSynonymRequest := sdk.NewSynonymsRequest().WithWithSynonyms([]sdk.Synonym{{"D1"}})
111+
dimensionSynonymRequest := sdk.NewSynonymsRequest().WithWithSynonyms([]sdk.Synonym{{Synonym: "D1"}})
112112
dimensionSemanticExpression := sdk.NewSemanticExpressionRequest(&sdk.QualifiedExpressionNameRequest{QualifiedExpressionName: "table1.FIRST_C"}, &sdk.SemanticSqlExpressionRequest{SqlExpression: "table1.FIRST_C"}).
113113
WithSynonyms(*dimensionSynonymRequest).
114114
WithComment("dimension comment")

pkg/testacc/resource_service_acceptance_test.go

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -630,8 +630,8 @@ func TestAcc_Service_basic_fromSpecification(t *testing.T) {
630630
HasIsUpgrading(false).
631631
HasManagingObjectDomainEmpty().
632632
HasManagingObjectNameEmpty(),
633-
assert.Check(resource.TestCheckResourceAttrWith(modelBasic.ResourceReference(), "show_output.0.current_instances", customassert.BetweenFunc(0, 1))),
634-
assert.Check(resource.TestCheckResourceAttrWith(modelBasic.ResourceReference(), "show_output.0.target_instances", customassert.BetweenFunc(0, 1))),
633+
assert.Check(resource.TestCheckResourceAttrWith(modelBasic.ResourceReference(), "show_output.0.current_instances", customassert.BetweenFunc(0, 2))),
634+
assert.Check(resource.TestCheckResourceAttrWith(modelBasic.ResourceReference(), "show_output.0.target_instances", customassert.BetweenFunc(0, 2))),
635635
assert.Check(resource.TestCheckResourceAttr(modelBasic.ResourceReference(), "describe_output.0.name", id.Name())),
636636
assert.Check(resource.TestCheckResourceAttr(modelBasic.ResourceReference(), "describe_output.0.status", string(sdk.ServiceStatusPending))),
637637
assert.Check(resource.TestCheckResourceAttr(modelBasic.ResourceReference(), "describe_output.0.database_name", id.DatabaseName())),
@@ -640,8 +640,8 @@ func TestAcc_Service_basic_fromSpecification(t *testing.T) {
640640
assert.Check(resource.TestCheckResourceAttr(modelBasic.ResourceReference(), "describe_output.0.compute_pool", computePool.ID().Name())),
641641
assert.Check(resource.TestCheckResourceAttrSet(modelBasic.ResourceReference(), "describe_output.0.spec")),
642642
assert.Check(resource.TestCheckResourceAttrSet(modelBasic.ResourceReference(), "describe_output.0.dns_name")),
643-
assert.Check(resource.TestCheckResourceAttrWith(modelBasic.ResourceReference(), "describe_output.0.current_instances", customassert.BetweenFunc(0, 1))),
644-
assert.Check(resource.TestCheckResourceAttrWith(modelBasic.ResourceReference(), "describe_output.0.target_instances", customassert.BetweenFunc(0, 1))),
643+
assert.Check(resource.TestCheckResourceAttrWith(modelBasic.ResourceReference(), "describe_output.0.current_instances", customassert.BetweenFunc(0, 2))),
644+
assert.Check(resource.TestCheckResourceAttrWith(modelBasic.ResourceReference(), "describe_output.0.target_instances", customassert.BetweenFunc(0, 2))),
645645
assert.Check(resource.TestCheckResourceAttr(modelBasic.ResourceReference(), "describe_output.0.min_ready_instances", "1")),
646646
assert.Check(resource.TestCheckResourceAttr(modelBasic.ResourceReference(), "describe_output.0.min_instances", "1")),
647647
assert.Check(resource.TestCheckResourceAttr(modelBasic.ResourceReference(), "describe_output.0.max_instances", "1")),

templates/resources/authentication_policy.md.tmpl

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,8 @@ description: |-
1313

1414
!> **Note** According to Snowflake [docs](https://docs.snowflake.com/en/sql-reference/sql/drop-authentication-policy#usage-notes), an authentication policy cannot be dropped successfully if it is currently assigned to another object. Currently, the provider does not unassign such objects automatically. Before dropping the resource, first unassign the policy from the relevant objects. See [guide](../guides/unassigning_policies) for more details.
1515

16+
-> **Note** This resource is not yet adjusted to the changes in BCR 2025_06 (see our [BCR Migration Guide](https://github.com/snowflakedb/terraform-provider-snowflake/blob/main/SNOWFLAKE_BCR_MIGRATION_GUIDE.md#bundle-2025_06)). As a workaround, please use the [execute](https://registry.terraform.io/providers/snowflakedb/snowflake/latest/docs/resources/execute) resource.
17+
1618
# {{.Name}} ({{.Type}})
1719

1820
{{ .Description | trimspace }}

templates/resources/external_oauth_integration.md.tmpl

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,10 @@ description: |-
1111

1212
!> **Note** The provider does not detect external changes on security integration type. In this case, remove the integration of wrong type manually with `terraform destroy` and recreate the resource. It will be addressed in the future.
1313

14+
<!-- TODO(SNOW-1844996): Remove this note.-->
15+
-> **Note** Field `NETWORK_POLICY` added in BCR 2025_06 (read our [BCR Migration Guide](https://github.com/snowflakedb/terraform-provider-snowflake/blob/main/SNOWFLAKE_BCR_MIGRATION_GUIDE.md#bundle-2025_06)) is currently missing. It will be added in the future.
16+
As a workaround, please use the [execute](https://registry.terraform.io/providers/snowflakedb/snowflake/latest/docs/resources/execute) resource.
17+
1418
# {{.Name}} ({{.Type}})
1519

1620
{{ .Description | trimspace }}

0 commit comments

Comments
 (0)