Skip to content

Commit a09a5b5

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

File tree

3 files changed

+13
-1
lines changed

3 files changed

+13
-1
lines changed

google-beta/services/compute/resource_compute_backend_service.go

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

google-beta/services/compute/resource_compute_backend_service_generated_test.go

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -729,6 +729,11 @@ resource "google_compute_backend_service" "default" {
729729
dry_run = false
730730
}
731731
}
732+
log_config {
733+
enable = true
734+
optional_mode = "CUSTOM"
735+
optional_fields = [ "orca_load_report", "tls.protocol" ]
736+
}
732737
}
733738
734739
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)