1. Packages
  2. Google Cloud (GCP) Classic
  3. API Docs
  4. activedirectory
  5. DomainTrust
Google Cloud Classic v6.66.0 published on Monday, Sep 18, 2023 by Pulumi

gcp.activedirectory.DomainTrust

Explore with Pulumi AI

gcp logo
Google Cloud Classic v6.66.0 published on Monday, Sep 18, 2023 by Pulumi

    Adds a trust between Active Directory domains

    To get more information about DomainTrust, see:

    Warning: All arguments including the following potentially sensitive values will be stored in the raw state as plain text: trust_handshake_secret. Read more about sensitive data in state.

    Example Usage

    Active Directory Domain Trust Basic

    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using Gcp = Pulumi.Gcp;
    
    return await Deployment.RunAsync(() => 
    {
        var ad_domain_trust = new Gcp.ActiveDirectory.DomainTrust("ad-domain-trust", new()
        {
            Domain = "test-managed-ad.com",
            TargetDnsIpAddresses = new[]
            {
                "10.1.0.100",
            },
            TargetDomainName = "example-gcp.com",
            TrustDirection = "OUTBOUND",
            TrustHandshakeSecret = "Testing1!",
            TrustType = "FOREST",
        });
    
    });
    
    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.NewDomainTrust(ctx, "ad-domain-trust", &activedirectory.DomainTrustArgs{
    			Domain: pulumi.String("test-managed-ad.com"),
    			TargetDnsIpAddresses: pulumi.StringArray{
    				pulumi.String("10.1.0.100"),
    			},
    			TargetDomainName:     pulumi.String("example-gcp.com"),
    			TrustDirection:       pulumi.String("OUTBOUND"),
    			TrustHandshakeSecret: pulumi.String("Testing1!"),
    			TrustType:            pulumi.String("FOREST"),
    		})
    		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.DomainTrust;
    import com.pulumi.gcp.activedirectory.DomainTrustArgs;
    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_trust = new DomainTrust("ad-domain-trust", DomainTrustArgs.builder()        
                .domain("test-managed-ad.com")
                .targetDnsIpAddresses("10.1.0.100")
                .targetDomainName("example-gcp.com")
                .trustDirection("OUTBOUND")
                .trustHandshakeSecret("Testing1!")
                .trustType("FOREST")
                .build());
    
        }
    }
    
    import pulumi
    import pulumi_gcp as gcp
    
    ad_domain_trust = gcp.activedirectory.DomainTrust("ad-domain-trust",
        domain="test-managed-ad.com",
        target_dns_ip_addresses=["10.1.0.100"],
        target_domain_name="example-gcp.com",
        trust_direction="OUTBOUND",
        trust_handshake_secret="Testing1!",
        trust_type="FOREST")
    
    import * as pulumi from "@pulumi/pulumi";
    import * as gcp from "@pulumi/gcp";
    
    const ad_domain_trust = new gcp.activedirectory.DomainTrust("ad-domain-trust", {
        domain: "test-managed-ad.com",
        targetDnsIpAddresses: ["10.1.0.100"],
        targetDomainName: "example-gcp.com",
        trustDirection: "OUTBOUND",
        trustHandshakeSecret: "Testing1!",
        trustType: "FOREST",
    });
    
    resources:
      ad-domain-trust:
        type: gcp:activedirectory:DomainTrust
        properties:
          domain: test-managed-ad.com
          targetDnsIpAddresses:
            - 10.1.0.100
          targetDomainName: example-gcp.com
          trustDirection: OUTBOUND
          trustHandshakeSecret: Testing1!
          trustType: FOREST
    

    Create DomainTrust Resource

    new DomainTrust(name: string, args: DomainTrustArgs, opts?: CustomResourceOptions);
    @overload
    def DomainTrust(resource_name: str,
                    opts: Optional[ResourceOptions] = None,
                    domain: Optional[str] = None,
                    project: Optional[str] = None,
                    selective_authentication: Optional[bool] = None,
                    target_dns_ip_addresses: Optional[Sequence[str]] = None,
                    target_domain_name: Optional[str] = None,
                    trust_direction: Optional[str] = None,
                    trust_handshake_secret: Optional[str] = None,
                    trust_type: Optional[str] = None)
    @overload
    def DomainTrust(resource_name: str,
                    args: DomainTrustArgs,
                    opts: Optional[ResourceOptions] = None)
    func NewDomainTrust(ctx *Context, name string, args DomainTrustArgs, opts ...ResourceOption) (*DomainTrust, error)
    public DomainTrust(string name, DomainTrustArgs args, CustomResourceOptions? opts = null)
    public DomainTrust(String name, DomainTrustArgs args)
    public DomainTrust(String name, DomainTrustArgs args, CustomResourceOptions options)
    
    type: gcp:activedirectory:DomainTrust
    properties: # The arguments to resource properties.
    options: # Bag of options to control resource's behavior.
    
    
    name string
    The unique name of the resource.
    args DomainTrustArgs
    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 DomainTrustArgs
    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 DomainTrustArgs
    The arguments to resource properties.
    opts ResourceOption
    Bag of options to control resource's behavior.
    name string
    The unique name of the resource.
    args DomainTrustArgs
    The arguments to resource properties.
    opts CustomResourceOptions
    Bag of options to control resource's behavior.
    name String
    The unique name of the resource.
    args DomainTrustArgs
    The arguments to resource properties.
    options CustomResourceOptions
    Bag of options to control resource's behavior.

    DomainTrust 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 DomainTrust resource accepts the following input properties:

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


    TargetDnsIpAddresses List<string>

    The target DNS server IP addresses which can resolve the remote domain involved in the trust.

    TargetDomainName string

    The fully qualified target domain name which will be in trust with the current domain.

    TrustDirection string

    The trust direction, which decides if the current domain is trusted, trusting, or both. Possible values are: INBOUND, OUTBOUND, BIDIRECTIONAL.

    TrustHandshakeSecret string

    The trust secret used for the handshake with the target domain. This will not be stored. Note: This property is sensitive and will not be displayed in the plan.

    TrustType string

    The type of trust represented by the trust resource. Possible values are: FOREST, EXTERNAL.

    Project string

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

    SelectiveAuthentication bool

    Whether the trusted side has forest/domain wide access or selective access to an approved set of resources.

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


    TargetDnsIpAddresses []string

    The target DNS server IP addresses which can resolve the remote domain involved in the trust.

    TargetDomainName string

    The fully qualified target domain name which will be in trust with the current domain.

    TrustDirection string

    The trust direction, which decides if the current domain is trusted, trusting, or both. Possible values are: INBOUND, OUTBOUND, BIDIRECTIONAL.

    TrustHandshakeSecret string

    The trust secret used for the handshake with the target domain. This will not be stored. Note: This property is sensitive and will not be displayed in the plan.

    TrustType string

    The type of trust represented by the trust resource. Possible values are: FOREST, EXTERNAL.

    Project string

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

    SelectiveAuthentication bool

    Whether the trusted side has forest/domain wide access or selective access to an approved set of resources.

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


    targetDnsIpAddresses List<String>

    The target DNS server IP addresses which can resolve the remote domain involved in the trust.

    targetDomainName String

    The fully qualified target domain name which will be in trust with the current domain.

    trustDirection String

    The trust direction, which decides if the current domain is trusted, trusting, or both. Possible values are: INBOUND, OUTBOUND, BIDIRECTIONAL.

    trustHandshakeSecret String

    The trust secret used for the handshake with the target domain. This will not be stored. Note: This property is sensitive and will not be displayed in the plan.

    trustType String

    The type of trust represented by the trust resource. Possible values are: FOREST, EXTERNAL.

    project String

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

    selectiveAuthentication Boolean

    Whether the trusted side has forest/domain wide access or selective access to an approved set of resources.

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


    targetDnsIpAddresses string[]

    The target DNS server IP addresses which can resolve the remote domain involved in the trust.

    targetDomainName string

    The fully qualified target domain name which will be in trust with the current domain.

    trustDirection string

    The trust direction, which decides if the current domain is trusted, trusting, or both. Possible values are: INBOUND, OUTBOUND, BIDIRECTIONAL.

    trustHandshakeSecret string

    The trust secret used for the handshake with the target domain. This will not be stored. Note: This property is sensitive and will not be displayed in the plan.

    trustType string

    The type of trust represented by the trust resource. Possible values are: FOREST, EXTERNAL.

    project string

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

    selectiveAuthentication boolean

    Whether the trusted side has forest/domain wide access or selective access to an approved set of resources.

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


    target_dns_ip_addresses Sequence[str]

    The target DNS server IP addresses which can resolve the remote domain involved in the trust.

    target_domain_name str

    The fully qualified target domain name which will be in trust with the current domain.

    trust_direction str

    The trust direction, which decides if the current domain is trusted, trusting, or both. Possible values are: INBOUND, OUTBOUND, BIDIRECTIONAL.

    trust_handshake_secret str

    The trust secret used for the handshake with the target domain. This will not be stored. Note: This property is sensitive and will not be displayed in the plan.

    trust_type str

    The type of trust represented by the trust resource. Possible values are: FOREST, EXTERNAL.

    project str

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

    selective_authentication bool

    Whether the trusted side has forest/domain wide access or selective access to an approved set of resources.

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


    targetDnsIpAddresses List<String>

    The target DNS server IP addresses which can resolve the remote domain involved in the trust.

    targetDomainName String

    The fully qualified target domain name which will be in trust with the current domain.

    trustDirection String

    The trust direction, which decides if the current domain is trusted, trusting, or both. Possible values are: INBOUND, OUTBOUND, BIDIRECTIONAL.

    trustHandshakeSecret String

    The trust secret used for the handshake with the target domain. This will not be stored. Note: This property is sensitive and will not be displayed in the plan.

    trustType String

    The type of trust represented by the trust resource. Possible values are: FOREST, EXTERNAL.

    project String

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

    selectiveAuthentication Boolean

    Whether the trusted side has forest/domain wide access or selective access to an approved set of resources.

    Outputs

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

    Id string

    The provider-assigned unique ID for this managed resource.

    Id string

    The provider-assigned unique ID for this managed resource.

    id String

    The provider-assigned unique ID for this managed resource.

    id string

    The provider-assigned unique ID for this managed resource.

    id str

    The provider-assigned unique ID for this managed resource.

    id String

    The provider-assigned unique ID for this managed resource.

    Look up Existing DomainTrust Resource

    Get an existing DomainTrust 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?: DomainTrustState, opts?: CustomResourceOptions): DomainTrust
    @staticmethod
    def get(resource_name: str,
            id: str,
            opts: Optional[ResourceOptions] = None,
            domain: Optional[str] = None,
            project: Optional[str] = None,
            selective_authentication: Optional[bool] = None,
            target_dns_ip_addresses: Optional[Sequence[str]] = None,
            target_domain_name: Optional[str] = None,
            trust_direction: Optional[str] = None,
            trust_handshake_secret: Optional[str] = None,
            trust_type: Optional[str] = None) -> DomainTrust
    func GetDomainTrust(ctx *Context, name string, id IDInput, state *DomainTrustState, opts ...ResourceOption) (*DomainTrust, error)
    public static DomainTrust Get(string name, Input<string> id, DomainTrustState? state, CustomResourceOptions? opts = null)
    public static DomainTrust get(String name, Output<String> id, DomainTrustState 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:
    Domain 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.


    Project string

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

    SelectiveAuthentication bool

    Whether the trusted side has forest/domain wide access or selective access to an approved set of resources.

    TargetDnsIpAddresses List<string>

    The target DNS server IP addresses which can resolve the remote domain involved in the trust.

    TargetDomainName string

    The fully qualified target domain name which will be in trust with the current domain.

    TrustDirection string

    The trust direction, which decides if the current domain is trusted, trusting, or both. Possible values are: INBOUND, OUTBOUND, BIDIRECTIONAL.

    TrustHandshakeSecret string

    The trust secret used for the handshake with the target domain. This will not be stored. Note: This property is sensitive and will not be displayed in the plan.

    TrustType string

    The type of trust represented by the trust resource. Possible values are: FOREST, EXTERNAL.

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


    Project string

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

    SelectiveAuthentication bool

    Whether the trusted side has forest/domain wide access or selective access to an approved set of resources.

    TargetDnsIpAddresses []string

    The target DNS server IP addresses which can resolve the remote domain involved in the trust.

    TargetDomainName string

    The fully qualified target domain name which will be in trust with the current domain.

    TrustDirection string

    The trust direction, which decides if the current domain is trusted, trusting, or both. Possible values are: INBOUND, OUTBOUND, BIDIRECTIONAL.

    TrustHandshakeSecret string

    The trust secret used for the handshake with the target domain. This will not be stored. Note: This property is sensitive and will not be displayed in the plan.

    TrustType string

    The type of trust represented by the trust resource. Possible values are: FOREST, EXTERNAL.

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


    project String

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

    selectiveAuthentication Boolean

    Whether the trusted side has forest/domain wide access or selective access to an approved set of resources.

    targetDnsIpAddresses List<String>

    The target DNS server IP addresses which can resolve the remote domain involved in the trust.

    targetDomainName String

    The fully qualified target domain name which will be in trust with the current domain.

    trustDirection String

    The trust direction, which decides if the current domain is trusted, trusting, or both. Possible values are: INBOUND, OUTBOUND, BIDIRECTIONAL.

    trustHandshakeSecret String

    The trust secret used for the handshake with the target domain. This will not be stored. Note: This property is sensitive and will not be displayed in the plan.

    trustType String

    The type of trust represented by the trust resource. Possible values are: FOREST, EXTERNAL.

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


    project string

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

    selectiveAuthentication boolean

    Whether the trusted side has forest/domain wide access or selective access to an approved set of resources.

    targetDnsIpAddresses string[]

    The target DNS server IP addresses which can resolve the remote domain involved in the trust.

    targetDomainName string

    The fully qualified target domain name which will be in trust with the current domain.

    trustDirection string

    The trust direction, which decides if the current domain is trusted, trusting, or both. Possible values are: INBOUND, OUTBOUND, BIDIRECTIONAL.

    trustHandshakeSecret string

    The trust secret used for the handshake with the target domain. This will not be stored. Note: This property is sensitive and will not be displayed in the plan.

    trustType string

    The type of trust represented by the trust resource. Possible values are: FOREST, EXTERNAL.

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


    project str

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

    selective_authentication bool

    Whether the trusted side has forest/domain wide access or selective access to an approved set of resources.

    target_dns_ip_addresses Sequence[str]

    The target DNS server IP addresses which can resolve the remote domain involved in the trust.

    target_domain_name str

    The fully qualified target domain name which will be in trust with the current domain.

    trust_direction str

    The trust direction, which decides if the current domain is trusted, trusting, or both. Possible values are: INBOUND, OUTBOUND, BIDIRECTIONAL.

    trust_handshake_secret str

    The trust secret used for the handshake with the target domain. This will not be stored. Note: This property is sensitive and will not be displayed in the plan.

    trust_type str

    The type of trust represented by the trust resource. Possible values are: FOREST, EXTERNAL.

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


    project String

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

    selectiveAuthentication Boolean

    Whether the trusted side has forest/domain wide access or selective access to an approved set of resources.

    targetDnsIpAddresses List<String>

    The target DNS server IP addresses which can resolve the remote domain involved in the trust.

    targetDomainName String

    The fully qualified target domain name which will be in trust with the current domain.

    trustDirection String

    The trust direction, which decides if the current domain is trusted, trusting, or both. Possible values are: INBOUND, OUTBOUND, BIDIRECTIONAL.

    trustHandshakeSecret String

    The trust secret used for the handshake with the target domain. This will not be stored. Note: This property is sensitive and will not be displayed in the plan.

    trustType String

    The type of trust represented by the trust resource. Possible values are: FOREST, EXTERNAL.

    Import

    DomainTrust can be imported using any of these accepted formats

     $ pulumi import gcp:activedirectory/domainTrust:DomainTrust default projects/{{project}}/locations/global/domains/{{domain}}/{{target_domain_name}}
    
     $ pulumi import gcp:activedirectory/domainTrust:DomainTrust default {{project}}/{{domain}}/{{target_domain_name}}
    
     $ pulumi import gcp:activedirectory/domainTrust:DomainTrust default {{domain}}/{{target_domain_name}}
    

    Package Details

    Repository
    Google Cloud (GCP) Classic pulumi/pulumi-gcp
    License
    Apache-2.0
    Notes

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

    gcp logo
    Google Cloud Classic v6.66.0 published on Monday, Sep 18, 2023 by Pulumi