Skip to content

Commit

Permalink
Add async type when converting yaml files (GoogleCloudPlatform#10832)
Browse files Browse the repository at this point in the history
  • Loading branch information
zli82016 authored May 30, 2024
1 parent 64ac734 commit fd55ea7
Show file tree
Hide file tree
Showing 5 changed files with 6 additions and 4 deletions.
2 changes: 1 addition & 1 deletion mmv1/products/datafusion/go_instance.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ timeouts:
delete_minutes: 50
autogen_async: true
async:
type: "OpAsync"
type: 'OpAsync'
operation:
base_url: '{{op_id}}'
path: 'name'
Expand Down
2 changes: 1 addition & 1 deletion mmv1/products/pubsub/go_Schema.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ timeouts:
update_minutes: 20
delete_minutes: 20
async:
type: "PollAsync"
type: 'PollAsync'
check_response_func_existence: 'transport_tpg.PollCheckForExistence'
check_response_func_absence: 'transport_tpg.PollCheckForAbsence'
suppress_error: false
Expand Down
2 changes: 1 addition & 1 deletion mmv1/products/pubsub/go_Subscription.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ timeouts:
update_minutes: 20
delete_minutes: 20
async:
type: "PollAsync"
type: 'PollAsync'
check_response_func_existence: 'transport_tpg.PollCheckForExistence'
suppress_error: true
actions: ['create']
Expand Down
2 changes: 1 addition & 1 deletion mmv1/products/pubsub/go_Topic.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ timeouts:
update_minutes: 20
delete_minutes: 20
async:
type: "PollAsync"
type: 'PollAsync'
check_response_func_existence: 'transport_tpg.PollCheckForExistence'
check_response_func_absence: 'transport_tpg.PollCheckForAbsence'
suppress_error: true
Expand Down
2 changes: 2 additions & 0 deletions mmv1/templates/terraform/yaml_conversion.erb
Original file line number Diff line number Diff line change
Expand Up @@ -168,6 +168,7 @@ autogen_async: <%= object.autogen_async %>
<% unless object.async.nil? -%>
async:
<% if object.async.is_a? Provider::Terraform::PollAsync -%>
type: 'PollAsync'
<% unless object.async.check_response_func_existence.nil? -%>
check_response_func_existence: '<%= object.async.check_response_func_existence %>'
<% end -%>
Expand All @@ -185,6 +186,7 @@ async:
<% end -%>
<% end -%>
<% if object.async.is_a? Api::OpAsync -%>
type: 'OpAsync'
<% #async.operation %>
<% unless object.async.operation.nil? -%>
operation:
Expand Down

0 comments on commit fd55ea7

Please sign in to comment.