Skip to content

Commit

Permalink
lint
Browse files Browse the repository at this point in the history
  • Loading branch information
catriona-m committed Jan 17, 2025
1 parent fa7a405 commit 49e8907
Showing 1 changed file with 3 additions and 5 deletions.
8 changes: 3 additions & 5 deletions internal/services/servicebus/servicebus_namespace_resource.go
Original file line number Diff line number Diff line change
Expand Up @@ -362,7 +362,6 @@ func resourceServiceBusNamespaceCreate(d *pluginsdk.ResourceData, meta interface
return err
}
log.Printf("[DEBUG] Created the Network Rule Set associated with %s", id)

}

return resourceServiceBusNamespaceRead(d, meta)
Expand All @@ -375,8 +374,6 @@ func resourceServiceBusNamespaceUpdate(d *pluginsdk.ResourceData, meta interface

log.Printf("[INFO] preparing arguments for ServiceBus Namespace update")

t := d.Get("tags").(map[string]interface{})

id, err := namespaces.ParseNamespaceID(d.Id())
if err != nil {
return err
Expand All @@ -402,7 +399,6 @@ func resourceServiceBusNamespaceUpdate(d *pluginsdk.ResourceData, meta interface
return fmt.Errorf("expanding `identity`: %+v", err)
}
payload.Identity = identity

}

if d.HasChange("public_network_access_enabled") {
Expand Down Expand Up @@ -431,7 +427,7 @@ func resourceServiceBusNamespaceUpdate(d *pluginsdk.ResourceData, meta interface
}

if d.HasChange("tags") {
payload.Tags = expandTags(t)
payload.Tags = expandTags(d.Get("tags").(map[string]interface{}))
}

if d.HasChange("minimum_tls_version") {
Expand All @@ -440,6 +436,7 @@ func resourceServiceBusNamespaceUpdate(d *pluginsdk.ResourceData, meta interface
payload.Properties.MinimumTlsVersion = &minimumTls
}
}

if d.HasChange("capacity") {
sku := d.Get("sku").(string)
if capacity := d.Get("capacity"); capacity != nil {
Expand All @@ -452,6 +449,7 @@ func resourceServiceBusNamespaceUpdate(d *pluginsdk.ResourceData, meta interface
payload.Sku.Capacity = pointer.To(int64(capacity.(int)))
}
}

if err := client.CreateOrUpdateThenPoll(ctx, *id, *payload); err != nil {
return fmt.Errorf("updating %s: %+v", id, err)
}
Expand Down

0 comments on commit 49e8907

Please sign in to comment.