1. Packages
  2. Azure Classic
  3. API Docs
  4. domainservices
  5. ServiceTrust

We recommend using Azure Native.

Azure v6.10.0 published on Tuesday, Nov 19, 2024 by Pulumi

azure.domainservices.ServiceTrust

Explore with Pulumi AI

azure logo

We recommend using Azure Native.

Azure v6.10.0 published on Tuesday, Nov 19, 2024 by Pulumi

    Manages a Active Directory Domain Service Trust.

    Example Usage

    import * as pulumi from "@pulumi/pulumi";
    import * as azure from "@pulumi/azure";
    
    const example = azure.domainservices.getService({
        name: "example-ds",
        resourceGroupName: "example-rg",
    });
    const exampleServiceTrust = new azure.domainservices.ServiceTrust("example", {
        name: "example-trust",
        domainServiceId: example.then(example => example.id),
        trustedDomainFqdn: "example.com",
        trustedDomainDnsIps: [
            "10.1.0.3",
            "10.1.0.4",
        ],
        password: "Password123",
    });
    
    import pulumi
    import pulumi_azure as azure
    
    example = azure.domainservices.get_service(name="example-ds",
        resource_group_name="example-rg")
    example_service_trust = azure.domainservices.ServiceTrust("example",
        name="example-trust",
        domain_service_id=example.id,
        trusted_domain_fqdn="example.com",
        trusted_domain_dns_ips=[
            "10.1.0.3",
            "10.1.0.4",
        ],
        password="Password123")
    
    package main
    
    import (
    	"github.com/pulumi/pulumi-azure/sdk/v6/go/azure/domainservices"
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		example, err := domainservices.LookupService(ctx, &domainservices.LookupServiceArgs{
    			Name:              "example-ds",
    			ResourceGroupName: "example-rg",
    		}, nil)
    		if err != nil {
    			return err
    		}
    		_, err = domainservices.NewServiceTrust(ctx, "example", &domainservices.ServiceTrustArgs{
    			Name:              pulumi.String("example-trust"),
    			DomainServiceId:   pulumi.String(example.Id),
    			TrustedDomainFqdn: pulumi.String("example.com"),
    			TrustedDomainDnsIps: pulumi.StringArray{
    				pulumi.String("10.1.0.3"),
    				pulumi.String("10.1.0.4"),
    			},
    			Password: pulumi.String("Password123"),
    		})
    		if err != nil {
    			return err
    		}
    		return nil
    	})
    }
    
    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using Azure = Pulumi.Azure;
    
    return await Deployment.RunAsync(() => 
    {
        var example = Azure.DomainServices.GetService.Invoke(new()
        {
            Name = "example-ds",
            ResourceGroupName = "example-rg",
        });
    
        var exampleServiceTrust = new Azure.DomainServices.ServiceTrust("example", new()
        {
            Name = "example-trust",
            DomainServiceId = example.Apply(getServiceResult => getServiceResult.Id),
            TrustedDomainFqdn = "example.com",
            TrustedDomainDnsIps = new[]
            {
                "10.1.0.3",
                "10.1.0.4",
            },
            Password = "Password123",
        });
    
    });
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.azure.domainservices.DomainservicesFunctions;
    import com.pulumi.azure.domainservices.inputs.GetServiceArgs;
    import com.pulumi.azure.domainservices.ServiceTrust;
    import com.pulumi.azure.domainservices.ServiceTrustArgs;
    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) {
            final var example = DomainservicesFunctions.getService(GetServiceArgs.builder()
                .name("example-ds")
                .resourceGroupName("example-rg")
                .build());
    
            var exampleServiceTrust = new ServiceTrust("exampleServiceTrust", ServiceTrustArgs.builder()
                .name("example-trust")
                .domainServiceId(example.applyValue(getServiceResult -> getServiceResult.id()))
                .trustedDomainFqdn("example.com")
                .trustedDomainDnsIps(            
                    "10.1.0.3",
                    "10.1.0.4")
                .password("Password123")
                .build());
    
        }
    }
    
    resources:
      exampleServiceTrust:
        type: azure:domainservices:ServiceTrust
        name: example
        properties:
          name: example-trust
          domainServiceId: ${example.id}
          trustedDomainFqdn: example.com
          trustedDomainDnsIps:
            - 10.1.0.3
            - 10.1.0.4
          password: Password123
    variables:
      example:
        fn::invoke:
          Function: azure:domainservices:getService
          Arguments:
            name: example-ds
            resourceGroupName: example-rg
    

    Create ServiceTrust Resource

    Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.

    Constructor syntax

    new ServiceTrust(name: string, args: ServiceTrustArgs, opts?: CustomResourceOptions);
    @overload
    def ServiceTrust(resource_name: str,
                     args: ServiceTrustArgs,
                     opts: Optional[ResourceOptions] = None)
    
    @overload
    def ServiceTrust(resource_name: str,
                     opts: Optional[ResourceOptions] = None,
                     domain_service_id: Optional[str] = None,
                     password: Optional[str] = None,
                     trusted_domain_dns_ips: Optional[Sequence[str]] = None,
                     trusted_domain_fqdn: Optional[str] = None,
                     name: Optional[str] = None)
    func NewServiceTrust(ctx *Context, name string, args ServiceTrustArgs, opts ...ResourceOption) (*ServiceTrust, error)
    public ServiceTrust(string name, ServiceTrustArgs args, CustomResourceOptions? opts = null)
    public ServiceTrust(String name, ServiceTrustArgs args)
    public ServiceTrust(String name, ServiceTrustArgs args, CustomResourceOptions options)
    
    type: azure:domainservices:ServiceTrust
    properties: # The arguments to resource properties.
    options: # Bag of options to control resource's behavior.
    
    

    Parameters

    name string
    The unique name of the resource.
    args ServiceTrustArgs
    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 ServiceTrustArgs
    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 ServiceTrustArgs
    The arguments to resource properties.
    opts ResourceOption
    Bag of options to control resource's behavior.
    name string
    The unique name of the resource.
    args ServiceTrustArgs
    The arguments to resource properties.
    opts CustomResourceOptions
    Bag of options to control resource's behavior.
    name String
    The unique name of the resource.
    args ServiceTrustArgs
    The arguments to resource properties.
    options CustomResourceOptions
    Bag of options to control resource's behavior.

    Constructor example

    The following reference example uses placeholder values for all input properties.

    var serviceTrustResource = new Azure.DomainServices.ServiceTrust("serviceTrustResource", new()
    {
        DomainServiceId = "string",
        Password = "string",
        TrustedDomainDnsIps = new[]
        {
            "string",
        },
        TrustedDomainFqdn = "string",
        Name = "string",
    });
    
    example, err := domainservices.NewServiceTrust(ctx, "serviceTrustResource", &domainservices.ServiceTrustArgs{
    	DomainServiceId: pulumi.String("string"),
    	Password:        pulumi.String("string"),
    	TrustedDomainDnsIps: pulumi.StringArray{
    		pulumi.String("string"),
    	},
    	TrustedDomainFqdn: pulumi.String("string"),
    	Name:              pulumi.String("string"),
    })
    
    var serviceTrustResource = new ServiceTrust("serviceTrustResource", ServiceTrustArgs.builder()
        .domainServiceId("string")
        .password("string")
        .trustedDomainDnsIps("string")
        .trustedDomainFqdn("string")
        .name("string")
        .build());
    
    service_trust_resource = azure.domainservices.ServiceTrust("serviceTrustResource",
        domain_service_id="string",
        password="string",
        trusted_domain_dns_ips=["string"],
        trusted_domain_fqdn="string",
        name="string")
    
    const serviceTrustResource = new azure.domainservices.ServiceTrust("serviceTrustResource", {
        domainServiceId: "string",
        password: "string",
        trustedDomainDnsIps: ["string"],
        trustedDomainFqdn: "string",
        name: "string",
    });
    
    type: azure:domainservices:ServiceTrust
    properties:
        domainServiceId: string
        name: string
        password: string
        trustedDomainDnsIps:
            - string
        trustedDomainFqdn: string
    

    ServiceTrust Resource Properties

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

    Inputs

    In Python, inputs that are objects can be passed either as argument classes or as dictionary literals.

    The ServiceTrust resource accepts the following input properties:

    DomainServiceId string
    The ID of the Active Directory Domain Service. Changing this forces a new Active Directory Domain Service Trust to be created.
    Password string
    The password of the inbound trust set in the on-premise Active Directory Domain Service.
    TrustedDomainDnsIps List<string>
    Specifies a list of DNS IPs that are used to resolve the on-premise Active Directory Domain Service.
    TrustedDomainFqdn string
    The FQDN of the on-premise Active Directory Domain Service.
    Name string
    The name which should be used for this Active Directory Domain Service Trust. Changing this forces a new Active Directory Domain Service Trust to be created.
    DomainServiceId string
    The ID of the Active Directory Domain Service. Changing this forces a new Active Directory Domain Service Trust to be created.
    Password string
    The password of the inbound trust set in the on-premise Active Directory Domain Service.
    TrustedDomainDnsIps []string
    Specifies a list of DNS IPs that are used to resolve the on-premise Active Directory Domain Service.
    TrustedDomainFqdn string
    The FQDN of the on-premise Active Directory Domain Service.
    Name string
    The name which should be used for this Active Directory Domain Service Trust. Changing this forces a new Active Directory Domain Service Trust to be created.
    domainServiceId String
    The ID of the Active Directory Domain Service. Changing this forces a new Active Directory Domain Service Trust to be created.
    password String
    The password of the inbound trust set in the on-premise Active Directory Domain Service.
    trustedDomainDnsIps List<String>
    Specifies a list of DNS IPs that are used to resolve the on-premise Active Directory Domain Service.
    trustedDomainFqdn String
    The FQDN of the on-premise Active Directory Domain Service.
    name String
    The name which should be used for this Active Directory Domain Service Trust. Changing this forces a new Active Directory Domain Service Trust to be created.
    domainServiceId string
    The ID of the Active Directory Domain Service. Changing this forces a new Active Directory Domain Service Trust to be created.
    password string
    The password of the inbound trust set in the on-premise Active Directory Domain Service.
    trustedDomainDnsIps string[]
    Specifies a list of DNS IPs that are used to resolve the on-premise Active Directory Domain Service.
    trustedDomainFqdn string
    The FQDN of the on-premise Active Directory Domain Service.
    name string
    The name which should be used for this Active Directory Domain Service Trust. Changing this forces a new Active Directory Domain Service Trust to be created.
    domain_service_id str
    The ID of the Active Directory Domain Service. Changing this forces a new Active Directory Domain Service Trust to be created.
    password str
    The password of the inbound trust set in the on-premise Active Directory Domain Service.
    trusted_domain_dns_ips Sequence[str]
    Specifies a list of DNS IPs that are used to resolve the on-premise Active Directory Domain Service.
    trusted_domain_fqdn str
    The FQDN of the on-premise Active Directory Domain Service.
    name str
    The name which should be used for this Active Directory Domain Service Trust. Changing this forces a new Active Directory Domain Service Trust to be created.
    domainServiceId String
    The ID of the Active Directory Domain Service. Changing this forces a new Active Directory Domain Service Trust to be created.
    password String
    The password of the inbound trust set in the on-premise Active Directory Domain Service.
    trustedDomainDnsIps List<String>
    Specifies a list of DNS IPs that are used to resolve the on-premise Active Directory Domain Service.
    trustedDomainFqdn String
    The FQDN of the on-premise Active Directory Domain Service.
    name String
    The name which should be used for this Active Directory Domain Service Trust. Changing this forces a new Active Directory Domain Service Trust to be created.

    Outputs

    All input properties are implicitly available as output properties. Additionally, the ServiceTrust 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 ServiceTrust Resource

    Get an existing ServiceTrust 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?: ServiceTrustState, opts?: CustomResourceOptions): ServiceTrust
    @staticmethod
    def get(resource_name: str,
            id: str,
            opts: Optional[ResourceOptions] = None,
            domain_service_id: Optional[str] = None,
            name: Optional[str] = None,
            password: Optional[str] = None,
            trusted_domain_dns_ips: Optional[Sequence[str]] = None,
            trusted_domain_fqdn: Optional[str] = None) -> ServiceTrust
    func GetServiceTrust(ctx *Context, name string, id IDInput, state *ServiceTrustState, opts ...ResourceOption) (*ServiceTrust, error)
    public static ServiceTrust Get(string name, Input<string> id, ServiceTrustState? state, CustomResourceOptions? opts = null)
    public static ServiceTrust get(String name, Output<String> id, ServiceTrustState 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:
    DomainServiceId string
    The ID of the Active Directory Domain Service. Changing this forces a new Active Directory Domain Service Trust to be created.
    Name string
    The name which should be used for this Active Directory Domain Service Trust. Changing this forces a new Active Directory Domain Service Trust to be created.
    Password string
    The password of the inbound trust set in the on-premise Active Directory Domain Service.
    TrustedDomainDnsIps List<string>
    Specifies a list of DNS IPs that are used to resolve the on-premise Active Directory Domain Service.
    TrustedDomainFqdn string
    The FQDN of the on-premise Active Directory Domain Service.
    DomainServiceId string
    The ID of the Active Directory Domain Service. Changing this forces a new Active Directory Domain Service Trust to be created.
    Name string
    The name which should be used for this Active Directory Domain Service Trust. Changing this forces a new Active Directory Domain Service Trust to be created.
    Password string
    The password of the inbound trust set in the on-premise Active Directory Domain Service.
    TrustedDomainDnsIps []string
    Specifies a list of DNS IPs that are used to resolve the on-premise Active Directory Domain Service.
    TrustedDomainFqdn string
    The FQDN of the on-premise Active Directory Domain Service.
    domainServiceId String
    The ID of the Active Directory Domain Service. Changing this forces a new Active Directory Domain Service Trust to be created.
    name String
    The name which should be used for this Active Directory Domain Service Trust. Changing this forces a new Active Directory Domain Service Trust to be created.
    password String
    The password of the inbound trust set in the on-premise Active Directory Domain Service.
    trustedDomainDnsIps List<String>
    Specifies a list of DNS IPs that are used to resolve the on-premise Active Directory Domain Service.
    trustedDomainFqdn String
    The FQDN of the on-premise Active Directory Domain Service.
    domainServiceId string
    The ID of the Active Directory Domain Service. Changing this forces a new Active Directory Domain Service Trust to be created.
    name string
    The name which should be used for this Active Directory Domain Service Trust. Changing this forces a new Active Directory Domain Service Trust to be created.
    password string
    The password of the inbound trust set in the on-premise Active Directory Domain Service.
    trustedDomainDnsIps string[]
    Specifies a list of DNS IPs that are used to resolve the on-premise Active Directory Domain Service.
    trustedDomainFqdn string
    The FQDN of the on-premise Active Directory Domain Service.
    domain_service_id str
    The ID of the Active Directory Domain Service. Changing this forces a new Active Directory Domain Service Trust to be created.
    name str
    The name which should be used for this Active Directory Domain Service Trust. Changing this forces a new Active Directory Domain Service Trust to be created.
    password str
    The password of the inbound trust set in the on-premise Active Directory Domain Service.
    trusted_domain_dns_ips Sequence[str]
    Specifies a list of DNS IPs that are used to resolve the on-premise Active Directory Domain Service.
    trusted_domain_fqdn str
    The FQDN of the on-premise Active Directory Domain Service.
    domainServiceId String
    The ID of the Active Directory Domain Service. Changing this forces a new Active Directory Domain Service Trust to be created.
    name String
    The name which should be used for this Active Directory Domain Service Trust. Changing this forces a new Active Directory Domain Service Trust to be created.
    password String
    The password of the inbound trust set in the on-premise Active Directory Domain Service.
    trustedDomainDnsIps List<String>
    Specifies a list of DNS IPs that are used to resolve the on-premise Active Directory Domain Service.
    trustedDomainFqdn String
    The FQDN of the on-premise Active Directory Domain Service.

    Import

    Active Directory Domain Service Trusts can be imported using the resource id, e.g.

    $ pulumi import azure:domainservices/serviceTrust:ServiceTrust example /subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/resGroup1/providers/Microsoft.AAD/domainServices/DomainService1/trusts/trust1
    

    To learn more about importing existing cloud resources, see Importing resources.

    Package Details

    Repository
    Azure Classic pulumi/pulumi-azure
    License
    Apache-2.0
    Notes
    This Pulumi package is based on the azurerm Terraform Provider.
    azure logo

    We recommend using Azure Native.

    Azure v6.10.0 published on Tuesday, Nov 19, 2024 by Pulumi