Google Cloud (GCP) Classic

v6.38.0 published on Thursday, Sep 22, 2022 by Pulumi

Domain

Creates a Microsoft AD domain

To get more information about Domain, see:

Example Usage

Active Directory Domain Basic

using System.Collections.Generic;
using Pulumi;
using Gcp = Pulumi.Gcp;

return await Deployment.RunAsync(() => 
{
    var ad_domain = new Gcp.ActiveDirectory.Domain("ad-domain", new()
    {
        DomainName = "tfgen.org.com",
        Locations = new[]
        {
            "us-central1",
        },
        ReservedIpRange = "192.168.255.0/24",
    });

});
package main

import (
	"github.com/pulumi/pulumi-gcp/sdk/v6/go/gcp/activedirectory"
	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)

func main() {
	pulumi.Run(func(ctx *pulumi.Context) error {
		_, err := activedirectory.NewDomain(ctx, "ad-domain", &activedirectory.DomainArgs{
			DomainName: pulumi.String("tfgen.org.com"),
			Locations: pulumi.StringArray{
				pulumi.String("us-central1"),
			},
			ReservedIpRange: pulumi.String("192.168.255.0/24"),
		})
		if err != nil {
			return err
		}
		return nil
	})
}
package generated_program;

import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.gcp.activedirectory.Domain;
import com.pulumi.gcp.activedirectory.DomainArgs;
import java.util.List;
import java.util.ArrayList;
import java.util.Map;
import java.io.File;
import java.nio.file.Files;
import java.nio.file.Paths;

public class App {
    public static void main(String[] args) {
        Pulumi.run(App::stack);
    }

    public static void stack(Context ctx) {
        var ad_domain = new Domain("ad-domain", DomainArgs.builder()        
            .domainName("tfgen.org.com")
            .locations("us-central1")
            .reservedIpRange("192.168.255.0/24")
            .build());

    }
}
import pulumi
import pulumi_gcp as gcp

ad_domain = gcp.activedirectory.Domain("ad-domain",
    domain_name="tfgen.org.com",
    locations=["us-central1"],
    reserved_ip_range="192.168.255.0/24")
import * as pulumi from "@pulumi/pulumi";
import * as gcp from "@pulumi/gcp";

const ad_domain = new gcp.activedirectory.Domain("ad-domain", {
    domainName: "tfgen.org.com",
    locations: ["us-central1"],
    reservedIpRange: "192.168.255.0/24",
});
resources:
  ad-domain:
    type: gcp:activedirectory:Domain
    properties:
      domainName: tfgen.org.com
      locations:
        - us-central1
      reservedIpRange: 192.168.255.0/24

Create a Domain Resource

new Domain(name: string, args: DomainArgs, opts?: CustomResourceOptions);
@overload
def Domain(resource_name: str,
           opts: Optional[ResourceOptions] = None,
           admin: Optional[str] = None,
           authorized_networks: Optional[Sequence[str]] = None,
           domain_name: Optional[str] = None,
           labels: Optional[Mapping[str, str]] = None,
           locations: Optional[Sequence[str]] = None,
           project: Optional[str] = None,
           reserved_ip_range: Optional[str] = None)
@overload
def Domain(resource_name: str,
           args: DomainArgs,
           opts: Optional[ResourceOptions] = None)
func NewDomain(ctx *Context, name string, args DomainArgs, opts ...ResourceOption) (*Domain, error)
public Domain(string name, DomainArgs args, CustomResourceOptions? opts = null)
public Domain(String name, DomainArgs args)
public Domain(String name, DomainArgs args, CustomResourceOptions options)
type: gcp:activedirectory:Domain
properties: # The arguments to resource properties.
options: # Bag of options to control resource's behavior.

name string
The unique name of the resource.
args DomainArgs
The arguments to resource properties.
opts CustomResourceOptions
Bag of options to control resource's behavior.
resource_name str
The unique name of the resource.
args DomainArgs
The arguments to resource properties.
opts ResourceOptions
Bag of options to control resource's behavior.
ctx Context
Context object for the current deployment.
name string
The unique name of the resource.
args DomainArgs
The arguments to resource properties.
opts ResourceOption
Bag of options to control resource's behavior.
name string
The unique name of the resource.
args DomainArgs
The arguments to resource properties.
opts CustomResourceOptions
Bag of options to control resource's behavior.
name String
The unique name of the resource.
args DomainArgs
The arguments to resource properties.
options CustomResourceOptions
Bag of options to control resource's behavior.

