mirror of
https://github.com/letic/terraform-provider-google.git
synced 2024-07-05 17:52:38 +00:00
Removing create_timeout from compute image (#2244)
This commit is contained in:
parent
c4db896d39
commit
192684a7f6
|
@ -96,7 +96,7 @@ func resourceComputeImage() *schema.Resource {
|
|||
"create_timeout": &schema.Schema{
|
||||
Type: schema.TypeInt,
|
||||
Optional: true,
|
||||
Deprecated: "Use timeouts block instead. See https://www.terraform.io/docs/configuration/resources.html#timeouts.",
|
||||
Removed: "Use timeouts block instead. See https://www.terraform.io/docs/configuration/resources.html#timeouts.",
|
||||
},
|
||||
|
||||
"labels": &schema.Schema{
|
||||
|
@ -172,12 +172,7 @@ func resourceComputeImageCreate(d *schema.ResourceData, meta interface{}) error
|
|||
}
|
||||
|
||||
// Read create timeout
|
||||
var createTimeout int
|
||||
if v, ok := d.GetOk("create_timeout"); ok {
|
||||
createTimeout = v.(int)
|
||||
} else {
|
||||
createTimeout = int(d.Timeout(schema.TimeoutCreate).Minutes())
|
||||
}
|
||||
createTimeout := int(d.Timeout(schema.TimeoutCreate).Minutes())
|
||||
|
||||
// Insert the image
|
||||
op, err := config.clientCompute.Images.Insert(
|
||||
|
|
|
@ -100,7 +100,7 @@ func TestAccComputeImage_update(t *testing.T) {
|
|||
ResourceName: "google_compute_image.foobar",
|
||||
ImportState: true,
|
||||
ImportStateVerify: true,
|
||||
ImportStateVerifyIgnore: []string{"raw_disk", "create_timeout"},
|
||||
ImportStateVerifyIgnore: []string{"raw_disk"},
|
||||
},
|
||||
},
|
||||
})
|
||||
|
@ -274,7 +274,6 @@ resource "google_compute_image" "foobar" {
|
|||
raw_disk {
|
||||
source = "https://storage.googleapis.com/bosh-cpi-artifacts/bosh-stemcell-3262.4-google-kvm-ubuntu-trusty-go_agent-raw.tar.gz"
|
||||
}
|
||||
create_timeout = 5
|
||||
labels = {
|
||||
my-label = "my-label-value"
|
||||
empty-label = ""
|
||||
|
@ -291,7 +290,6 @@ resource "google_compute_image" "foobar" {
|
|||
raw_disk {
|
||||
source = "https://storage.googleapis.com/bosh-cpi-artifacts/bosh-stemcell-3262.4-google-kvm-ubuntu-trusty-go_agent-raw.tar.gz"
|
||||
}
|
||||
create_timeout = 5
|
||||
labels = {
|
||||
my-label = "my-label-value"
|
||||
empty-label = ""
|
||||
|
@ -311,7 +309,6 @@ resource "google_compute_image" "foobar" {
|
|||
raw_disk {
|
||||
source = "https://storage.googleapis.com/bosh-cpi-artifacts/bosh-stemcell-3262.4-google-kvm-ubuntu-trusty-go_agent-raw.tar.gz"
|
||||
}
|
||||
create_timeout = 5
|
||||
labels = {
|
||||
empty-label = "oh-look-theres-a-label-now"
|
||||
new-field = "only-shows-up-when-updated"
|
||||
|
|
|
@ -74,8 +74,6 @@ The following arguments are supported: (Note that one of either source_disk or
|
|||
* `licenses` - (Optional) A list of license URIs to apply to this image. Changing this
|
||||
forces a new resource to be created.
|
||||
|
||||
* `create_timeout` - (Deprecated) Configurable timeout in minutes for creating images. Default is 4 minutes.
|
||||
|
||||
The `raw_disk` block supports:
|
||||
|
||||
* `source` - (Required) The full Google Cloud Storage URL where the disk
|
||||
|
|
Loading…
Reference in New Issue
Block a user