Skip to content

Commit 3e3ca40

Browse files
Android Build Filesystem (ABFS) Teamsce-taid
authored andcommitted
feat: optional creation of DNS zones
PiperOrigin-RevId: 785758912
1 parent d564270 commit 3e3ca40

File tree

2 files changed

+24
-0
lines changed

2 files changed

+24
-0
lines changed

examples/simple/dns.tf

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,21 @@
1212
# See the License for the specific language governing permissions and
1313
# limitations under the License.
1414

15+
moved {
16+
from = module.cloud-dns-private-google-apis
17+
to = module.cloud-dns-private-google-apis[0]
18+
}
19+
20+
moved {
21+
from = module.cloud-dns-private-artifact-registry
22+
to = module.cloud-dns-private-artifact-registry[0]
23+
}
24+
25+
moved {
26+
from = module.source-repositories-private-artifact-registry
27+
to = module.source-repositories-private-artifact-registry[0]
28+
}
29+
1530
locals {
1631
# See https://cloud.google.com/vpc/docs/configure-private-google-access#config-domain
1732
private_google_access_ips = [
@@ -20,6 +35,7 @@ locals {
2035
}
2136

2237
module "cloud-dns-private-google-apis" {
38+
count = var.create_dns_zones ? 1 : 0
2339
source = "terraform-google-modules/cloud-dns/google"
2440
version = "5.3.0"
2541

@@ -52,6 +68,7 @@ module "cloud-dns-private-google-apis" {
5268
}
5369

5470
module "cloud-dns-private-artifact-registry" {
71+
count = var.create_dns_zones ? 1 : 0
5572
source = "terraform-google-modules/cloud-dns/google"
5673
version = "5.3.0"
5774

@@ -84,6 +101,7 @@ module "cloud-dns-private-artifact-registry" {
84101
}
85102

86103
module "source-repositories-private-artifact-registry" {
104+
count = var.create_dns_zones ? 1 : 0
87105
source = "terraform-google-modules/cloud-dns/google"
88106
version = "5.3.0"
89107

examples/simple/variables.tf

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -116,3 +116,9 @@ variable "abfs_enable_git_lfs" {
116116
description = "Enable Git LFS support"
117117
default = false
118118
}
119+
120+
variable "create_dns_zones" {
121+
type = bool
122+
description = "Whether to create the DNS zones for private access to Artifact Registry"
123+
default = true
124+
}

0 commit comments

Comments
 (0)