Skip to content

azurermActiveDirectoryDomainServiceTrust

Manages a Active Directory Domain Service Trust.

Example Usage

/*Provider bindings are generated by running cdktf get.
See https://cdk.tf/provider-generation for more details.*/
import * as azurerm from "./.gen/providers/azurerm";
/*The following providers are missing schema information and might need manual adjustments to synthesize correctly: azurerm.
For a more precise conversion please use the --provider flag in convert.*/
new azurerm.provider.AzurermProvider(this, "azurerm", {
  features: [{}],
});
const dataAzurermActiveDirectoryDomainServiceExample =
  new azurerm.dataAzurermActiveDirectoryDomainService.DataAzurermActiveDirectoryDomainService(
    this,
    "example",
    {
      name: "example-ds",
      resource_group_name: "example-rg",
    }
  );
const azurermActiveDirectoryDomainServiceTrustExample =
  new azurerm.activeDirectoryDomainServiceTrust.ActiveDirectoryDomainServiceTrust(
    this,
    "example_2",
    {
      domain_service_id: dataAzurermActiveDirectoryDomainServiceExample.id,
      name: "example-trust",
      password: "Password123",
      trusted_domain_dns_ips: ["10.1.0.3", "10.1.0.4"],
      trusted_domain_fqdn: "example.com",
    }
  );
/*This allows the Terraform resource name to match the original name. You can remove the call if you don't need them to match.*/
azurermActiveDirectoryDomainServiceTrustExample.overrideLogicalId("example");

Arguments Reference

The following arguments are supported:

  • domainServiceId - (Required) The ID of the Active Directory Domain Service. Changing this forces a new Active Directory Domain Service Trust to be created.

  • name - (Required) 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 - (Required) The password of the inbound trust set in the on-premise Active Directory Domain Service.

  • trustedDomainDnsIps - (Required) Specifies a list of DNS IPs that are used to resolve the on-premise Active Directory Domain Service.

  • trustedDomainFqdn - (Required) The FQDN of the on-premise Active Directory Domain Service.

Attributes Reference

In addition to the Arguments listed above - the following Attributes are exported:

  • id - The ID of the Active Directory Domain Service Trust.

Timeouts

The timeouts block allows you to specify timeouts for certain actions:

  • create - (Defaults to 30 minutes) Used when creating the Active Directory Domain Service Trust.
  • read - (Defaults to 5 minutes) Used when retrieving the Active Directory Domain Service Trust.
  • update - (Defaults to 30 minutes) Used when updating the Active Directory Domain Service Trust.
  • delete - (Defaults to 30 minutes) Used when deleting the Active Directory Domain Service Trust.

Import

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

terraform import azurerm_active_directory_domain_service_trust.example /subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/resGroup1/providers/Microsoft.AAD/domainServices/DomainService1/trusts/trust1