mirror of
https://github.com/letic/terraform-provider-google.git
synced 2024-10-03 01:01:06 +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) {
|
func resourceStorageBucketStateImporter(d *schema.ResourceData, meta interface{}) ([]*schema.ResourceData, error) {
|
||||||
d.Set("name", d.Id())
|
d.Set("name", d.Id())
|
||||||
|
d.Set("force_destroy", false)
|
||||||
return []*schema.ResourceData{d}, nil
|
return []*schema.ResourceData{d}, nil
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -39,10 +39,9 @@ func TestAccStorageBucket_basic(t *testing.T) {
|
|||||||
),
|
),
|
||||||
},
|
},
|
||||||
resource.TestStep{
|
resource.TestStep{
|
||||||
ResourceName: "google_storage_bucket.bucket",
|
ResourceName: "google_storage_bucket.bucket",
|
||||||
ImportState: true,
|
ImportState: true,
|
||||||
ImportStateVerify: true,
|
ImportStateVerify: true,
|
||||||
ImportStateVerifyIgnore: []string{"force_destroy"},
|
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
})
|
})
|
||||||
@ -145,10 +144,9 @@ func TestAccStorageBucket_lifecycleRules(t *testing.T) {
|
|||||||
),
|
),
|
||||||
},
|
},
|
||||||
resource.TestStep{
|
resource.TestStep{
|
||||||
ResourceName: "google_storage_bucket.bucket",
|
ResourceName: "google_storage_bucket.bucket",
|
||||||
ImportState: true,
|
ImportState: true,
|
||||||
ImportStateVerify: true,
|
ImportStateVerify: true,
|
||||||
ImportStateVerifyIgnore: []string{"force_destroy"},
|
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
})
|
})
|
||||||
@ -201,10 +199,9 @@ func TestAccStorageBucket_storageClass(t *testing.T) {
|
|||||||
),
|
),
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
ResourceName: "google_storage_bucket.bucket",
|
ResourceName: "google_storage_bucket.bucket",
|
||||||
ImportState: true,
|
ImportState: true,
|
||||||
ImportStateVerify: true,
|
ImportStateVerify: true,
|
||||||
ImportStateVerifyIgnore: []string{"force_destroy"},
|
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
})
|
})
|
||||||
@ -386,10 +383,9 @@ func TestAccStorageBucket_versioning(t *testing.T) {
|
|||||||
),
|
),
|
||||||
},
|
},
|
||||||
resource.TestStep{
|
resource.TestStep{
|
||||||
ResourceName: "google_storage_bucket.bucket",
|
ResourceName: "google_storage_bucket.bucket",
|
||||||
ImportState: true,
|
ImportState: true,
|
||||||
ImportStateVerify: true,
|
ImportStateVerify: true,
|
||||||
ImportStateVerifyIgnore: []string{"force_destroy"},
|
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
})
|
})
|
||||||
|
Loading…
Reference in New Issue
Block a user