Domain Resource Properties

To learn more about resource properties and how to use them, see Inputs and Outputs in the Architecture and Concepts docs.

Inputs

The Domain resource accepts the following input properties:

DomainName 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.

Locations List<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.

ReservedIpRange 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

Admin string

The name of delegated administrator account used to perform Active Directory operations. If not specified, setupadmin will be used.

AuthorizedNetworks List<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.

Labels Dictionary<string, string>

Resource labels that can contain user-provided metadata

Project string

The ID of the project in which the resource belongs. If it is not provided, the provider project is used.

DomainName 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.

Locations []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.

ReservedIpRange 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

Admin string

The name of delegated administrator account used to perform Active Directory operations. If not specified, setupadmin will be used.

AuthorizedNetworks []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.

Labels map[string]string

Resource labels that can contain user-provided metadata

Project string

The ID of the project in which the resource belongs. If it is not provided, the provider project is used.

domainName 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.

locations List<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.

reservedIpRange 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

admin String

The name of delegated administrator account used to perform Active Directory operations. If not specified, setupadmin will be used.

authorizedNetworks List<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.

labels Map<String,String>

Resource labels that can contain user-provided metadata

project String

The ID of the project in which the resource belongs. If it is not provided, the provider project is used.

domainName 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.

locations 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.

reservedIpRange 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

admin string

The name of delegated administrator account used to perform Active Directory operations. If not specified, setupadmin will be used.

authorizedNetworks 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.

labels {[key: string]: string}

Resource labels that can contain user-provided metadata

project string

The ID of the project in which the resource belongs. If it is not provided, the provider project is used.

domain_name str

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.

locations Sequence[str]

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.

reserved_ip_range str

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

admin str

The name of delegated administrator account used to perform Active Directory operations. If not specified, setupadmin will be used.

authorized_networks Sequence[str]

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.

labels Mapping[str, str]

Resource labels that can contain user-provided metadata

project str

The ID of the project in which the resource belongs. If it is not provided, the provider project is used.

domainName 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.

locations List<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.

reservedIpRange 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

admin String

The name of delegated administrator account used to perform Active Directory operations. If not specified, setupadmin will be used.

authorizedNetworks List<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.

labels Map<String>

Resource labels that can contain user-provided metadata

project String

The ID of the project in which the resource belongs. If it is not provided, the provider project is used.

Outputs

All input properties are implicitly available as output properties. Additionally, the Domain resource produces the following output properties:

Fqdn 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.

Id string

The provider-assigned unique ID for this managed resource.

Name string

The unique name of the domain using the format: 'projects/{project}/locations/global/domains/{domainName}'.

Fqdn 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.

Id string

The provider-assigned unique ID for this managed resource.

Name string

The unique name of the domain using the format: 'projects/{project}/locations/global/domains/{domainName}'.

fqdn 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.

id String

The provider-assigned unique ID for this managed resource.

name String

The unique name of the domain using the format: 'projects/{project}/locations/global/domains/{domainName}'.

fqdn 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.

id string

The provider-assigned unique ID for this managed resource.

name string

The unique name of the domain using the format: 'projects/{project}/locations/global/domains/{domainName}'.

fqdn str

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.

id str

The provider-assigned unique ID for this managed resource.

name str

The unique name of the domain using the format: 'projects/{project}/locations/global/domains/{domainName}'.

fqdn 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.

id String

The provider-assigned unique ID for this managed resource.

name String

The unique name of the domain using the format: 'projects/{project}/locations/global/domains/{domainName}'.

Look up an Existing Domain Resource

Get an existing Domain resource’s state with the given name, ID, and optional extra properties used to qualify the lookup.

public static get(name: string, id: Input<ID>, state?: DomainState, opts?: CustomResourceOptions): Domain
@staticmethod
def get(resource_name: str,
        id: str,
        opts: Optional[ResourceOptions] = None,
        admin: Optional[str] = None,
        authorized_networks: Optional[Sequence[str]] = None,
        domain_name: Optional[str] = None,
        fqdn: Optional[str] = None,
        labels: Optional[Mapping[str, str]] = None,
        locations: Optional[Sequence[str]] = None,
        name: Optional[str] = None,
        project: Optional[str] = None,
        reserved_ip_range: Optional[str] = None) -> Domain
