Shared Directory
Manages a directory in your account (directory owner) shared with another account (directory consumer).
Example Usage
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.inputs.DirectoryVpcSettingsArgs;
import com.pulumi.aws.directoryservice.SharedDirectory;
import com.pulumi.aws.directoryservice.SharedDirectoryArgs;
import com.pulumi.aws.directoryservice.inputs.SharedDirectoryTargetArgs;
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 exampleDirectory = new Directory("exampleDirectory", DirectoryArgs.builder()
.name("tf-example")
.password("SuperSecretPassw0rd")
.type("MicrosoftAD")
.edition("Standard")
.vpcSettings(DirectoryVpcSettingsArgs.builder()
.vpcId(aws_vpc.example().id())
.subnetIds(aws_subnet.example().stream().map(element -> element.id()).collect(toList()))
.build())
.build());
var exampleSharedDirectory = new SharedDirectory("exampleSharedDirectory", SharedDirectoryArgs.builder()
.directoryId(exampleDirectory.id())
.notes("You wanna have a catch?")
.target(SharedDirectoryTargetArgs.builder()
.id(data.aws_caller_identity().receiver().account_id())
.build())
.build());
}
}
Content copied to clipboard
Import
Directory Service Shared Directories can be imported using the owner directory ID/shared directory ID, e.g.,
$ pulumi import aws:directoryservice/sharedDirectory:SharedDirectory example d-1234567890/d-9267633ece
Content copied to clipboard
Properties
Link copied to clipboard
Identifier of the Managed Microsoft AD directory that you want to share with other accounts.
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Identifier of the directory that is stored in the directory consumer account that corresponds to the shared directory in the owner account.
Link copied to clipboard
Identifier for the directory consumer account with whom the directory is to be shared. See below. The following arguments are optional: