diff --git a/azurerm/internal/services/eventhub/eventhub_namespace_customer_managed_key_resource.go b/azurerm/internal/services/eventhub/eventhub_namespace_customer_managed_key_resource.go index 724f2e777953..87eb88c31bc6 100644 --- a/azurerm/internal/services/eventhub/eventhub_namespace_customer_managed_key_resource.go +++ b/azurerm/internal/services/eventhub/eventhub_namespace_customer_managed_key_resource.go @@ -58,7 +58,7 @@ func resourceEventHubNamespaceCustomerManagedKeyCreateUpdate(d *pluginsdk.Resour ctx, cancel := timeouts.ForCreateUpdate(meta.(*clients.Client).StopContext, d) defer cancel() - id, err := namespaces.NamespaceID(d.Get("eventhub_namespace_id").(string)) + id, err := namespaces.ParseNamespaceID(d.Get("eventhub_namespace_id").(string)) if err != nil { return err } @@ -107,7 +107,7 @@ func resourceEventHubNamespaceCustomerManagedKeyRead(d *pluginsdk.ResourceData, ctx, cancel := timeouts.ForRead(meta.(*clients.Client).StopContext, d) defer cancel() - id, err := namespaces.NamespaceID(d.Id()) + id, err := namespaces.ParseNamespaceID(d.Id()) if err != nil { return err } @@ -147,7 +147,7 @@ func resourceEventHubNamespaceCustomerManagedKeyDelete(d *pluginsdk.ResourceData ctx, cancel := timeouts.ForDelete(meta.(*clients.Client).StopContext, d) defer cancel() - id, err := namespaces.NamespaceID(d.Id()) + id, err := namespaces.ParseNamespaceID(d.Id()) if err != nil { return err } diff --git a/azurerm/internal/services/eventhub/eventhub_namespace_customer_managed_key_resource_test.go b/azurerm/internal/services/eventhub/eventhub_namespace_customer_managed_key_resource_test.go index c0e11b1443fa..d45604eba18e 100644 --- a/azurerm/internal/services/eventhub/eventhub_namespace_customer_managed_key_resource_test.go +++ b/azurerm/internal/services/eventhub/eventhub_namespace_customer_managed_key_resource_test.go @@ -84,7 +84,7 @@ func TestAccEventHubNamespaceCustomerManagedKey_update(t *testing.T) { } func (r EventHubNamespaceCustomerManagedKeyResource) Exists(ctx context.Context, clients *clients.Client, state *pluginsdk.InstanceState) (*bool, error) { - id, err := namespaces.NamespaceID(state.ID) + id, err := namespaces.ParseNamespaceID(state.ID) if err != nil { return nil, err } diff --git a/azurerm/internal/services/eventhub/eventhub_namespace_resource.go b/azurerm/internal/services/eventhub/eventhub_namespace_resource.go index abe0e4218ec2..086b98fc3fc5 100644 --- a/azurerm/internal/services/eventhub/eventhub_namespace_resource.go +++ b/azurerm/internal/services/eventhub/eventhub_namespace_resource.go @@ -355,7 +355,7 @@ func resourceEventHubNamespaceRead(d *pluginsdk.ResourceData, meta interface{}) ctx, cancel := timeouts.ForRead(meta.(*clients.Client).StopContext, d) defer cancel() - id, err := namespaces.NamespaceID(d.Id()) + id, err := namespaces.ParseNamespaceID(d.Id()) if err != nil { return err } @@ -429,7 +429,7 @@ func resourceEventHubNamespaceDelete(d *pluginsdk.ResourceData, meta interface{} ctx, cancel := timeouts.ForDelete(meta.(*clients.Client).StopContext, d) defer cancel() - id, err := namespaces.NamespaceID(d.Id()) + id, err := namespaces.ParseNamespaceID(d.Id()) if err != nil { return err } @@ -601,8 +601,8 @@ func expandEventHubIdentity(input []interface{}) *namespaces.Identity { v := input[0].(map[string]interface{}) return &namespaces.Identity{ - Type: func() *namespaces.IdentityType { - v := namespaces.IdentityType(v["type"].(string)) + Type: func() *namespaces.ManagedServiceIdentityType { + v := namespaces.ManagedServiceIdentityType(v["type"].(string)) return &v }(), } diff --git a/azurerm/internal/services/eventhub/eventhub_namespace_resource_test.go b/azurerm/internal/services/eventhub/eventhub_namespace_resource_test.go index fa92c5081634..11dacb7223fa 100644 --- a/azurerm/internal/services/eventhub/eventhub_namespace_resource_test.go +++ b/azurerm/internal/services/eventhub/eventhub_namespace_resource_test.go @@ -455,7 +455,7 @@ func TestAccEventHubNamespace_autoInfalteDisabledWithAutoInflateUnits(t *testing } func (EventHubNamespaceResource) Exists(ctx context.Context, clients *clients.Client, state *pluginsdk.InstanceState) (*bool, error) { - id, err := namespaces.NamespaceID(state.ID) + id, err := namespaces.ParseNamespaceID(state.ID) if err != nil { return nil, err } diff --git a/azurerm/internal/services/eventhub/sdk/namespaces/method_update_autorest.go b/azurerm/internal/services/eventhub/sdk/namespaces/method_update_autorest.go index fa2501f50e3b..c96f80cec82f 100644 --- a/azurerm/internal/services/eventhub/sdk/namespaces/method_update_autorest.go +++ b/azurerm/internal/services/eventhub/sdk/namespaces/method_update_autorest.go @@ -57,7 +57,7 @@ func (c NamespacesClient) preparerForUpdate(ctx context.Context, id NamespaceId, func (c NamespacesClient) responderForUpdate(resp *http.Response) (result UpdateResponse, err error) { err = autorest.Respond( resp, - azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated, http.StatusAccepted), + azure.WithErrorUnlessStatusCode(http.StatusAccepted, http.StatusCreated, http.StatusOK), autorest.ByUnmarshallingJSON(&result.Model), autorest.ByClosing()) result.HttpResponse = resp