Skip to content

Commit acbba65

Browse files
authored
feat(dns): add variable for dns zone name
1 parent 5a0005b commit acbba65

File tree

2 files changed

+7
-7
lines changed

2 files changed

+7
-7
lines changed

modules/composer_net/dns.tf

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -16,14 +16,8 @@
1616
composer.cloud.google.com
1717
***************************************/
1818

19-
resource "random_string" "composer_cloud_zone" {
20-
length = 4
21-
special = false
22-
upper = false
23-
}
24-
2519
resource "google_dns_managed_zone" "composer_cloud_zone" {
26-
name = "composer-google-cloud-dns-${random_string.composer_cloud_zone.id}"
20+
name = var.dns_zone_name
2721
project = var.network_project_id
2822
dns_name = "composer.cloud.google.com."
2923
description = "composer.cloud.google.com zone"

modules/composer_net/variables.tf

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -71,3 +71,9 @@ variable "composer_env_name" {
7171
description = "Name of Cloud Composer Environment"
7272
type = string
7373
}
74+
75+
variable "dns_zone_name" {
76+
description = "Composer DNS private zone name"
77+
type = string
78+
default = "composer-google-cloud-dns"
79+
}

0 commit comments

Comments
 (0)