Skip to content

Commit

Permalink
feat(dns): add variable for dns zone name
Browse files Browse the repository at this point in the history
  • Loading branch information
nlevee authored Feb 22, 2024
1 parent 5a0005b commit acbba65
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 7 deletions.
8 changes: 1 addition & 7 deletions modules/composer_net/dns.tf
Original file line number Diff line number Diff line change
Expand Up @@ -16,14 +16,8 @@
composer.cloud.google.com
***************************************/

resource "random_string" "composer_cloud_zone" {
length = 4
special = false
upper = false
}

resource "google_dns_managed_zone" "composer_cloud_zone" {
name = "composer-google-cloud-dns-${random_string.composer_cloud_zone.id}"
name = var.dns_zone_name
project = var.network_project_id
dns_name = "composer.cloud.google.com."
description = "composer.cloud.google.com zone"
Expand Down
6 changes: 6 additions & 0 deletions modules/composer_net/variables.tf
Original file line number Diff line number Diff line change
Expand Up @@ -71,3 +71,9 @@ variable "composer_env_name" {
description = "Name of Cloud Composer Environment"
type = string
}

variable "dns_zone_name" {
description = "Composer DNS private zone name"
type = string
default = "composer-google-cloud-dns"
}

0 comments on commit acbba65

Please sign in to comment.