Skip to content

Commit

Permalink
Add user tags update to create
Browse files Browse the repository at this point in the history
  • Loading branch information
Alexander-Kita committed Oct 1, 2024
1 parent d28a492 commit c760031
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions ibm/service/power/resource_ibm_pi_network.go
Original file line number Diff line number Diff line change
Expand Up @@ -239,6 +239,16 @@ func resourceIBMPINetworkCreate(ctx context.Context, d *schema.ResourceData, met
return diag.FromErr(err)
}

if _, ok := d.GetOk(Arg_UserTags); ok {
if networkResponse.Crn != "" {
oldList, newList := d.GetChange(Arg_UserTags)
err := flex.UpdateGlobalTagsUsingCRN(oldList, newList, meta, string(networkResponse.Crn), "", UserTagType)
if err != nil {
log.Printf("Error on update of pi snapshot (%s) pi_user_tags during creation: %s", networkID, err)
}
}
}

return resourceIBMPINetworkRead(ctx, d, meta)
}

Expand Down

0 comments on commit c760031

Please sign in to comment.