func GetDomain(ctx *Context, name string, id IDInput, state *DomainState, opts ...ResourceOption) (*Domain, error)
public static Domain Get(string name, Input<string> id, DomainState? state, CustomResourceOptions? opts = null)
public static Domain get(String name, Output<String> id, DomainState state, CustomResourceOptions options)
Resource lookup is not supported in YAML
name
The unique name of the resulting resource.
id
The unique provider ID of the resource to lookup.
state
Any extra arguments used during the lookup.
opts
A bag of options that control this resource's behavior.
resource_name
The unique name of the resulting resource.
id
The unique provider ID of the resource to lookup.
name
The unique name of the resulting resource.
id
The unique provider ID of the resource to lookup.
state
Any extra arguments used during the lookup.
opts
A bag of options that control this resource's behavior.
name
The unique name of the resulting resource.
id
The unique provider ID of the resource to lookup.
state
Any extra arguments used during the lookup.
opts
A bag of options that control this resource's behavior.
name
The unique name of the resulting resource.
id
The unique provider ID of the resource to lookup.
state
Any extra arguments used during the lookup.
opts
A bag of options that control this resource's behavior.
The following state arguments are supported:
Admin string

The name of delegated administrator account used to perform Active Directory operations. If not specified, setupadmin will be used.

AuthorizedNetworks List<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.

DomainName 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 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.

Labels Dictionary<string, string>

Resource labels that can contain user-provided metadata

Locations List<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 string

The unique name of the domain using the format: 'projects/{project}/locations/global/domains/{domainName}'.

Project string

The ID of the project in which the resource belongs. If it is not provided, the provider project is used.

ReservedIpRange 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

Admin string

The name of delegated administrator account used to perform Active Directory operations. If not specified, setupadmin will be used.

AuthorizedNetworks []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.

DomainName 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 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.

Labels map[string]string

Resource labels that can contain user-provided metadata

Locations []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 string

The unique name of the domain using the format: 'projects/{project}/locations/global/domains/{domainName}'.

Project string

The ID of the project in which the resource belongs. If it is not provided, the provider project is used.

ReservedIpRange 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

admin String

The name of delegated administrator account used to perform Active Directory operations. If not specified, setupadmin will be used.

authorizedNetworks List<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.

domainName 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 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.

labels Map<String,String>

Resource labels that can contain user-provided metadata

locations List<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 String

The unique name of the domain using the format: 'projects/{project}/locations/global/domains/{domainName}'.

project String

The ID of the project in which the resource belongs. If it is not provided, the provider project is used.

reservedIpRange 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

admin string

The name of delegated administrator account used to perform Active Directory operations. If not specified, setupadmin will be used.

authorizedNetworks 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.

domainName 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 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.

labels {[key: string]: string}

Resource labels that can contain user-provided metadata

locations 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 string

The unique name of the domain using the format: 'projects/{project}/locations/global/domains/{domainName}'.

project string

The ID of the project in which the resource belongs. If it is not provided, the provider project is used.

reservedIpRange 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

admin str

The name of delegated administrator account used to perform Active Directory operations. If not specified, setupadmin will be used.

authorized_networks Sequence[str]

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 str

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 str

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.

labels Mapping[str, str]

Resource labels that can contain user-provided metadata

locations Sequence[str]

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 str

The unique name of the domain using the format: 'projects/{project}/locations/global/domains/{domainName}'.

project str

The ID of the project in which the resource belongs. If it is not provided, the provider project is used.

reserved_ip_range str

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

admin String

The name of delegated administrator account used to perform Active Directory operations. If not specified, setupadmin will be used.

authorizedNetworks List<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.

domainName 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 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.

labels Map<String>

Resource labels that can contain user-provided metadata

locations List<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 String

The unique name of the domain using the format: 'projects/{project}/locations/global/domains/{domainName}'.

project String

The ID of the project in which the resource belongs. If it is not provided, the provider project is used.

reservedIpRange 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

Import

Domain can be imported using any of these accepted formats

 $ pulumi import gcp:activedirectory/domain:Domain default {{name}}

Package Details

Repository
https://github.com/pulumi/pulumi-gcp
License
Apache-2.0
Notes

This Pulumi package is based on the google-beta Terraform Provider.