-
Notifications
You must be signed in to change notification settings - Fork 1.7k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
terraform: DNS private managed_zones
- Loading branch information
1 parent
964ae90
commit 5cfdf5e
Showing
4 changed files
with
216 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
39 changes: 39 additions & 0 deletions
39
templates/terraform/examples/dns_managed_zone_private.tf.erb
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,39 @@ | ||
resource "google_dns_managed_zone" "<%= ctx[:primary_resource_id] %>" { | ||
name = "<%= ctx[:vars]['zone_name'] %>" | ||
dns_name = "private.example.com." | ||
description = "Example private DNS zone" | ||
labels = { | ||
foo = "bar" | ||
} | ||
|
||
visibility = "private" | ||
|
||
private_visibility_config { | ||
networks { | ||
network_url = "${google_compute_network.network-1.self_link}" | ||
} | ||
networks { | ||
network_url = "${google_compute_network.network-2.self_link}" | ||
} | ||
} | ||
|
||
forwarding_config { | ||
target_name_servers { | ||
ipv4_address = "172.16.1.10" | ||
} | ||
target_name_servers { | ||
ipv4_address = "172.16.1.20" | ||
} | ||
} | ||
|
||
} | ||
|
||
resource "google_compute_network" "network-1" { | ||
name = "<%= ctx[:vars]['network_1_name'] %>" | ||
auto_create_subnetworks = false | ||
} | ||
|
||
resource "google_compute_network" "network-2" { | ||
name = "<%= ctx[:vars]['network_2_name'] %>" | ||
auto_create_subnetworks = false | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters