From 110e561164998ee49cda4018035b0d34284816fa Mon Sep 17 00:00:00 2001 From: Edward Sun <42220489+edwardmedia@users.noreply.github.com> Date: Fri, 27 Aug 2021 13:38:18 -0700 Subject: [PATCH] add timeouts (#5114) * add timeouts * update the default length of timeout --- .../resources/resource_storage_bucket_object.go | 7 +++++++ .../website/docs/r/storage_bucket_object.html.markdown | 9 +++++++++ 2 files changed, 16 insertions(+) diff --git a/mmv1/third_party/terraform/resources/resource_storage_bucket_object.go b/mmv1/third_party/terraform/resources/resource_storage_bucket_object.go index 7f4acbe775aa..43145d66d2f5 100644 --- a/mmv1/third_party/terraform/resources/resource_storage_bucket_object.go +++ b/mmv1/third_party/terraform/resources/resource_storage_bucket_object.go @@ -7,6 +7,7 @@ import ( "log" "os" "strings" + "time" "github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema" @@ -27,6 +28,12 @@ func resourceStorageBucketObject() *schema.Resource { Update: resourceStorageBucketObjectUpdate, Delete: resourceStorageBucketObjectDelete, + Timeouts: &schema.ResourceTimeout{ + Create: schema.DefaultTimeout(4 * time.Minute), + Update: schema.DefaultTimeout(4 * time.Minute), + Delete: schema.DefaultTimeout(4 * time.Minute), + }, + Schema: map[string]*schema.Schema{ "bucket": { Type: schema.TypeString, diff --git a/mmv1/third_party/terraform/website/docs/r/storage_bucket_object.html.markdown b/mmv1/third_party/terraform/website/docs/r/storage_bucket_object.html.markdown index d7da59fb3df4..d14956183c9a 100644 --- a/mmv1/third_party/terraform/website/docs/r/storage_bucket_object.html.markdown +++ b/mmv1/third_party/terraform/website/docs/r/storage_bucket_object.html.markdown @@ -92,6 +92,15 @@ exported: * `media_link` - (Computed) A url reference to download this object. +## Timeouts + +This resource provides the following +[Timeouts](/docs/configuration/resources.html#timeouts) configuration options: + +- `create` - Default is 4 minutes. +- `update` - Default is 4 minutes. +- `delete` - Default is 4 minutes. + ## Import This resource does not support import.