azure logo
Azure Classic v5.32.0, Jan 25 23

azure.domainservices.ServiceTrust

Manages a Active Directory Domain Service Trust.

Example Usage

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

return await Deployment.RunAsync(() => 
{
    var exampleService = Azure.DomainServices.GetService.Invoke(new()
    {
        Name = "example-ds",
        ResourceGroupName = "example-rg",
    });

    var exampleServiceTrust = new Azure.DomainServices.ServiceTrust("exampleServiceTrust", new()
    {
        DomainServiceId = exampleService.Apply(getServiceResult => getServiceResult.Id),
        TrustedDomainFqdn = "example.com",
        TrustedDomainDnsIps = new[]
        {
            "10.1.0.3",
            "10.1.0.4",
        },
        Password = "Password123",
    });

});
package main

import (
	"github.com/pulumi/pulumi-azure/sdk/v5/go/azure/domainservices"
	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)

func main() {
	pulumi.Run(func(ctx *pulumi.Context) error {
		exampleService, err := domainservices.LookupService(ctx, &domainservices.LookupServiceArgs{
			Name:              "example-ds",
			ResourceGroupName: "example-rg",
		}, nil)
		if err != nil {
			return err
		}
		_, err = domainservices.NewServiceTrust(ctx, "exampleServiceTrust", &domainservices.ServiceTrustArgs{
			DomainServiceId:   *pulumi.String(exampleService.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
	})
}
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 exampleService = DomainservicesFunctions.getService(GetServiceArgs.builder()
            .name("example-ds")
            .resourceGroupName("example-rg")
            .build());

        var exampleServiceTrust = new ServiceTrust("exampleServiceTrust", ServiceTrustArgs.builder()        
            .domainServiceId(exampleService.applyValue(getServiceResult -> getServiceResult.id()))
            .trustedDomainFqdn("example.com")
            .trustedDomainDnsIps(            
                "10.1.0.3",
                "10.1.0.4")
            .password("Password123")
            .build());

    }
}
import pulumi
import pulumi_azure as azure

example_service = azure.domainservices.get_service(name="example-ds",
    resource_group_name="example-rg")
example_service_trust = azure.domainservices.ServiceTrust("exampleServiceTrust",
    domain_service_id=example_service.id,
    trusted_domain_fqdn="example.com",
    trusted_domain_dns_ips=[
        "10.1.0.3",
        "10.1.0.4",
    ],
    password="Password123")
import * as pulumi from "@pulumi/pulumi";
import * as azure from "@pulumi/azure";

const exampleService = azure.domainservices.getService({
    name: "example-ds",
    resourceGroupName: "example-rg",
});
const exampleServiceTrust = new azure.domainservices.ServiceTrust("exampleServiceTrust", {
    domainServiceId: exampleService.then(exampleService => exampleService.id),
    trustedDomainFqdn: "example.com",
    trustedDomainDnsIps: [
        "10.1.0.3",
        "10.1.0.4",
    ],
    password: "Password123",
});
resources:
  exampleServiceTrust:
    type: azure:domainservices:ServiceTrust
    properties:
      domainServiceId: ${exampleService.id}
      trustedDomainFqdn: example.com
      trustedDomainDnsIps:
        - 10.1.0.3
        - 10.1.0.4
      password: Password123
variables:
  exampleService:
    fn::invoke:
      Function: azure:domainservices:getService
      Arguments:
        name: example-ds
        resourceGroupName: example-rg

Create ServiceTrust Resource

new ServiceTrust(name: string, args: ServiceTrustArgs, opts?: CustomResourceOptions);
@overload
def ServiceTrust(resource_name: 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)
@overload
def ServiceTrust(resource_name: str,
                 args: ServiceTrustArgs,
                 opts: Optional[ResourceOptions] = 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.

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.

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

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

Package Details

Repository
Azure Classic pulumi/pulumi-azure
License
Apache-2.0
Notes

This Pulumi package is based on the azurerm Terraform Provider.