Skip to content

Commit bc97256

Browse files
compute: Add example for log_config optional_mode and optional_fields in google_compute_backend_service. (#14083) (#23047)
[upstream:f8a7b49cee45d524b8c11c32a1c11eea1ac086aa] Signed-off-by: Modular Magician <magic-modules@google.com>
1 parent e2c0c70 commit bc97256

File tree

3 files changed

+13
-1
lines changed

3 files changed

+13
-1
lines changed

google/services/compute/resource_compute_backend_service.go

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -932,7 +932,8 @@ If logging is enabled, logs will be exported to Stackdriver.`,
932932
Optional: true,
933933
Description: `This field can only be specified if logging is enabled for this backend service and "logConfig.optionalMode"
934934
was set to CUSTOM. Contains a list of optional fields you want to include in the logs.
935-
For example: serverInstance, serverGkeDetails.cluster, serverGkeDetails.pod.podNamespace`,
935+
For example: serverInstance, serverGkeDetails.cluster, serverGkeDetails.pod.podNamespace
936+
For example: orca_load_report, tls.protocol`,
936937
Elem: &schema.Schema{
937938
Type: schema.TypeString,
938939
},

google/services/compute/resource_compute_backend_service_generated_test.go

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -497,6 +497,11 @@ resource "google_compute_backend_service" "default" {
497497
dry_run = false
498498
}
499499
}
500+
log_config {
501+
enable = true
502+
optional_mode = "CUSTOM"
503+
optional_fields = [ "orca_load_report", "tls.protocol" ]
504+
}
500505
}
501506
502507
resource "google_compute_health_check" "default" {

website/docs/r/compute_backend_service.html.markdown

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -464,6 +464,11 @@ resource "google_compute_backend_service" "default" {
464464
dry_run = false
465465
}
466466
}
467+
log_config {
468+
enable = true
469+
optional_mode = "CUSTOM"
470+
optional_fields = [ "orca_load_report", "tls.protocol" ]
471+
}
467472
}
468473
469474
resource "google_compute_health_check" "default" {
@@ -1619,6 +1624,7 @@ The following arguments are supported:
16191624
This field can only be specified if logging is enabled for this backend service and "logConfig.optionalMode"
16201625
was set to CUSTOM. Contains a list of optional fields you want to include in the logs.
16211626
For example: serverInstance, serverGkeDetails.cluster, serverGkeDetails.pod.podNamespace
1627+
For example: orca_load_report, tls.protocol
16221628

16231629
<a name="nested_tls_settings"></a>The `tls_settings` block supports:
16241630

0 commit comments

Comments
 (0)