Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions modules/composer_net/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ This example illustrates how to use the `composer-net` module. Please see exampl
| cloud\_composer\_network\_ipv4\_cidr\_block | The CIDR block from which IP range in tenant project will be reserved. | `string` | `null` | no |
| composer\_env\_name | Name of Cloud Composer Environment | `string` | n/a | yes |
| composer\_sa\_name | Service Account name to be used for running Cloud Composer Environment. | `string` | `"composer-sa"` | no |
| dns\_name | The DNS name of the managed zone | `string` | `"composer.cloud.google.com."` | no |
| dns\_zone\_name | Composer DNS private zone name | `string` | `"composer-google-cloud-dns"` | no |
| gke\_pods\_services\_ip\_ranges | The secondary IP ranges for the GKE Pods and Services IP ranges | `list(string)` | n/a | yes |
| gke\_subnet\_ip\_range | The GKE subnet IP range | `list(string)` | n/a | yes |
Expand Down
10 changes: 5 additions & 5 deletions modules/composer_net/dns.tf
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,8 @@ composer.cloud.google.com
resource "google_dns_managed_zone" "composer_cloud_zone" {
name = var.dns_zone_name
project = var.network_project_id
dns_name = "composer.cloud.google.com."
description = "composer.cloud.google.com zone"
dns_name = var.dns_name
description = "${var.dns_name} zone"

visibility = "private"

Expand All @@ -32,7 +32,7 @@ resource "google_dns_managed_zone" "composer_cloud_zone" {
}

resource "google_dns_record_set" "composer_cloud_zone-dev-A-record" {
name = "composer.cloud.google.com."
name = var.dns_name
project = var.network_project_id
type = "A"
ttl = 300
Expand All @@ -43,12 +43,12 @@ resource "google_dns_record_set" "composer_cloud_zone-dev-A-record" {
}

resource "google_dns_record_set" "composer_cloud_zone-CNAME" {
name = "*.composer.cloud.google.com."
name = "*.${var.dns_name}"
project = var.network_project_id
type = "CNAME"
ttl = 300

managed_zone = google_dns_managed_zone.composer_cloud_zone.name

rrdatas = ["composer.cloud.google.com."]
rrdatas = [var.dns_name]
}
6 changes: 6 additions & 0 deletions modules/composer_net/variables.tf
Original file line number Diff line number Diff line change
Expand Up @@ -78,6 +78,12 @@ variable "dns_zone_name" {
default = "composer-google-cloud-dns"
}

variable "dns_name" {
description = "The DNS name of the managed zone"
type = string
default = "composer.cloud.google.com."
}

variable "composer_sa_name" {
description = "Service Account name to be used for running Cloud Composer Environment."
type = string
Expand Down