Skip to content

Commit

Permalink
Promote google_dns_response_policy & google_dns_response_policy_rule …
Browse files Browse the repository at this point in the history
  • Loading branch information
gleichda authored and Khaled Hassan committed Jul 13, 2023
1 parent 509ccc2 commit ca8cf86
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 25 deletions.
1 change: 0 additions & 1 deletion mmv1/products/dns/ResponsePolicy.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,6 @@ description: |
base_url: 'projects/{{project}}/responsePolicies'
self_link: 'projects/{{project}}/responsePolicies/{{response_policy_name}}'
update_verb: :PATCH
min_version: beta
identity:
- responsePolicyName
examples:
Expand Down
1 change: 0 additions & 1 deletion mmv1/products/dns/ResponsePolicyRule.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,6 @@ description: |
base_url: 'projects/{{project}}/responsePolicies/{{response_policy}}/rules'
self_link: 'projects/{{project}}/responsePolicies/{{response_policy}}/rules/{{rule_name}}'
update_verb: :PATCH
min_version: beta
identity:
- ruleName
id_format: 'projects/{{project}}/responsePolicies/{{response_policy}}/rules/{{rule_name}}'
Expand Down
14 changes: 2 additions & 12 deletions mmv1/templates/terraform/examples/dns_response_policy_basic.tf.erb
Original file line number Diff line number Diff line change
@@ -1,21 +1,15 @@
# [START dns_response_policy_basic]
resource "google_compute_network" "network-1" {
provider = google-beta

name = "<%= ctx[:vars]['network_1_name'] %>"
auto_create_subnetworks = false
}

resource "google_compute_network" "network-2" {
provider = google-beta

name = "<%= ctx[:vars]['network_2_name'] %>"
auto_create_subnetworks = false
}

resource "google_compute_subnetwork" "subnetwork-1" {
provider = google-beta

name = google_compute_network.network-1.name
network = google_compute_network.network-1.name
ip_cidr_range = "10.0.36.0/24"
Expand All @@ -34,8 +28,6 @@ resource "google_compute_subnetwork" "subnetwork-1" {
}

resource "google_container_cluster" "cluster-1" {
provider = google-beta

name = "<%= ctx[:vars]['cluster_1_name'] %>"
location = "us-central1-c"
initial_node_count = 1
Expand Down Expand Up @@ -64,10 +56,8 @@ resource "google_container_cluster" "cluster-1" {
}

resource "google_dns_response_policy" "<%= ctx[:primary_resource_id] %>" {
provider = google-beta

response_policy_name = "<%= ctx[:vars]['response_policy_name'] %>"

networks {
network_url = google_compute_network.network-1.id
}
Expand All @@ -78,4 +68,4 @@ resource "google_dns_response_policy" "<%= ctx[:primary_resource_id] %>" {
gke_cluster_name = google_container_cluster.cluster-1.id
}
}
# [END dns_response_policy_basic]
# [END dns_response_policy_basic]
Original file line number Diff line number Diff line change
@@ -1,23 +1,17 @@
# [START dns_response_policy_rule_basic]
resource "google_compute_network" "network-1" {
provider = google-beta

name = "<%= ctx[:vars]['network_1_name'] %>"
auto_create_subnetworks = false
}

resource "google_compute_network" "network-2" {
provider = google-beta

name = "<%= ctx[:vars]['network_2_name'] %>"
auto_create_subnetworks = false
}

resource "google_dns_response_policy" "response-policy" {
provider = google-beta

response_policy_name = "<%= ctx[:vars]['response_policy_name'] %>"

networks {
network_url = google_compute_network.network-1.id
}
Expand All @@ -27,8 +21,6 @@ resource "google_dns_response_policy" "response-policy" {
}

resource "google_dns_response_policy_rule" "<%= ctx[:primary_resource_id] %>" {
provider = google-beta

response_policy = google_dns_response_policy.response-policy.response_policy_name
rule_name = "<%= ctx[:vars]['response_policy_rule_name'] %>"
dns_name = "dns.example.com."
Expand All @@ -40,7 +32,7 @@ resource "google_dns_response_policy_rule" "<%= ctx[:primary_resource_id] %>" {
ttl = 300
rrdatas = ["192.0.2.91"]
}
}
}

}
# [END dns_response_policy_rule_basic]
# [END dns_response_policy_rule_basic]

0 comments on commit ca8cf86

Please sign in to comment.