diff --git a/internal/services/loganalytics/log_analytics_workspace_table_resource.go b/internal/services/loganalytics/log_analytics_workspace_table_resource.go index d12520135b82..bee8106afab4 100644 --- a/internal/services/loganalytics/log_analytics_workspace_table_resource.go +++ b/internal/services/loganalytics/log_analytics_workspace_table_resource.go @@ -113,7 +113,6 @@ func (r LogAnalyticsWorkspaceTableResource) Create() sdk.ResourceFunc { return fmt.Errorf("decoding %+v", err) } client := metadata.Client.LogAnalytics.TablesClient - subscriptionId := metadata.Client.Account.SubscriptionId tableName := model.Name log.Printf("[INFO] preparing arguments for AzureRM Log Analytics Workspace Table %s update.", tableName) @@ -123,7 +122,7 @@ func (r LogAnalyticsWorkspaceTableResource) Create() sdk.ResourceFunc { return fmt.Errorf("invalid workspace object ID for table %s: %s", tableName, err) } - id := tables.NewTableID(subscriptionId, workspaceId.ResourceGroupName, workspaceId.WorkspaceName, tableName) + id := tables.NewTableID(workspaceId.SubscriptionId, workspaceId.ResourceGroupName, workspaceId.WorkspaceName, tableName) updateInput := tables.Table{ Properties: &tables.TableProperties{