diff --git a/INDEX.md b/INDEX.md index cef6bc6c..88d9d32d 100644 --- a/INDEX.md +++ b/INDEX.md @@ -69,6 +69,7 @@ | `google_compute_instance` | [google, gcp_instance](google/google_compute_instance/simple) | | `google_compute_network` | [google](google/google_compute_network/simple) | | `google_container_cluster` | [google, GKE](google/google_container_cluster/simple)
[separate_node_pool](google/google_container_cluster/separate_node_pool) [cluster_and_deployment](google/google_container_cluster/cluster_and_deployment) [vpc_native_cluster](google/google_container_cluster/vpc_native_cluster) [autopilot](google/google_container_cluster/autopilot) | +| `google_dns_managed_zone` | [google, public](google/google_dns_managed_zone/public) [private](google/google_dns_managed_zone/private) | | `google_storage_bucket` | [google, gcs_bucket](google/google_storage_bucket/simple) | | `helm_release` | [simple](helm/helm_release/simple) [values_from_file](helm/helm_release/values_from_file) | | `inline` | [aws, remote-exec](aws/aws_instance/remote-exec/inline/) | diff --git a/google/google_dns_managed_zone/private/destroy.sh b/google/google_dns_managed_zone/private/destroy.sh new file mode 100755 index 00000000..3099bd68 --- /dev/null +++ b/google/google_dns_managed_zone/private/destroy.sh @@ -0,0 +1,2 @@ +#!/bin/bash +../../../bin/destroy.sh google diff --git a/google/google_dns_managed_zone/private/main.tf b/google/google_dns_managed_zone/private/main.tf new file mode 100644 index 00000000..ca4ba5b2 --- /dev/null +++ b/google/google_dns_managed_zone/private/main.tf @@ -0,0 +1,32 @@ +# Summary: Creates a private DNS managed zone + +# Documentation: https://www.terraform.io/docs/language/settings/index.html +terraform { + required_version = ">= 1.0.0" + required_providers { + google = { + source = "hashicorp/google" + version = "~> 3.0" + } + } +} + +# Documentation: https://www.terraform.io/docs/language/providers/requirements.html +provider "google" { + project = var.project_id + region = "us-central1" + zone = "us-central1-a" +} + +# Documentation: https://www.terraform.io/docs/language/values/variables.html +variable "project_id" { + type = string +} + +# DNS Managed Zone +# Documentation: https://registry.terraform.io/providers/hashicorp/google/latest/docs/resources/dns_managed_zone +resource "google_dns_managed_zone" "changeme_private_zone" { + name = "changeme-private-zone" + dns_name = "changeme-private-zone.com." + visibility = "private" +} diff --git a/google/google_dns_managed_zone/private/run.sh b/google/google_dns_managed_zone/private/run.sh new file mode 100755 index 00000000..405a6c01 --- /dev/null +++ b/google/google_dns_managed_zone/private/run.sh @@ -0,0 +1,2 @@ +#!/bin/bash +../../../bin/apply.sh google diff --git a/google/google_dns_managed_zone/public/destroy.sh b/google/google_dns_managed_zone/public/destroy.sh new file mode 100755 index 00000000..3099bd68 --- /dev/null +++ b/google/google_dns_managed_zone/public/destroy.sh @@ -0,0 +1,2 @@ +#!/bin/bash +../../../bin/destroy.sh google diff --git a/google/google_dns_managed_zone/public/main.tf b/google/google_dns_managed_zone/public/main.tf new file mode 100644 index 00000000..294eac70 --- /dev/null +++ b/google/google_dns_managed_zone/public/main.tf @@ -0,0 +1,31 @@ +# Summary: Creates a public DNS managed zone + +# Documentation: https://www.terraform.io/docs/language/settings/index.html +terraform { + required_version = ">= 1.0.0" + required_providers { + google = { + source = "hashicorp/google" + version = "~> 3.0" + } + } +} + +# Documentation: https://www.terraform.io/docs/language/providers/requirements.html +provider "google" { + project = var.project_id + region = "us-central1" + zone = "us-central1-a" +} + +# Documentation: https://www.terraform.io/docs/language/values/variables.html +variable "project_id" { + type = string +} + +# DNS Managed Zone +# Documentation: https://registry.terraform.io/providers/hashicorp/google/latest/docs/resources/dns_managed_zone +resource "google_dns_managed_zone" "changeme_public_zone" { + name = "changeme-public-zone" + dns_name = "changeme-public-zone.com." +} diff --git a/google/google_dns_managed_zone/public/run.sh b/google/google_dns_managed_zone/public/run.sh new file mode 100755 index 00000000..405a6c01 --- /dev/null +++ b/google/google_dns_managed_zone/public/run.sh @@ -0,0 +1,2 @@ +#!/bin/bash +../../../bin/apply.sh google