mirror of
https://github.com/letic/terraform-provider-google.git
synced 2024-07-09 11:38:29 +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{
|
"create_timeout": &schema.Schema{
|
||||||
Type: schema.TypeInt,
|
Type: schema.TypeInt,
|
||||||
Optional: true,
|
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{
|
"labels": &schema.Schema{
|
||||||
|
@ -172,12 +172,7 @@ func resourceComputeImageCreate(d *schema.ResourceData, meta interface{}) error
|
||||||
}
|
}
|
||||||
|
|
||||||
// Read create timeout
|
// Read create timeout
|
||||||
var createTimeout int
|
createTimeout := int(d.Timeout(schema.TimeoutCreate).Minutes())
|
||||||
if v, ok := d.GetOk("create_timeout"); ok {
|
|
||||||
createTimeout = v.(int)
|
|
||||||
} else {
|
|
||||||
createTimeout = int(d.Timeout(schema.TimeoutCreate).Minutes())
|
|
||||||
}
|
|
||||||
|
|
||||||
// Insert the image
|
// Insert the image
|
||||||
op, err := config.clientCompute.Images.Insert(
|
op, err := config.clientCompute.Images.Insert(
|
||||||
|
|
|
@ -100,7 +100,7 @@ func TestAccComputeImage_update(t *testing.T) {
|
||||||
ResourceName: "google_compute_image.foobar",
|
ResourceName: "google_compute_image.foobar",
|
||||||
ImportState: true,
|
ImportState: true,
|
||||||
ImportStateVerify: true,
|
ImportStateVerify: true,
|
||||||
ImportStateVerifyIgnore: []string{"raw_disk", "create_timeout"},
|
ImportStateVerifyIgnore: []string{"raw_disk"},
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
})
|
})
|
||||||
|
@ -274,7 +274,6 @@ resource "google_compute_image" "foobar" {
|
||||||
raw_disk {
|
raw_disk {
|
||||||
source = "https://storage.googleapis.com/bosh-cpi-artifacts/bosh-stemcell-3262.4-google-kvm-ubuntu-trusty-go_agent-raw.tar.gz"
|
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 = {
|
labels = {
|
||||||
my-label = "my-label-value"
|
my-label = "my-label-value"
|
||||||
empty-label = ""
|
empty-label = ""
|
||||||
|
@ -291,7 +290,6 @@ resource "google_compute_image" "foobar" {
|
||||||
raw_disk {
|
raw_disk {
|
||||||
source = "https://storage.googleapis.com/bosh-cpi-artifacts/bosh-stemcell-3262.4-google-kvm-ubuntu-trusty-go_agent-raw.tar.gz"
|
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 = {
|
labels = {
|
||||||
my-label = "my-label-value"
|
my-label = "my-label-value"
|
||||||
empty-label = ""
|
empty-label = ""
|
||||||
|
@ -311,7 +309,6 @@ resource "google_compute_image" "foobar" {
|
||||||
raw_disk {
|
raw_disk {
|
||||||
source = "https://storage.googleapis.com/bosh-cpi-artifacts/bosh-stemcell-3262.4-google-kvm-ubuntu-trusty-go_agent-raw.tar.gz"
|
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 = {
|
labels = {
|
||||||
empty-label = "oh-look-theres-a-label-now"
|
empty-label = "oh-look-theres-a-label-now"
|
||||||
new-field = "only-shows-up-when-updated"
|
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
|
* `licenses` - (Optional) A list of license URIs to apply to this image. Changing this
|
||||||
forces a new resource to be created.
|
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:
|
The `raw_disk` block supports:
|
||||||
|
|
||||||
* `source` - (Required) The full Google Cloud Storage URL where the disk
|
* `source` - (Required) The full Google Cloud Storage URL where the disk
|
||||||
|
|
Loading…
Reference in New Issue
Block a user