mirror of
https://github.com/letic/terraform-provider-google.git
synced 2024-07-03 08:42:39 +00:00
set force_destroy on import (#1223)
This commit is contained in:
parent
d7295334fa
commit
e9ab089260
|
@ -498,6 +498,7 @@ func resourceStorageBucketDelete(d *schema.ResourceData, meta interface{}) error
|
|||
|
||||
func resourceStorageBucketStateImporter(d *schema.ResourceData, meta interface{}) ([]*schema.ResourceData, error) {
|
||||
d.Set("name", d.Id())
|
||||
d.Set("force_destroy", false)
|
||||
return []*schema.ResourceData{d}, nil
|
||||
}
|
||||
|
||||
|
|
|
@ -39,10 +39,9 @@ func TestAccStorageBucket_basic(t *testing.T) {
|
|||
),
|
||||
},
|
||||
resource.TestStep{
|
||||
ResourceName: "google_storage_bucket.bucket",
|
||||
ImportState: true,
|
||||
ImportStateVerify: true,
|
||||
ImportStateVerifyIgnore: []string{"force_destroy"},
|
||||
ResourceName: "google_storage_bucket.bucket",
|
||||
ImportState: true,
|
||||
ImportStateVerify: true,
|
||||
},
|
||||
},
|
||||
})
|
||||
|
@ -145,10 +144,9 @@ func TestAccStorageBucket_lifecycleRules(t *testing.T) {
|
|||
),
|
||||
},
|
||||
resource.TestStep{
|
||||
ResourceName: "google_storage_bucket.bucket",
|
||||
ImportState: true,
|
||||
ImportStateVerify: true,
|
||||
ImportStateVerifyIgnore: []string{"force_destroy"},
|
||||
ResourceName: "google_storage_bucket.bucket",
|
||||
ImportState: true,
|
||||
ImportStateVerify: true,
|
||||
},
|
||||
},
|
||||
})
|
||||
|
@ -201,10 +199,9 @@ func TestAccStorageBucket_storageClass(t *testing.T) {
|
|||
),
|
||||
},
|
||||
{
|
||||
ResourceName: "google_storage_bucket.bucket",
|
||||
ImportState: true,
|
||||
ImportStateVerify: true,
|
||||
ImportStateVerifyIgnore: []string{"force_destroy"},
|
||||
ResourceName: "google_storage_bucket.bucket",
|
||||
ImportState: true,
|
||||
ImportStateVerify: true,
|
||||
},
|
||||
},
|
||||
})
|
||||
|
@ -386,10 +383,9 @@ func TestAccStorageBucket_versioning(t *testing.T) {
|
|||
),
|
||||
},
|
||||
resource.TestStep{
|
||||
ResourceName: "google_storage_bucket.bucket",
|
||||
ImportState: true,
|
||||
ImportStateVerify: true,
|
||||
ImportStateVerifyIgnore: []string{"force_destroy"},
|
||||
ResourceName: "google_storage_bucket.bucket",
|
||||
ImportState: true,
|
||||
ImportStateVerify: true,
|
||||
},
|
||||
},
|
||||
})
|
||||
|
|
Loading…
Reference in New Issue
Block a user