Skip to content

Latest commit

 

History

History
176 lines (143 loc) · 4.45 KB

File metadata and controls

176 lines (143 loc) · 4.45 KB

google_active_directory_domain

back

Index

Terraform

terraform {
  required_providers {
    google-beta = ">= 3.63.0"
  }
}

top

Example Usage

module "google_active_directory_domain" {
  source = "./modules/google-beta/r/google_active_directory_domain"

  # admin - (optional) is a type of string
  admin = null
  # authorized_networks - (optional) is a type of set of string
  authorized_networks = []
  # domain_name - (required) is a type of string
  domain_name = null
  # labels - (optional) is a type of map of string
  labels = {}
  # locations - (required) is a type of list of string
  locations = []
  # project - (optional) is a type of string
  project = null
  # reserved_ip_range - (required) is a type of string
  reserved_ip_range = null

  timeouts = [{
    create = null
    delete = null
    update = null
  }]
}

top

Variables

variable "admin" {
  description = "(optional) - The name of delegated administrator account used to perform Active Directory operations. \nIf not specified, setupadmin will be used."
  type        = string
  default     = null
}

variable "authorized_networks" {
  description = "(optional) - 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.\nIf CIDR subnets overlap between networks, domain creation will fail."
  type        = set(string)
  default     = null
}

variable "domain_name" {
  description = "(required) - The fully qualified domain name. e.g. mydomain.myorganization.com, with the restrictions, \nhttps://cloud.google.com/managed-microsoft-ad/reference/rest/v1/projects.locations.global.domains."
  type        = string
}

variable "labels" {
  description = "(optional) - Resource labels that can contain user-provided metadata"
  type        = map(string)
  default     = null
}

variable "locations" {
  description = "(required) - Locations where domain needs to be provisioned. [regions][compute/docs/regions-zones/] \ne.g. us-west1 or us-east4 Service supports up to 4 locations at once. Each location will use a /26 block."
  type        = list(string)
}

variable "project" {
  description = "(optional)"
  type        = string
  default     = null
}

variable "reserved_ip_range" {
  description = "(required) - The CIDR range of internal addresses that are reserved for this domain. Reserved networks must be /24 or larger. \nRanges must be unique and non-overlapping with existing subnets in authorizedNetworks"
  type        = string
}

variable "timeouts" {
  description = "nested block: NestingSingle, min items: 0, max items: 0"
  type = set(object(
    {
      create = string
      delete = string
      update = string
    }
  ))
  default = []
}

top

Resource

resource "google_active_directory_domain" "this" {
  # admin - (optional) is a type of string
  admin = var.admin
  # authorized_networks - (optional) is a type of set of string
  authorized_networks = var.authorized_networks
  # domain_name - (required) is a type of string
  domain_name = var.domain_name
  # labels - (optional) is a type of map of string
  labels = var.labels
  # locations - (required) is a type of list of string
  locations = var.locations
  # project - (optional) is a type of string
  project = var.project
  # reserved_ip_range - (required) is a type of string
  reserved_ip_range = var.reserved_ip_range

  dynamic "timeouts" {
    for_each = var.timeouts
    content {
      # create - (optional) is a type of string
      create = timeouts.value["create"]
      # delete - (optional) is a type of string
      delete = timeouts.value["delete"]
      # update - (optional) is a type of string
      update = timeouts.value["update"]
    }
  }

}

top

Outputs

output "fqdn" {
  description = "returns a string"
  value       = google_active_directory_domain.this.fqdn
}

output "id" {
  description = "returns a string"
  value       = google_active_directory_domain.this.id
}

output "name" {
  description = "returns a string"
  value       = google_active_directory_domain.this.name
}

output "project" {
  description = "returns a string"
  value       = google_active_directory_domain.this.project
}

output "this" {
  value = google_active_directory_domain.this
}

top