Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[New resource] - azurerm_machine_learning_datastore_fileshare Support Machine learning datastore fileshare #19934

Merged
merged 26 commits into from
Feb 6, 2023
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
optimize expandBlobStorage
xuzhang3 authored and xuzhang3 committed Jan 9, 2023
commit 29e4044fce0a2c56e8aeeffd4b514a43be7c08fa
Original file line number Diff line number Diff line change
@@ -143,10 +143,7 @@ func resourceMachineLearningDataStoreCreateOrUpdate(d *pluginsdk.ResourceData, m
Type: utils.ToPtr(string(datastore.DatastoreTypeAzureBlob)),
}

prop, err := expandBlobStorage(d)
if err != nil {
return fmt.Errorf("%+v", err)
}
prop := expandBlobStorage(d)
datastoreRaw.Properties = prop

_, err = client.CreateOrUpdate(ctx, id, datastoreRaw, datastore.DefaultCreateOrUpdateOperationOptions())
@@ -201,7 +198,7 @@ func resourceMachineLearningDataStoreDelete(d *pluginsdk.ResourceData, meta inte
return nil
}

func expandBlobStorage(d *pluginsdk.ResourceData) (*datastore.AzureBlobDatastore, error) {
func expandBlobStorage(d *pluginsdk.ResourceData) *datastore.AzureBlobDatastore {
storeProps := &datastore.AzureBlobDatastore{
AccountName: utils.String(d.Get("storage_account_name").(string)),
ContainerName: utils.String(d.Get("container_name").(string)),
@@ -233,7 +230,7 @@ func expandBlobStorage(d *pluginsdk.ResourceData) (*datastore.AzureBlobDatastore
}
}

return storeProps, nil
return storeProps
}

func flattenBlobStorage(d *pluginsdk.ResourceData, data datastore.AzureBlobDatastore) error {