Skip to content

Commit

Permalink
azurerm_hpc_cache - add nil check when usernameSource is None (#…
Browse files Browse the repository at this point in the history
  • Loading branch information
neil-yechenwei committed Feb 13, 2023
1 parent d3617f1 commit 85ac396
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion internal/services/hpccache/hpc_cache_resource.go
Original file line number Diff line number Diff line change
Expand Up @@ -593,7 +593,7 @@ func expandStorageCacheDirectorySettings(d *pluginsdk.ResourceData) *storagecach
}

func flattenStorageCacheDirectorySettings(d *pluginsdk.ResourceData, input *storagecache.CacheDirectorySettings) (ad, flatFile, ldap []interface{}, err error) {
if input == nil || input.UsernameDownload == nil {
if input == nil || input.UsernameDownload == nil || input.UsernameDownload.UsernameSource == storagecache.UsernameSourceNone {
return nil, nil, nil, nil
}

Expand Down

0 comments on commit 85ac396

Please sign in to comment.