Skip to content

Commit

Permalink
Update all generated resources to 20m timeouts (GoogleCloudPlatform#5638
Browse files Browse the repository at this point in the history
)
  • Loading branch information
rileykarson authored and lcaggio committed Mar 17, 2022
1 parent cc10373 commit 007efb7
Show file tree
Hide file tree
Showing 36 changed files with 39 additions and 277 deletions.
2 changes: 1 addition & 1 deletion mmv1/api/async.rb
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ class Async < Api::Object
def validate
super

check :operation, type: Operation, required: true
check :operation, type: Operation
check :actions, default: %w[create delete update], type: ::Array, item_type: ::String
end

Expand Down
10 changes: 5 additions & 5 deletions mmv1/api/timeout.rb
Original file line number Diff line number Diff line change
Expand Up @@ -16,11 +16,11 @@
module Api
# Provides timeout information for the different operation types
class Timeouts < Api::Object
# Default timeout for all operation types is 4 minutes. This can be
# overridden for each resource.
DEFAULT_INSERT_TIMEOUT_MINUTES = 4
DEFAULT_UPDATE_TIMEOUT_MINUTES = 4
DEFAULT_DELETE_TIMEOUT_MINUTES = 4
# Default timeout for all operation types is 20, the Terraform default (https://www.terraform.io/plugin/sdkv2/resources/retries-and-customizable-timeouts)
# minutes. This can be overridden for each resource.
DEFAULT_INSERT_TIMEOUT_MINUTES = 20
DEFAULT_UPDATE_TIMEOUT_MINUTES = 20
DEFAULT_DELETE_TIMEOUT_MINUTES = 20

