From 5a24edfa6e1047ae9e64e3755074bdbb8e7ca3c0 Mon Sep 17 00:00:00 2001 From: Roberto Jung Drebes Date: Mon, 1 Apr 2019 19:00:06 +0200 Subject: [PATCH] Terraform: Cloud DNS logging (#1598) Merged PR #1598. --- build/terraform-beta | 2 +- products/dns/api.yaml | 8 ++++++++ templates/terraform/examples/dns_policy_basic.tf.erb | 2 ++ 3 files changed, 11 insertions(+), 1 deletion(-) diff --git a/build/terraform-beta b/build/terraform-beta index 9d1ea6206a7c..c210ff84ff42 160000 --- a/build/terraform-beta +++ b/build/terraform-beta @@ -1 +1 @@ -Subproject commit 9d1ea6206a7c5192b09e60ab12e31b7598c8f08f +Subproject commit c210ff84ff42b02b8f2a4a16d0a7899444298748 diff --git a/products/dns/api.yaml b/products/dns/api.yaml index 6fe26c65e725..aa590cbc4ba2 100644 --- a/products/dns/api.yaml +++ b/products/dns/api.yaml @@ -199,6 +199,14 @@ objects: send_empty_value: true update_verb: :PATCH update_url: 'projects/{{project}}/policies/{{name}}' + - !ruby/object:Api::Type::Boolean + name: 'enableLogging' + description: | + Controls whether logging is enabled for the networks bound to this policy. + Defaults to no logging if not set. + send_empty_value: true + update_verb: :PATCH + update_url: 'projects/{{project}}/policies/{{name}}' - !ruby/object:Api::Type::Integer name: 'id' description: Unique identifier for the resource; defined by the server. diff --git a/templates/terraform/examples/dns_policy_basic.tf.erb b/templates/terraform/examples/dns_policy_basic.tf.erb index e79fff561db8..1eeb9e08b57a 100644 --- a/templates/terraform/examples/dns_policy_basic.tf.erb +++ b/templates/terraform/examples/dns_policy_basic.tf.erb @@ -4,6 +4,8 @@ resource "google_dns_policy" "<%= ctx[:primary_resource_id] %>" { name = "<%= ctx[:vars]['policy_name'] %>" enable_inbound_forwarding = true + enable_logging = true + alternative_name_server_config { target_name_servers { ipv4_address = "172.16.1.10"