Skip to content

Commit

Permalink
Storage transfer sas (#5006) (#9671)
Browse files Browse the repository at this point in the history
* Fix incorrect nested object reference

* Skip sweepers

* Remove assuredworkloads sweeper

* Remove extra code

Signed-off-by: Modular Magician <magic-modules@google.com>
  • Loading branch information
modular-magician authored Jul 29, 2021
1 parent fa5c669 commit 0e315b0
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 62 deletions.
3 changes: 3 additions & 0 deletions .changelog/5006.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
```release-note:bug
storage: fixed a crash when `azure_credentials` was defined in `google_storage_transfer_job`
```
57 changes: 0 additions & 57 deletions google/resource_assured_workloads_workload_sweeper_test.go

This file was deleted.

6 changes: 1 addition & 5 deletions google/resource_storage_transfer_job.go
Original file line number Diff line number Diff line change
Expand Up @@ -843,15 +843,11 @@ func expandAzureBlobStorageData(azureBlobStorageDatas []interface{}) *storagetra

azureBlobStorageData := azureBlobStorageDatas[0].(map[string]interface{})

if azureBlobStorageData["sas_token"] == nil {
log.Printf("[DEBUG] sas_token is not found")
return nil
}
return &storagetransfer.AzureBlobStorageData{
Container: azureBlobStorageData["container"].(string),
Path: azureBlobStorageData["path"].(string),
StorageAccount: azureBlobStorageData["storage_account"].(string),
AzureCredentials: expandAzureCredentials(azureBlobStorageData["sas_token"].([]interface{})),
AzureCredentials: expandAzureCredentials(azureBlobStorageData["azure_credentials"].([]interface{})),
}
}

Expand Down

0 comments on commit 0e315b0

Please sign in to comment.