attr_reader :insert_minutes
attr_reader :update_minutes
Expand Down
23 changes: 0 additions & 23 deletions mmv1/products/accesscontextmanager/terraform.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -21,10 +21,6 @@ overrides: !ruby/object:Overrides::ResourceOverrides
in the provider configuration. Otherwise the ACM API will return a 403 error.
Your account must have the `serviceusage.services.use` permission on the
`billing_project` you defined.
timeouts: !ruby/object:Api::Timeouts
insert_minutes: 6
update_minutes: 6
delete_minutes: 6
autogen_async: true
# Skipping the sweeper due to the non-standard base_url
skip_sweeper: true
Expand All @@ -50,10 +46,6 @@ overrides: !ruby/object:Overrides::ResourceOverrides
in the provider configuration. Otherwise the ACM API will return a 403 error.
Your account must have the `serviceusage.services.use` permission on the
`billing_project` you defined.
timeouts: !ruby/object:Api::Timeouts
insert_minutes: 6
update_minutes: 6
delete_minutes: 6
autogen_async: true
# Skipping the sweeper due to the non-standard base_url
skip_sweeper: true
Expand All @@ -75,10 +67,6 @@ overrides: !ruby/object:Overrides::ResourceOverrides
encoder: templates/terraform/encoders/access_level_never_send_parent.go.erb
custom_import: templates/terraform/custom_import/set_access_policy_parent_from_self_link.go.erb
AccessLevels: !ruby/object:Overrides::Terraform::ResourceOverride
timeouts: !ruby/object:Api::Timeouts
insert_minutes: 6
update_minutes: 6
delete_minutes: 6
autogen_async: true
# Skipping the sweeper due to the non-standard base_url
skip_sweeper: true
Expand Down Expand Up @@ -113,9 +101,6 @@ overrides: !ruby/object:Overrides::ResourceOverrides
async: !ruby/object:Provider::Terraform::PollAsync
check_response_func_existence: PollCheckForExistence
actions: ['create']
operation: !ruby/object:Api::Async::Operation
timeouts: !ruby/object:Api::Timeouts
insert_minutes: 4
autogen_async: true
exclude_validator: true
exclude_import: true # no unique way to specify
Expand All @@ -139,10 +124,6 @@ overrides: !ruby/object:Overrides::ResourceOverrides
in the provider configuration. Otherwise the ACM API will return a 403 error.
Your account must have the `serviceusage.services.use` permission on the
`billing_project` you defined.
timeouts: !ruby/object:Api::Timeouts
insert_minutes: 6
update_minutes: 6
delete_minutes: 6
autogen_async: true
# Skipping the sweeper due to the non-standard base_url
skip_sweeper: true
Expand Down Expand Up @@ -183,10 +164,6 @@ overrides: !ruby/object:Overrides::ResourceOverrides
encoder: templates/terraform/encoders/access_level_never_send_parent.go.erb
custom_import: templates/terraform/custom_import/set_access_policy_parent_from_self_link.go.erb
ServicePerimeters: !ruby/object:Overrides::Terraform::ResourceOverride
timeouts: !ruby/object:Api::Timeouts
insert_minutes: 6
update_minutes: 6
delete_minutes: 6
autogen_async: true
# Skipping the sweeper due to the non-standard base_url
skip_sweeper: true
Expand Down
6 changes: 1 addition & 5 deletions mmv1/products/activedirectory/api.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -129,10 +129,6 @@ objects:
path: 'name'
base_url: '{{op_id}}'
wait_ms: 1000
timeouts: !ruby/object:Api::Timeouts
insert_minutes: 10
update_minutes: 10
delete_minutes: 10
result: !ruby/object:Api::OpAsync::Result
path: 'response'
resource_inside_response: true
Expand Down Expand Up @@ -196,4 +192,4 @@ objects:
required: true
input: true
description: |
The trust secret used for the handshake with the target domain. This will not be stored.
The trust secret used for the handshake with the target domain. This will not be stored.
12 changes: 0 additions & 12 deletions mmv1/products/apigateway/terraform.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -14,10 +14,6 @@
--- !ruby/object:Provider::Terraform::Config
overrides: !ruby/object:Overrides::ResourceOverrides
Api: !ruby/object:Overrides::Terraform::ResourceOverride
timeouts: !ruby/object:Api::Timeouts
insert_minutes: 6
update_minutes: 6
delete_minutes: 6
autogen_async: true
iam_policy: !ruby/object:Api::Resource::IamPolicy
allowed_iam_role: 'roles/apigateway.viewer'
Expand Down Expand Up @@ -49,10 +45,6 @@ overrides: !ruby/object:Overrides::ResourceOverrides
optional_properties: |
* `api_config_id_prefix` - (Optional) Creates a unique name beginning with the
specified prefix. If this and api_config_id are unspecified, a random value is chosen for the name.
timeouts: !ruby/object:Api::Timeouts
insert_minutes: 6
update_minutes: 6
delete_minutes: 6
autogen_async: true
iam_policy: !ruby/object:Api::Resource::IamPolicy
allowed_iam_role: 'roles/apigateway.viewer'
Expand Down Expand Up @@ -90,10 +82,6 @@ overrides: !ruby/object:Overrides::ResourceOverrides
extra_schema_entry: templates/terraform/extra_schema_entry/api_config.erb
encoder: 'templates/terraform/encoders/api_config.go.erb'
Gateway: !ruby/object:Overrides::Terraform::ResourceOverride
timeouts: !ruby/object:Api::Timeouts
insert_minutes: 6
update_minutes: 6
delete_minutes: 6
autogen_async: true
iam_policy: !ruby/object:Api::Resource::IamPolicy
allowed_iam_role: 'roles/apigateway.viewer'
Expand Down
3 changes: 0 additions & 3 deletions mmv1/products/apigee/terraform.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -47,9 +47,6 @@ overrides: !ruby/object:Overrides::ResourceOverrides
min_version: beta
# Resource creation race
skip_vcr: true
timeouts: !ruby/object:Api::Timeouts
insert_minutes: 10
delete_minutes: 10
custom_code: !ruby/object:Provider::Terraform::CustomCode
custom_import: templates/terraform/custom_import/apigee_organization.go.erb
encoder: templates/terraform/encoders/apigee_organization.go.erb
Expand Down
8 changes: 4 additions & 4 deletions mmv1/products/appengine/api.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -238,6 +238,10 @@ objects:
path: 'name'
base_url: 'projects/{{project}}/global/operations/{{op_id}}'
wait_ms: 1000
timeouts: !ruby/object:Api::Timeouts
insert_minutes: 20
update_minutes: 20
delete_minutes: 20
result: !ruby/object:Api::OpAsync::Result
path: 'targetLink'
status: !ruby/object:Api::OpAsync::Status
Expand Down Expand Up @@ -614,10 +618,6 @@ objects:
path: 'name'
base_url: 'projects/{{project}}/global/operations/{{op_id}}'
wait_ms: 1000
timeouts: !ruby/object:Api::Timeouts
insert_minutes: 10
update_minutes: 10
delete_minutes: 10
result: !ruby/object:Api::OpAsync::Result
path: 'targetLink'
status: !ruby/object:Api::OpAsync::Status
Expand Down
5 changes: 0 additions & 5 deletions mmv1/products/appengine/terraform.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -19,11 +19,6 @@ overrides: !ruby/object:Overrides::ResourceOverrides
async: !ruby/object:Provider::Terraform::PollAsync
check_response_func_existence: PollCheckForExistence
actions: ['create']
operation: !ruby/object:Api::Async::Operation
timeouts: !ruby/object:Api::Timeouts
insert_minutes: 4
update_minutes: 4
delete_minutes: 4
# This resource is a child resource (requires app ID in the URL)
skip_sweeper: true
examples:
Expand Down
3 changes: 0 additions & 3 deletions mmv1/products/bigquery/terraform.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -135,9 +135,6 @@ overrides: !ruby/object:Overrides::ResourceOverrides
async: !ruby/object:Provider::Terraform::PollAsync
check_response_func_existence: PollCheckForExistence
actions: ['create']
operation: !ruby/object:Api::Async::Operation
timeouts: !ruby/object:Api::Timeouts
insert_minutes: 4
examples:
- !ruby/object:Provider::Terraform::Examples
name: "bigquery_job_query"
Expand Down
3 changes: 0 additions & 3 deletions mmv1/products/cloudidentity/terraform.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -18,9 +18,6 @@ overrides: !ruby/object:Overrides::ResourceOverrides
check_response_func_existence: PollCheckForExistenceWith403
target_occurrences: 10
actions: ['create']
operation: !ruby/object:Api::Async::Operation
timeouts: !ruby/object:Api::Timeouts
insert_minutes: 6
docs: !ruby/object:Provider::Terraform::Docs
warning: |
If you are using User ADCs (Application Default Credentials) with this resource,
Expand Down
8 changes: 0 additions & 8 deletions mmv1/products/cloudrun/terraform.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -20,10 +20,6 @@ overrides: !ruby/object:Overrides::ResourceOverrides
async: !ruby/object:Provider::Terraform::PollAsync
check_response_func_existence: PollCheckKnativeStatusFunc(res)
actions: ['create', 'update']
operation: !ruby/object:Api::Async::Operation
timeouts: !ruby/object:Api::Timeouts
insert_minutes: 6
update_minutes: 6
examples:
- !ruby/object:Provider::Terraform::Examples
name: "cloud_run_domain_mapping_basic"
Expand Down Expand Up @@ -72,10 +68,6 @@ overrides: !ruby/object:Overrides::ResourceOverrides
async: !ruby/object:Provider::Terraform::PollAsync
check_response_func_existence: PollCheckKnativeStatusFunc(res)
actions: ['create', 'update']
operation: !ruby/object:Api::Async::Operation
timeouts: !ruby/object:Api::Timeouts
insert_minutes: 6
update_minutes: 15
examples:
- !ruby/object:Provider::Terraform::Examples
name: "cloud_run_service_basic"
Expand Down
Loading

0 comments on commit 007efb7

Please sign in to comment.