Skip to content

Commit

Permalink
Added pre-delete to support updating the approver list, keeping the a…
Browse files Browse the repository at this point in the history
…pproval workflow set as ForceNew
  • Loading branch information
varsharmavs committed Apr 4, 2024
1 parent 9834fe3 commit 97ef2a3
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 0 deletions.
3 changes: 3 additions & 0 deletions mmv1/products/privilegedaccessmanager/Entitlement.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -225,3 +225,6 @@ parameters:
url_param_only: true
description: |
Format: project/{project_id} or organization/{organization_number} or folder/{folder_number}
custom_code: !ruby/object:Provider::Terraform::CustomCode
pre_update: templates/terraform/pre_update/privileged_access_manager_entitlement.go.erb

Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
approvalWorkflowProp, err := expandPrivilegedAccessManagerEntitlementApprovalWorkflow(d.Get("approval_workflow"), d, config)
if err != nil {
return err
} else if v, ok := d.GetOkExists("approval_workflow"); !tpgresource.IsEmptyValue(reflect.ValueOf(v)) && (ok || !reflect.DeepEqual(v, approvalWorkflowProp)) {
obj["approvalWorkflow"] = approvalWorkflowProp
}


if d.HasChange("approval_workflow") {
updateMask = append(updateMask, "approvalWorkflow")
}

0 comments on commit 97ef2a3

Please sign in to comment.