Package com.pulumi.aws.directoryservice
Class Trust
- java.lang.Object
-
- com.pulumi.resources.Resource
-
- com.pulumi.resources.CustomResource
-
- com.pulumi.aws.directoryservice.Trust
-
public class Trust extends com.pulumi.resources.CustomResource
Manages a trust relationship between two Active Directory Directories. The directories may either be both AWS Managed Microsoft AD domains or an AWS Managed Microsoft AD domain and a self-managed Active Directory Domain. The Trust relationship must be configured on both sides of the relationship. If a Trust has only been created on one side, it will be in the state `VerifyFailed`. Once the second Trust is created, the first will update to the correct state. ## Example Usage ### Two-Way Trust <!--Start PulumiCodeChooser --> ```java package generated_program; import com.pulumi.Context; import com.pulumi.Pulumi; import com.pulumi.core.Output; import com.pulumi.aws.directoryservice.Directory; import com.pulumi.aws.directoryservice.DirectoryArgs; import com.pulumi.aws.directoryservice.Trust; import com.pulumi.aws.directoryservice.TrustArgs; 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 oneDirectory = new Directory("oneDirectory", DirectoryArgs.builder() .name("one.example.com") .type("MicrosoftAD") .build()); var twoDirectory = new Directory("twoDirectory", DirectoryArgs.builder() .name("two.example.com") .type("MicrosoftAD") .build()); var one = new Trust("one", TrustArgs.builder() .directoryId(oneDirectory.id()) .remoteDomainName(twoDirectory.name()) .trustDirection("Two-Way") .trustPassword("Some0therPassword") .conditionalForwarderIpAddrs(twoDirectory.dnsIpAddresses()) .build()); var two = new Trust("two", TrustArgs.builder() .directoryId(twoDirectory.id()) .remoteDomainName(oneDirectory.name()) .trustDirection("Two-Way") .trustPassword("Some0therPassword") .conditionalForwarderIpAddrs(oneDirectory.dnsIpAddresses()) .build()); } } ``` <!--End PulumiCodeChooser --> ### One-Way Trust <!--Start PulumiCodeChooser --> ```java package generated_program; import com.pulumi.Context; import com.pulumi.Pulumi; import com.pulumi.core.Output; import com.pulumi.aws.directoryservice.Directory; import com.pulumi.aws.directoryservice.DirectoryArgs; import com.pulumi.aws.directoryservice.Trust; import com.pulumi.aws.directoryservice.TrustArgs; 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 oneDirectory = new Directory("oneDirectory", DirectoryArgs.builder() .name("one.example.com") .type("MicrosoftAD") .build()); var twoDirectory = new Directory("twoDirectory", DirectoryArgs.builder() .name("two.example.com") .type("MicrosoftAD") .build()); var one = new Trust("one", TrustArgs.builder() .directoryId(oneDirectory.id()) .remoteDomainName(twoDirectory.name()) .trustDirection("One-Way: Incoming") .trustPassword("Some0therPassword") .conditionalForwarderIpAddrs(twoDirectory.dnsIpAddresses()) .build()); var two = new Trust("two", TrustArgs.builder() .directoryId(twoDirectory.id()) .remoteDomainName(oneDirectory.name()) .trustDirection("One-Way: Outgoing") .trustPassword("Some0therPassword") .conditionalForwarderIpAddrs(oneDirectory.dnsIpAddresses()) .build()); } } ``` <!--End PulumiCodeChooser --> ## Import Using `pulumi import`, import the Trust relationship using the directory ID and remote domain name, separated by a `/`. For example: ```sh $ pulumi import aws:directoryservice/trust:Trust example d-926724cf57/directory.example.com ```
-
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description com.pulumi.core.Output<java.util.Optional<java.util.List<java.lang.String>>>
conditionalForwarderIpAddrs()
com.pulumi.core.Output<java.lang.String>
createdDateTime()
com.pulumi.core.Output<java.lang.Boolean>
deleteAssociatedConditionalForwarder()
com.pulumi.core.Output<java.lang.String>
directoryId()
static Trust
get(java.lang.String name, com.pulumi.core.Output<java.lang.String> id, TrustState state, com.pulumi.resources.CustomResourceOptions options)
Get an existing Host resource's state with the given name, ID, and optional extra properties used to qualify the lookup.com.pulumi.core.Output<java.lang.String>
lastUpdatedDateTime()
com.pulumi.core.Output<java.lang.String>
remoteDomainName()
com.pulumi.core.Output<java.lang.String>
selectiveAuth()
com.pulumi.core.Output<java.lang.String>
stateLastUpdatedDateTime()
com.pulumi.core.Output<java.lang.String>
trustDirection()
com.pulumi.core.Output<java.lang.String>
trustPassword()
com.pulumi.core.Output<java.lang.String>
trustState()
com.pulumi.core.Output<java.lang.String>
trustStateReason()
com.pulumi.core.Output<java.lang.String>
trustType()
-
-
-
Constructor Detail
-
Trust
public Trust(java.lang.String name)
- Parameters:
name
- The _unique_ name of the resulting resource.
-
Trust
public Trust(java.lang.String name, TrustArgs args)
- Parameters:
name
- The _unique_ name of the resulting resource.args
- The arguments to use to populate this resource's properties.
-
Trust
public Trust(java.lang.String name, TrustArgs args, @Nullable com.pulumi.resources.CustomResourceOptions options)
- Parameters:
name
- The _unique_ name of the resulting resource.args
- The arguments to use to populate this resource's properties.options
- A bag of options that control this resource's behavior.
-
-
Method Detail
-
conditionalForwarderIpAddrs
public com.pulumi.core.Output<java.util.Optional<java.util.List<java.lang.String>>> conditionalForwarderIpAddrs()
- Returns:
- Set of IPv4 addresses for the DNS server associated with the remote Directory. Can contain between 1 and 4 values.
-
createdDateTime
public com.pulumi.core.Output<java.lang.String> createdDateTime()
- Returns:
- Date and time when the Trust was created.
-
deleteAssociatedConditionalForwarder
public com.pulumi.core.Output<java.lang.Boolean> deleteAssociatedConditionalForwarder()
- Returns:
- Whether to delete the conditional forwarder when deleting the Trust relationship.
-
directoryId
public com.pulumi.core.Output<java.lang.String> directoryId()
- Returns:
- ID of the Directory.
-
lastUpdatedDateTime
public com.pulumi.core.Output<java.lang.String> lastUpdatedDateTime()
- Returns:
- Date and time when the Trust was last updated.
-
remoteDomainName
public com.pulumi.core.Output<java.lang.String> remoteDomainName()
- Returns:
- Fully qualified domain name of the remote Directory.
-
selectiveAuth
public com.pulumi.core.Output<java.lang.String> selectiveAuth()
- Returns:
- Whether to enable selective authentication. Valid values are `Enabled` and `Disabled`. Default value is `Disabled`.
-
stateLastUpdatedDateTime
public com.pulumi.core.Output<java.lang.String> stateLastUpdatedDateTime()
- Returns:
- Date and time when the Trust state in `trust_state` was last updated.
-
trustDirection
public com.pulumi.core.Output<java.lang.String> trustDirection()
- Returns:
- The direction of the Trust relationship. Valid values are `One-Way: Outgoing`, `One-Way: Incoming`, and `Two-Way`.
-
trustPassword
public com.pulumi.core.Output<java.lang.String> trustPassword()
- Returns:
- Password for the Trust. Does not need to match the passwords for either Directory. Can contain upper- and lower-case letters, numbers, and punctuation characters. May be up to 128 characters long.
-
trustState
public com.pulumi.core.Output<java.lang.String> trustState()
- Returns:
- State of the Trust relationship. One of `Created`, `VerifyFailed`,`Verified`, `UpdateFailed`,`Updated`,`Deleted`, or `Failed`.
-
trustStateReason
public com.pulumi.core.Output<java.lang.String> trustStateReason()
- Returns:
- Reason for the Trust state set in `trust_state`.
-
trustType
public com.pulumi.core.Output<java.lang.String> trustType()
- Returns:
- Type of the Trust relationship. Valid values are `Forest` and `External`. Default value is `Forest`.
-
get
public static Trust get(java.lang.String name, com.pulumi.core.Output<java.lang.String> id, @Nullable TrustState state, @Nullable com.pulumi.resources.CustomResourceOptions options)
Get an existing Host resource's state with the given name, ID, and optional extra properties used to qualify the lookup.- Parameters:
name
- The _unique_ name of the resulting resource.id
- The _unique_ provider ID of the resource to lookup.state
-options
- Optional settings to control the behavior of the CustomResource.
-
-