Skip to content

Commit

Permalink
name collision
Browse files Browse the repository at this point in the history
  • Loading branch information
rambleraptor committed Feb 1, 2019
1 parent 3fe3017 commit f036d55
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 4 deletions.
5 changes: 2 additions & 3 deletions templates/terraform/resource.erb
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,6 @@ package google
api_name_lower[0] = api_name_lower[0].downcase
api_client_name = api_name_lower.downcase
has_project = object.base_url.include?("{{project}}")
has_self_link = object.self_link
timeouts = object.async.nil? ? Api::Timeouts.new : object.async.operation.timeouts
-%>

Expand Down Expand Up @@ -78,7 +77,7 @@ func resource<%= resource_name -%>() *schema.Resource {
ForceNew: true,
},
<% end -%>
<% if has_self_link -%>
<% if object.has_self_link -%>
"self_link": {
Type: schema.TypeString,
Computed: true,
Expand Down Expand Up @@ -229,7 +228,7 @@ func resource<%= resource_name -%>Read(d *schema.ResourceData, meta interface{})
return fmt.Errorf("Error reading <%= object.name -%>: %s", err)
}
<% end -%>
<% if has_self_link -%>
<% if object.has_self_link -%>
if err := d.Set("self_link", ConvertSelfLinkToV1(res["selfLink"].(string))); err != nil {
return fmt.Errorf("Error reading <%= object.name -%>: %s", err)
}
Expand Down
2 changes: 1 addition & 1 deletion templates/terraform/resource.html.markdown.erb
Original file line number Diff line number Diff line change
Expand Up @@ -135,7 +135,7 @@ In addition to the arguments listed above, the following computed attributes are
<% properties.select(&:output).each do |prop| -%>
<%= lines(build_property_documentation(prop)) -%>
<% end -%>
<% if object.self_link -%>
<% if object.has_self_link -%>
* `self_link` - The URI of the created resource.
<% end -%>
Expand Down

0 comments on commit f036d55

Please sign in to comment.