Google Managed Microsoft Active Directory Domain
This page shows how to write Terraform for Managed Microsoft Active Directory Domain and write them securely.
google_active_directory_domain (Terraform)
The Domain in Managed Microsoft Active Directory can be configured in Terraform with the resource name google_active_directory_domain
. The following sections describe 4 examples of how to use the resource and its parameters.
Example Usage from GitHub
resource "google_active_directory_domain" "ads" {
domain_name = var.ad_domain
locations = [var.location]
reserved_ip_range = var.cidr_rd_ad
admin = var.ad_username
authorized_networks = [google_compute_network.vpc.id]
resource "google_active_directory_domain" "ad-domain" {
domain_name = "mydomain.org.com"
locations = ["us-central1"]
reserved_ip_range = "192.168.255.0/24"
}
resource "google_active_directory_domain" "ad-domain" {
project = var.project
domain_name = var.domain_name
locations = var.locations
reserved_ip_range = var.reserved_ip_range
authorized_networks = var.authorized_networks
resource "google_active_directory_domain" "this" {
admin = var.admin
authorized_networks = var.authorized_networks
domain_name = var.domain_name
labels = var.labels
locations = var.locations
Parameters
-
admin
optional - string
The name of delegated administrator account used to perform Active Directory operations. If not specified, setupadmin will be used.
-
authorized_networks
optional - set of string
The full names of the Google Compute Engine networks the domain instance is connected to. The domain is only available on networks listed in authorizedNetworks. If CIDR subnets overlap between networks, domain creation will fail.
-
domain_name
required - string
The fully qualified domain name. e.g. mydomain.myorganization.com, with the restrictions, https://cloud.google.com/managed-microsoft-ad/reference/rest/v1/projects.locations.global.domains.
-
fqdn
optional computed - string
The fully-qualified domain name of the exposed domain used by clients to connect to the service. Similar to what would be chosen for an Active Directory set up on an internal network.
Resource labels that can contain user-provided metadata
-
locations
required - list of string
Locations where domain needs to be provisioned. [regions][compute/docs/regions-zones/] e.g. us-west1 or us-east4 Service supports up to 4 locations at once. Each location will use a /26 block.
-
name
optional computed - string
The unique name of the domain using the format: 'projects/[project]/locations/global/domains/[domainName]'.
-
project
optional computed - string -
reserved_ip_range
required - string
The CIDR range of internal addresses that are reserved for this domain. Reserved networks must be /24 or larger. Ranges must be unique and non-overlapping with existing subnets in authorizedNetworks
Explanation in Terraform Registry
Creates a Microsoft AD domain To get more information about Domain, see:
Frequently asked questions
What is Google Managed Microsoft Active Directory Domain?
Google Managed Microsoft Active Directory Domain is a resource for Managed Microsoft Active Directory of Google Cloud Platform. Settings can be wrote in Terraform.
Where can I find the example code for the Google Managed Microsoft Active Directory Domain?
For Terraform, the DonMorrisRak/Azure, yaroslavopsguru/gcp-tf-resources and rajeevkghosh/Active-Directory-Terraform source code examples are useful. See the Terraform Example section for further details.