Skip to content

Commit

Permalink
fix clash on azureBlobStorageData (#4964) (#9644)
Browse files Browse the repository at this point in the history
Signed-off-by: Modular Magician <[email protected]>
  • Loading branch information
modular-magician authored Jul 27, 2021
1 parent 45441a4 commit 59ceabd
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 0 deletions.
3 changes: 3 additions & 0 deletions .changelog/4964.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
```release-note:bug
Fixed a crash on `azure_blob_storage_data_source` for `google_storage_transfer_job`
```
5 changes: 5 additions & 0 deletions google/resource_storage_transfer_job.go
Original file line number Diff line number Diff line change
Expand Up @@ -842,6 +842,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),
Expand Down

0 comments on commit 59ceabd

Please sign in to comment.