Skip to content

Commit

Permalink
Fix whitespace, add license header.
Browse files Browse the repository at this point in the history
  • Loading branch information
rileykarson committed Aug 28, 2018
1 parent e03aa07 commit 95ae195
Showing 1 changed file with 18 additions and 4 deletions.
22 changes: 18 additions & 4 deletions templates/terraform/encoders/health_check_type.erb
Original file line number Diff line number Diff line change
@@ -1,18 +1,32 @@
<% if false # the license inside this if block pertains to this file -%>
# Copyright 2017 Google Inc.
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
<% end -%>
if _, ok := d.GetOk("http_health_check"); ok {
obj["type"] = "HTTP"
return obj, nil
return obj, nil
}
if _, ok := d.GetOk("https_health_check"); ok {
obj["type"] = "HTTPS"
return obj, nil
return obj, nil
}
if _, ok := d.GetOk("tcp_health_check"); ok {
obj["type"] = "TCP"
return obj, nil
return obj, nil
}
if _, ok := d.GetOk("ssl_health_check"); ok {
obj["type"] = "SSL"
return obj, nil
return obj, nil
}

return nil, fmt.Errorf("error in HealthCheck %s: No health check block specified.", d.Get("name").(string))

0 comments on commit 95ae195

Please sign in to comment.