|
| 1 | +# Copyright 2025 Google Inc. |
| 2 | +# Licensed under the Apache License, Version 2.0 (the "License"); |
| 3 | +# you may not use this file except in compliance with the License. |
| 4 | +# You may obtain a copy of the License at |
| 5 | +# |
| 6 | +# http://www.apache.org/licenses/LICENSE-2.0 |
| 7 | +# |
| 8 | +# Unless required by applicable law or agreed to in writing, software |
| 9 | +# distributed under the License is distributed on an "AS IS" BASIS, |
| 10 | +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
| 11 | +# See the License for the specific language governing permissions and |
| 12 | +# limitations under the License. |
| 13 | + |
| 14 | +--- |
| 15 | +# API resource name |
| 16 | +name: 'RegionHealthSource' |
| 17 | +# Resource description for the provider documentation. |
| 18 | +description: | |
| 19 | + A health source resource specifies the source resources and the health |
| 20 | + aggregation policy applied to the source resources to determine the |
| 21 | + aggregated health status. |
| 22 | +references: |
| 23 | + guides: |
| 24 | + 'Health checks overview': 'https://cloud.google.com/load-balancing/docs/health-check-concepts' |
| 25 | + api: 'https://cloud.google.com/compute/docs/reference/rest/beta/regionHealthSources' |
| 26 | +min_version: beta |
| 27 | + |
| 28 | +# URL for the resource's standard List method. https://google.aip.dev/132 |
| 29 | +# Terraform field names enclosed in double curly braces are replaced with |
| 30 | +# the field values from the resource at runtime. |
| 31 | +base_url: 'projects/{{project}}/regions/{{region}}/healthSources' |
| 32 | +# URL for the resource's standard Get method. https://google.aip.dev/131 |
| 33 | +# Terraform field names enclosed in double curly braces are replaced with |
| 34 | +# the field values from the resource at runtime. |
| 35 | +self_link: 'projects/{{project}}/regions/{{region}}/healthSources/{{name}}' |
| 36 | + |
| 37 | +# URL for the resource's standard Create method, including query parameters. |
| 38 | +# https://google.aip.dev/133 |
| 39 | +# Terraform field names enclosed in double curly braces are replaced with |
| 40 | +# the field values from the resource at runtime. |
| 41 | +create_url: 'projects/{{project}}/regions/{{region}}/healthSources' |
| 42 | + |
| 43 | +# Overrides the URL for the resource's standard Update method. (If unset, the |
| 44 | +# self_link URL is used by default.) https://google.aip.dev/134 |
| 45 | +# Terraform field names enclosed in double curly braces are replaced with |
| 46 | +# the field values from the resource at runtime. |
| 47 | +update_url: 'projects/{{project}}/regions/{{region}}/healthSources/{{name}}' |
| 48 | +# The HTTP verb used to update a resource. Allowed values: :POST, :PUT, :PATCH. Default: :PUT. |
| 49 | +update_verb: 'PATCH' |
| 50 | +# If true, the resource sets an `updateMask` query parameter listing modified |
| 51 | +# fields when updating the resource. If false, it does not. |
| 52 | +update_mask: true |
| 53 | + |
| 54 | +# If true, code for handling long-running operations is generated along with |
| 55 | +# the resource. If false, that code is not generated. |
| 56 | +autogen_async: true |
| 57 | +# Sets parameters for handling operations returned by the API. |
| 58 | +async: |
| 59 | + # Overrides which API calls return operations. Default: ['create', |
| 60 | + # 'update', 'delete'] |
| 61 | + # actions: ['create', 'update', 'delete'] |
| 62 | + operation: |
| 63 | + base_url: 'projects/{{project}}/regions/{{region}}/operations/{{op_id}}' |
| 64 | + |
| 65 | +examples: |
| 66 | + - name: "compute_region_health_source_basic" |
| 67 | + primary_resource_id: "example_test_health_source" |
| 68 | + vars: |
| 69 | + name: "test-health-source" |
| 70 | + description: "Example health source basic" |
| 71 | + min_version: 'beta' |
| 72 | + test_env_vars: |
| 73 | + project: 'PROJECT_NAME' |
| 74 | + |
| 75 | +parameters: |
| 76 | + - name: 'region' |
| 77 | + type: String |
| 78 | + required: true |
| 79 | + immutable: true |
| 80 | + url_param_only: true |
| 81 | + description: | |
| 82 | + URL of the region where the health source resides. |
| 83 | + - name: 'name' |
| 84 | + type: String |
| 85 | + required: true |
| 86 | + immutable: true |
| 87 | + description: | |
| 88 | + Name of the resource. Provided by the client when the resource is created. |
| 89 | + The name must be 1-63 characters long, and comply with RFC1035. |
| 90 | + Specifically, the name must be 1-63 characters long and match the regular |
| 91 | + expression `[a-z]([-a-z0-9]*[a-z0-9])?` which means the first |
| 92 | + character must be a lowercase letter, and all following characters must |
| 93 | + be a dash, lowercase letter, or digit, except the last character, which |
| 94 | + cannot be a dash. |
| 95 | +
|
| 96 | +properties: |
| 97 | + - name: 'description' |
| 98 | + type: String |
| 99 | + description: | |
| 100 | + An optional description of this resource. Provide this property when you |
| 101 | + create the resource. |
| 102 | + - name: 'sourceType' |
| 103 | + type: Enum |
| 104 | + description: | |
| 105 | + Specifies the type of the `HealthSource`. The only allowed value |
| 106 | + is `BACKEND_SERVICE`. Must be specified when the |
| 107 | + `HealthSource` is created, and cannot be mutated. |
| 108 | + enum_values: |
| 109 | + - 'BACKEND_SERVICE' |
| 110 | + required: true |
| 111 | + immutable: true |
| 112 | + - name: 'sources' |
| 113 | + type: Array |
| 114 | + item_type: |
| 115 | + name: 'source' |
| 116 | + type: ResourceRef |
| 117 | + resource: 'RegionBackendService' |
| 118 | + imports: 'selfLink' |
| 119 | + description: | |
| 120 | + URLs to the source resources. Must be size 1. Must be a |
| 121 | + `BackendService` if the `sourceType` is `BACKEND_SERVICE`. The |
| 122 | + `BackendService` must have load balancing scheme |
| 123 | + `INTERNAL` or `INTERNAL_MANAGED` and must be regional |
| 124 | + and in the same region as the `HealthSource` (cross-region |
| 125 | + deployment for `INTERNAL_MANAGED` is not supported). The |
| 126 | + `BackendService` may use only IGs, MIGs, or NEGs of type |
| 127 | + `GCE_VM_IP` or `GCE_VM_IP_PORT`. The |
| 128 | + `BackendService` may not use `haPolicy`. Can be |
| 129 | + mutated. |
| 130 | + min_size: 1 |
| 131 | + max_size: 1 |
| 132 | + - name: 'healthAggregationPolicy' |
| 133 | + type: ResourceRef |
| 134 | + resource: 'RegionHealthAggregationPolicy' |
| 135 | + imports: 'selfLink' |
| 136 | + description: | |
| 137 | + URL to the `HealthAggregationPolicy` resource. Must be set. Must |
| 138 | + be regional and in the same region as the `HealthSource`. Can be |
| 139 | + mutated. |
| 140 | + - name: 'id' |
| 141 | + type: String |
| 142 | + description: 'The unique identifier for the resource. This identifier is defined by the server.' |
| 143 | + output: true |
| 144 | + - name: 'creationTimestamp' |
| 145 | + type: String |
| 146 | + description: 'Creation timestamp in RFC3339 text format.' |
| 147 | + output: true |
| 148 | + - name: 'selfLinkWithId' |
| 149 | + type: String |
| 150 | + description: 'Server-defined URL with id for the resource.' |
| 151 | + output: true |
| 152 | + - name: 'fingerprint' |
| 153 | + type: Fingerprint |
| 154 | + description: | |
| 155 | + Fingerprint of this resource. A hash of the contents stored in this object. |
| 156 | + This field is used in optimistic locking. |
| 157 | + output: true |
0 commit comments