From 6bb09d929eeb72c2ec0fe8876d0f209ef1af0aeb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jan=20Cie=C5=9Blak?= Date: Wed, 3 Apr 2024 13:39:29 +0200 Subject: [PATCH] Changes after review --- pkg/resources/grant_privileges_to_account_role.go | 4 +++- pkg/resources/grant_privileges_to_database_role.go | 4 +++- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/pkg/resources/grant_privileges_to_account_role.go b/pkg/resources/grant_privileges_to_account_role.go index 6581a45839..1167746ae7 100644 --- a/pkg/resources/grant_privileges_to_account_role.go +++ b/pkg/resources/grant_privileges_to_account_role.go @@ -526,7 +526,9 @@ func UpdateGrantPrivilegesToAccountRole(ctx context.Context, d *schema.ResourceD ) if !id.WithGrantOption { - if err = client.Grants.RevokePrivilegesFromAccountRole(ctx, privilegesToGrant, grantOn, id.RoleName, new(sdk.RevokePrivilegesFromAccountRoleOptions)); err != nil { + if err = client.Grants.RevokePrivilegesFromAccountRole(ctx, privilegesToGrant, grantOn, id.RoleName, &sdk.RevokePrivilegesFromAccountRoleOptions{ + GrantOptionFor: sdk.Bool(true), + }); err != nil { return diag.Diagnostics{ diag.Diagnostic{ Severity: diag.Error, diff --git a/pkg/resources/grant_privileges_to_database_role.go b/pkg/resources/grant_privileges_to_database_role.go index 13f1de48db..d96784f069 100644 --- a/pkg/resources/grant_privileges_to_database_role.go +++ b/pkg/resources/grant_privileges_to_database_role.go @@ -452,7 +452,9 @@ func UpdateGrantPrivilegesToDatabaseRole(ctx context.Context, d *schema.Resource ) if !id.WithGrantOption { - if err = client.Grants.RevokePrivilegesFromDatabaseRole(ctx, privilegesToGrant, grantOn, id.DatabaseRoleName, new(sdk.RevokePrivilegesFromDatabaseRoleOptions)); err != nil { + if err = client.Grants.RevokePrivilegesFromDatabaseRole(ctx, privilegesToGrant, grantOn, id.DatabaseRoleName, &sdk.RevokePrivilegesFromDatabaseRoleOptions{ + GrantOptionFor: sdk.Bool(true), + }); err != nil { return diag.Diagnostics{ diag.Diagnostic{ Severity: diag.Error,