From e9405fb22b92e891b32a0f0601645afd1aafe187 Mon Sep 17 00:00:00 2001 From: Artur Sawicki Date: Tue, 3 Sep 2024 16:33:55 +0200 Subject: [PATCH] Add missing issue references --- pkg/resources/network_policy.go | 1 + pkg/resources/user.go | 3 ++- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/pkg/resources/network_policy.go b/pkg/resources/network_policy.go index 8283f22b63..7b590ce169 100644 --- a/pkg/resources/network_policy.go +++ b/pkg/resources/network_policy.go @@ -98,6 +98,7 @@ func NetworkPolicy() *schema.Resource { // The main issue lays in the old Terraform SDK and how its handling DiffSuppression and CustomizeDiff // for complex types like Sets, Lists, and Maps. When every element of the Set is suppressed in custom diff, // it returns true for d.HasChange anyway (it returns false for suppressed changes on primitive types like Number, Bool, String, etc.). + // TODO [SNOW-1648997]: address the above comment ComputedIfAnyAttributeChanged( networkPolicySchema, ShowOutputAttributeName, diff --git a/pkg/resources/user.go b/pkg/resources/user.go index 53a1e8a8d2..65744a497a 100644 --- a/pkg/resources/user.go +++ b/pkg/resources/user.go @@ -88,6 +88,7 @@ var userSchema = map[string]*schema.Schema{ Description: booleanStringFieldDescription("Specifies whether the user is disabled, which prevents logging in and aborts all the currently-running queries for the user."), Default: BooleanDefault, }, + // TODO [SNOW-1649000]: consider handling external change if there is no config (or zero) for `days_to_expiry` and other similar attributes (what about this the other way around?) "days_to_expiry": { Type: schema.TypeInt, Optional: true, @@ -199,7 +200,7 @@ func User() *schema.Resource { CustomizeDiff: customdiff.All( // TODO [SNOW-1629468 - next pr]: test "default_role", "default_secondary_roles" - // TODO [SNOW-TODO]: "default_secondary_roles" have to stay commented out because of how the SDKv2 handles diff suppressions and custom diffs for sets + // TODO [SNOW-1648997]: "default_secondary_roles" have to stay commented out because of how the SDKv2 handles diff suppressions and custom diffs for sets ComputedIfAnyAttributeChanged(userSchema, ShowOutputAttributeName, "password", "login_name", "display_name", "first_name", "last_name", "email", "must_change_password", "disabled", "days_to_expiry", "mins_to_unlock", "default_warehouse", "default_namespace", "default_role", "mins_to_bypass_mfa", "rsa_public_key", "rsa_public_key_2", "comment", "disable_mfa"), ComputedIfAnyAttributeChanged(userParametersSchema, ParametersAttributeName, collections.Map(sdk.AsStringList(sdk.AllUserParameters), strings.ToLower)...), ComputedIfAnyAttributeChanged(userSchema, FullyQualifiedNameAttributeName, "name"),