Skip to content

Commit c1fb134

Browse files
committed
updated default value for iap_config variable object and description. fixed lint errors
1 parent fc5f26e commit c1fb134

File tree

7 files changed

+15
-12
lines changed

7 files changed

+15
-12
lines changed

examples/lb-http-separate-frontend-and-backend/main.tf

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -70,6 +70,7 @@ module "cloud-nat-group2" {
7070
module "lb-http-backend" {
7171
source = "terraform-google-modules/lb-http/google//modules/backend"
7272
version = "~> 12.0"
73+
7374
project_id = var.project_id
7475
name = "backend-lb"
7576
target_tags = [
@@ -104,7 +105,7 @@ module "lb-http-backend" {
104105
]
105106

106107
iap_config = {
107-
enable = false
108+
iap_members = []
108109
}
109110
}
110111

metadata.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -338,13 +338,13 @@ spec:
338338
roles:
339339
- level: Project
340340
roles:
341+
- roles/certificatemanager.owner
342+
- roles/vpcaccess.admin
341343
- roles/iam.serviceAccountAdmin
342344
- roles/storage.admin
343345
- roles/compute.admin
344346
- roles/run.admin
345347
- roles/iam.serviceAccountUser
346-
- roles/certificatemanager.owner
347-
- roles/vpcaccess.admin
348348
services:
349349
- certificatemanager.googleapis.com
350350
- cloudresourcemanager.googleapis.com

modules/backend/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ This module creates `google_compute_backend_service` resource and its dependenci
2222
| groups | The list of backend instance group which serves the traffic. | <pre>list(object({<br> group = string<br> description = optional(string)<br><br> balancing_mode = optional(string)<br> capacity_scaler = optional(number)<br> max_connections = optional(number)<br> max_connections_per_instance = optional(number)<br> max_connections_per_endpoint = optional(number)<br> max_rate = optional(number)<br> max_rate_per_instance = optional(number)<br> max_rate_per_endpoint = optional(number)<br> max_utilization = optional(number)<br> }))</pre> | `[]` | no |
2323
| health\_check | Input for creating HttpHealthCheck or HttpsHealthCheck resource for health checking this BackendService. A health check must be specified unless the backend service uses an internet or serverless NEG as a backend. | <pre>object({<br> host = optional(string, null)<br> request_path = optional(string, null)<br> request = optional(string, null)<br> response = optional(string, null)<br> port = optional(number, null)<br> port_name = optional(string, null)<br> proxy_header = optional(string, null)<br> port_specification = optional(string, null)<br> protocol = optional(string, null)<br> check_interval_sec = optional(number, 5)<br> timeout_sec = optional(number, 5)<br> healthy_threshold = optional(number, 2)<br> unhealthy_threshold = optional(number, 2)<br> logging = optional(bool, false)<br> })</pre> | `null` | no |
2424
| host\_path\_mappings | The list of host/path for which traffic could be sent to the backend service | <pre>list(object({<br> host = string<br> path = string<br> }))</pre> | <pre>[<br> {<br> "host": "*",<br> "path": "/*"<br> }<br>]</pre> | no |
25-
| iap\_config | Settings for enabling Cloud Identity Aware Proxy Structure and Users/SAs to be given IAP HttpResourceAccessor access to the service. | <pre>object({<br> iap_members = list(string)<br> oauth2_client_id = optional(string)<br> oauth2_client_secret = optional(string)<br> })</pre> | `null` | no |
25+
| iap\_config | Settings for enabling Cloud Identity Aware Proxy and Users/SAs to be given IAP HttpResourceAccessor access to the service. | <pre>object({<br> iap_members = list(string)<br> oauth2_client_id = optional(string)<br> oauth2_client_secret = optional(string)<br> })</pre> | <pre>{<br> "iap_members": []<br>}</pre> | no |
2626
| load\_balancing\_scheme | Load balancing scheme type (EXTERNAL for classic external load balancer, EXTERNAL\_MANAGED for Envoy-based load balancer, INTERNAL\_MANAGED for internal load balancer and INTERNAL\_SELF\_MANAGED for traffic director) | `string` | `"EXTERNAL_MANAGED"` | no |
2727
| locality\_lb\_policy | The load balancing algorithm used within the scope of the locality. | `string` | `null` | no |
2828
| log\_config | This field denotes the logging options for the load balancer traffic served by this backend service. If logging is enabled, logs will be exported to Stackdriver. | <pre>object({<br> enable = bool<br> sample_rate = number<br> })</pre> | <pre>{<br> "enable": true,<br> "sample_rate": 1<br>}</pre> | no |

modules/backend/metadata.yaml

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -191,13 +191,15 @@ spec:
191191
spec:
192192
outputExpr: name
193193
- name: iap_config
194-
description: Settings for enabling Cloud Identity Aware Proxy Structure and Users/SAs to be given IAP HttpResourceAccessor access to the service.
194+
description: Settings for enabling Cloud Identity Aware Proxy and Users/SAs to be given IAP HttpResourceAccessor access to the service.
195195
varType: |-
196196
object({
197197
iap_members = list(string)
198198
oauth2_client_id = optional(string)
199199
oauth2_client_secret = optional(string)
200200
})
201+
defaultValue:
202+
iap_members: []
201203
- name: cdn_policy
202204
description: Cloud CDN configuration for this BackendService.
203205
varType: |-
@@ -331,13 +333,13 @@ spec:
331333
roles:
332334
- level: Project
333335
roles:
336+
- roles/iam.serviceAccountUser
334337
- roles/iam.serviceAccountAdmin
335338
- roles/compute.admin
336339
- roles/storage.admin
337340
- roles/run.admin
338341
- roles/compute.networkAdmin
339342
- roles/iap.admin
340-
- roles/iam.serviceAccountUser
341343
services:
342344
- cloudresourcemanager.googleapis.com
343345
- compute.googleapis.com

modules/backend/variables.tf

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -154,13 +154,13 @@ variable "backend_bucket_name" {
154154
}
155155

156156
variable "iap_config" {
157-
description = "Settings for enabling Cloud Identity Aware Proxy Structure and Users/SAs to be given IAP HttpResourceAccessor access to the service."
157+
description = "Settings for enabling Cloud Identity Aware Proxy and Users/SAs to be given IAP HttpResourceAccessor access to the service."
158158
type = object({
159159
iap_members = list(string)
160160
oauth2_client_id = optional(string)
161161
oauth2_client_secret = optional(string)
162162
})
163-
default = null
163+
default = { iap_members = [] }
164164
}
165165

166166
variable "cdn_policy" {

modules/dynamic_backends/metadata.yaml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -330,13 +330,13 @@ spec:
330330
roles:
331331
- level: Project
332332
roles:
333-
- roles/storage.admin
334-
- roles/compute.admin
335-
- roles/run.admin
336333
- roles/iam.serviceAccountUser
337334
- roles/certificatemanager.owner
338335
- roles/vpcaccess.admin
339336
- roles/iam.serviceAccountAdmin
337+
- roles/storage.admin
338+
- roles/compute.admin
339+
- roles/run.admin
340340
services:
341341
- certificatemanager.googleapis.com
342342
- cloudresourcemanager.googleapis.com

modules/serverless_negs/metadata.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -294,13 +294,13 @@ spec:
294294
roles:
295295
- level: Project
296296
roles:
297-
- roles/iam.serviceAccountAdmin
298297
- roles/storage.admin
299298
- roles/compute.admin
300299
- roles/run.admin
301300
- roles/iam.serviceAccountUser
302301
- roles/certificatemanager.owner
303302
- roles/vpcaccess.admin
303+
- roles/iam.serviceAccountAdmin
304304
services:
305305
- certificatemanager.googleapis.com
306306
- cloudresourcemanager.googleapis.com

0 commit comments

Comments
 (0)