Skip to content

Commit

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

* Skip sweepers

* Remove assuredworkloads sweeper

* Remove extra code
  • Loading branch information
slevenick authored and khajduczenia committed Oct 12, 2021
1 parent 90e4301 commit 8dd07a9
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 5 deletions.
3 changes: 3 additions & 0 deletions mmv1/products/servicedirectory/terraform.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@
overrides: !ruby/object:Overrides::ResourceOverrides
Namespace: !ruby/object:Overrides::Terraform::ResourceOverride
import_format: ["projects/{{project}}/locations/{{location}}/namespaces/{{namespace_id}}"]
skip_sweeper: true
examples:
- !ruby/object:Provider::Terraform::Examples
name: "service_directory_namespace_basic"
Expand All @@ -32,6 +33,7 @@ overrides: !ruby/object:Overrides::ResourceOverrides
custom_import: templates/terraform/custom_import/service_directory_namespace.go.erb
Service: !ruby/object:Overrides::Terraform::ResourceOverride
import_format: ["projects/{{project}}/locations/{{location}}/namespaces/{{namespace_id}}/services/{{service_id}}"]
skip_sweeper: true
examples:
- !ruby/object:Provider::Terraform::Examples
name: "service_directory_service_basic"
Expand All @@ -49,6 +51,7 @@ overrides: !ruby/object:Overrides::ResourceOverrides
custom_code: !ruby/object:Provider::Terraform::CustomCode
custom_import: templates/terraform/custom_import/service_directory_service.go.erb
Endpoint: !ruby/object:Overrides::Terraform::ResourceOverride
skip_sweeper: true
import_format: ["projects/{{project}}/locations/{{location}}/namespaces/{{namespace_id}}/services/{{service_id}}/endpoints/{{endpoint_id}}"]
examples:
- !ruby/object:Provider::Terraform::Examples
Expand Down
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
1 change: 1 addition & 0 deletions tpgtools/overrides/assuredworkloads/beta/workload.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
- type: NO_SWEEPER
1 change: 1 addition & 0 deletions tpgtools/overrides/assuredworkloads/workload.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
- type: NO_SWEEPER

0 comments on commit 8dd07a9

Please sign in to comment.