1. Registry
  2. Packages
  3. AWS
  4. API Docs
  5. directoryservice
  6. DirectorySetting
Viewing docs for AWS v7.52.1
published on Wednesday, Oct 28, 2026 by Pulumi
aws logo aws logo
Viewing docs for AWS v7.52.1
published on Wednesday, Oct 28, 2026 by Pulumi

    Manages a single configurable setting for an AWS Directory Service directory, such as enabling or disabling a TLS protocol version.

    Example Usage

    Basic Usage

    import * as pulumi from "@pulumi/pulumi";
    import * as aws from "@pulumi/aws";
    
    const exampleDirectory = new aws.directoryservice.Directory("example", {
        vpcSettings: {
            vpcId: exampleAwsVpc.id,
            subnetIds: exampleAwsSubnet.map(__item => __item.id),
        },
        name: "corp.example.com",
        password: "SuperSecretPassw0rd",
        type: "MicrosoftAD",
    });
    const example = new aws.directoryservice.DirectorySetting("example", {
        directoryId: exampleDirectory.id,
        name: "TLS_1_0",
        value: "Disable",
    });
    
    import pulumi
    import pulumi_aws as aws
    
    example_directory = aws.directoryservice.Directory("example",
        vpc_settings={
            "vpc_id": example_aws_vpc["id"],
            "subnet_ids": [__item["id"] for __item in example_aws_subnet],
        },
        name="corp.example.com",
        password="SuperSecretPassw0rd",
        type="MicrosoftAD")
    example = aws.directoryservice.DirectorySetting("example",
        directory_id=example_directory.id,
        name="TLS_1_0",
        value="Disable")
    
    package main
    
    import (
    	"github.com/pulumi/pulumi-aws/sdk/v7/go/aws/directoryservice"
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    )
    func main() {
    pulumi.Run(func(ctx *pulumi.Context) error {
    exampleDirectory, err := directoryservice.NewDirectory(ctx, "example", &directoryservice.DirectoryArgs{
    VpcSettings: &directoryservice.DirectoryVpcSettingsArgs{
    VpcId: pulumi.Any(exampleAwsVpc.Id),
    SubnetIds: pulumi.StringArray(%!v(PANIC=Format method: fatal: A failure has occurred: unlowered splat expression @ example.pp:10,17-39)),
    },
    Name: pulumi.String("corp.example.com"),
    Password: pulumi.String("SuperSecretPassw0rd"),
    Type: pulumi.String("MicrosoftAD"),
    })
    if err != nil {
    return err
    }
    _, err = directoryservice.NewDirectorySetting(ctx, "example", &directoryservice.DirectorySettingArgs{
    DirectoryId: exampleDirectory.ID(),
    Name: pulumi.String("TLS_1_0"),
    Value: pulumi.String("Disable"),
    })
    if err != nil {
    return err
    }
    return nil
    })
    }
    
    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using Aws = Pulumi.Aws;
    
    return await Deployment.RunAsync(() => 
    {
        var exampleDirectory = new Aws.DirectoryService.Directory("example", new()
        {
            VpcSettings = new Aws.DirectoryService.Inputs.DirectoryVpcSettingsArgs
            {
                VpcId = exampleAwsVpc.Id,
                SubnetIds = exampleAwsSubnet.Select(__item => __item.Id).ToList(),
            },
            Name = "corp.example.com",
            Password = "SuperSecretPassw0rd",
            Type = "MicrosoftAD",
        });
    
        var example = new Aws.DirectoryService.DirectorySetting("example", new()
        {
            DirectoryId = exampleDirectory.Id,
            Name = "TLS_1_0",
            Value = "Disable",
        });
    
    });
    
    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.DirectorySetting;
    import com.pulumi.aws.directoryservice.DirectorySettingArgs;
    import java.util.ArrayList;
    import java.util.Arrays;
    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()
                .vpcSettings(DirectoryVpcSettingsArgs.builder()
                    .vpcId(exampleAwsVpc.get("id"))
                    .subnetIds(exampleAwsSubnet.stream().map(element -> element.get("id")).collect(toList()))
                    .build())
                .name("corp.example.com")
                .password("SuperSecretPassw0rd")
                .type("MicrosoftAD")
                .build());
    
            var example = new DirectorySetting("example", DirectorySettingArgs.builder()
                .directoryId(exampleDirectory.id())
                .name("TLS_1_0")
                .value("Disable")
                .build());
    
        }
    }
    
    Example coming soon!
    
    terraform {
      required_providers {
        aws = {
          source = "pulumi/aws"
        }
      }
    }
    
    resource "aws_directoryservice_directory_setting" "example" {
      lifecycle {
        create_before_destroy = true
      }
      directory_id = aws_directoryservice_directory.example.id
      name         = "TLS_1_0"
      value        = "Disable"
    }
    resource "aws_directoryservice_directory" "example" {
      lifecycle {
        create_before_destroy = true
      }
      vpc_settings = {
        vpc_id     = exampleAwsVpc.id
        subnet_ids = exampleAwsSubnet[*].id
      }
      name     = "corp.example.com"
      password = "SuperSecretPassw0rd"
      type     = "MicrosoftAD"
    }
    

    Create DirectorySetting Resource

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

    Constructor syntax

    new DirectorySetting(name: string, args: DirectorySettingArgs, opts?: CustomResourceOptions);
    @overload
    def DirectorySetting(resource_name: str,
                         args: DirectorySettingArgs,
                         opts: Optional[ResourceOptions] = None)
    
    @overload
    def DirectorySetting(resource_name: str,
                         opts: Optional[ResourceOptions] = None,
                         directory_id: Optional[str] = None,
                         value: Optional[str] = None,
                         name: Optional[str] = None,
                         region: Optional[str] = None,
                         timeouts: Optional[DirectorySettingTimeoutsArgs] = None)
    func NewDirectorySetting(ctx *Context, name string, args DirectorySettingArgs, opts ...ResourceOption) (*DirectorySetting, error)
    public DirectorySetting(string name, DirectorySettingArgs args, CustomResourceOptions? opts = null)
    public DirectorySetting(String name, DirectorySettingArgs args)
    public DirectorySetting(String name, DirectorySettingArgs args, CustomResourceOptions options)
    
    type: aws:directoryservice:DirectorySetting
    properties: # The arguments to resource properties.
    options: # Bag of options to control resource's behavior.
    
    
    resource "aws_directoryservice_directory_setting" "name" {
        # resource properties
    }

    Parameters

    name string
    The unique name of the resource.
    args DirectorySettingArgs
    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 DirectorySettingArgs
    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 DirectorySettingArgs
    The arguments to resource properties.
    opts ResourceOption
    Bag of options to control resource's behavior.
    name string
    The unique name of the resource.
    args DirectorySettingArgs
    The arguments to resource properties.
    opts CustomResourceOptions
    Bag of options to control resource's behavior.
    name String
    The unique name of the resource.
    args DirectorySettingArgs
    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 directorySettingResource = new Aws.DirectoryService.DirectorySetting("directorySettingResource", new()
    {
        DirectoryId = "string",
        Value = "string",
        Name = "string",
        Region = "string",
        Timeouts = new Aws.DirectoryService.Inputs.DirectorySettingTimeoutsArgs
        {
            Create = "string",
            Update = "string",
        },
    });
    
    example, err := directoryservice.NewDirectorySetting(ctx, "directorySettingResource", &directoryservice.DirectorySettingArgs{
    	DirectoryId: pulumi.String("string"),
    	Value:       pulumi.String("string"),
    	Name:        pulumi.String("string"),
    	Region:      pulumi.String("string"),
    	Timeouts: &directoryservice.DirectorySettingTimeoutsArgs{
    		Create: pulumi.String("string"),
    		Update: pulumi.String("string"),
    	},
    })
    
    resource "aws_directoryservice_directory_setting" "directorySettingResource" {
      lifecycle {
        create_before_destroy = true
      }
      directory_id = "string"
      value        = "string"
      name         = "string"
      region       = "string"
      timeouts = {
        create = "string"
        update = "string"
      }
    }
    
    var directorySettingResource = new DirectorySetting("directorySettingResource", DirectorySettingArgs.builder()
        .directoryId("string")
        .value("string")
        .name("string")
        .region("string")
        .timeouts(DirectorySettingTimeoutsArgs.builder()
            .create("string")
            .update("string")
            .build())
        .build());
    
    directory_setting_resource = aws.directoryservice.DirectorySetting("directorySettingResource",
        directory_id="string",
        value="string",
        name="string",
        region="string",
        timeouts={
            "create": "string",
            "update": "string",
        })
    
    const directorySettingResource = new aws.directoryservice.DirectorySetting("directorySettingResource", {
        directoryId: "string",
        value: "string",
        name: "string",
        region: "string",
        timeouts: {
            create: "string",
            update: "string",
        },
    });
    
    type: aws:directoryservice:DirectorySetting
    properties:
        directoryId: string
        name: string
        region: string
        timeouts:
            create: string
            update: string
        value: string
    

    DirectorySetting 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 DirectorySetting resource accepts the following input properties:

    DirectoryId string
    ID of the directory.
    Value string

    Value of the directory setting. For example, Disable or Enable.

    The following arguments are optional:

    Name string
    Name of the directory setting. For example, TLS_1_0.
    Region string
    Region where this resource will be managed. Defaults to the Region set in the provider configuration.
    Timeouts DirectorySettingTimeouts
    DirectoryId string
    ID of the directory.
    Value string

    Value of the directory setting. For example, Disable or Enable.

    The following arguments are optional:

    Name string
    Name of the directory setting. For example, TLS_1_0.
    Region string
    Region where this resource will be managed. Defaults to the Region set in the provider configuration.
    Timeouts DirectorySettingTimeoutsArgs
    directory_id string
    ID of the directory.
    value string

    Value of the directory setting. For example, Disable or Enable.

    The following arguments are optional:

    name string
    Name of the directory setting. For example, TLS_1_0.
    region string
    Region where this resource will be managed. Defaults to the Region set in the provider configuration.
    timeouts object
    directoryId String
    ID of the directory.
    value String

    Value of the directory setting. For example, Disable or Enable.

    The following arguments are optional:

    name String
    Name of the directory setting. For example, TLS_1_0.
    region String
    Region where this resource will be managed. Defaults to the Region set in the provider configuration.
    timeouts DirectorySettingTimeouts
    directoryId string
    ID of the directory.
    value string

    Value of the directory setting. For example, Disable or Enable.

    The following arguments are optional:

    name string
    Name of the directory setting. For example, TLS_1_0.
    region string
    Region where this resource will be managed. Defaults to the Region set in the provider configuration.
    timeouts DirectorySettingTimeouts
    directory_id str
    ID of the directory.
    value str

    Value of the directory setting. For example, Disable or Enable.

    The following arguments are optional:

    name str
    Name of the directory setting. For example, TLS_1_0.
    region str
    Region where this resource will be managed. Defaults to the Region set in the provider configuration.
    timeouts DirectorySettingTimeoutsArgs
    directoryId String
    ID of the directory.
    value String

    Value of the directory setting. For example, Disable or Enable.

    The following arguments are optional:

    name String
    Name of the directory setting. For example, TLS_1_0.
    region String
    Region where this resource will be managed. Defaults to the Region set in the provider configuration.
    timeouts Property Map

    Outputs

    All input properties are implicitly available as output properties. Additionally, the DirectorySetting resource produces the following output properties:

    Id string
    The provider-assigned unique ID for this managed resource.
    Type string
    Type of the directory setting.
    Id string
    The provider-assigned unique ID for this managed resource.
    Type string
    Type of the directory setting.
    id string
    The provider-assigned unique ID for this managed resource.
    type string
    Type of the directory setting.
    id String
    The provider-assigned unique ID for this managed resource.
    type String
    Type of the directory setting.
    id string
    The provider-assigned unique ID for this managed resource.
    type string
    Type of the directory setting.
    id str
    The provider-assigned unique ID for this managed resource.
    type str
    Type of the directory setting.
    id String
    The provider-assigned unique ID for this managed resource.
    type String
    Type of the directory setting.

    Look up Existing DirectorySetting Resource

    Get an existing DirectorySetting 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?: DirectorySettingState, opts?: CustomResourceOptions): DirectorySetting
    @staticmethod
    def get(resource_name: str,
            id: str,
            opts: Optional[ResourceOptions] = None,
            directory_id: Optional[str] = None,
            name: Optional[str] = None,
            region: Optional[str] = None,
            timeouts: Optional[DirectorySettingTimeoutsArgs] = None,
            type: Optional[str] = None,
            value: Optional[str] = None) -> DirectorySetting
    func GetDirectorySetting(ctx *Context, name string, id IDInput, state *DirectorySettingState, opts ...ResourceOption) (*DirectorySetting, error)
    public static DirectorySetting Get(string name, Input<string> id, DirectorySettingState? state, CustomResourceOptions? opts = null)
    public static DirectorySetting get(String name, Output<String> id, DirectorySettingState state, CustomResourceOptions options)
    resources:  _:    type: aws:directoryservice:DirectorySetting    get:      id: ${id}
    import {
      to = aws_directoryservice_directory_setting.example
      id = "${id}"
    }
    
    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:
    DirectoryId string
    ID of the directory.
    Name string
    Name of the directory setting. For example, TLS_1_0.
    Region string
    Region where this resource will be managed. Defaults to the Region set in the provider configuration.
    Timeouts DirectorySettingTimeouts
    Type string
    Type of the directory setting.
    Value string

    Value of the directory setting. For example, Disable or Enable.

    The following arguments are optional:

    DirectoryId string
    ID of the directory.
    Name string
    Name of the directory setting. For example, TLS_1_0.
    Region string
    Region where this resource will be managed. Defaults to the Region set in the provider configuration.
    Timeouts DirectorySettingTimeoutsArgs
    Type string
    Type of the directory setting.
    Value string

    Value of the directory setting. For example, Disable or Enable.

    The following arguments are optional:

    directory_id string
    ID of the directory.
    name string
    Name of the directory setting. For example, TLS_1_0.
    region string
    Region where this resource will be managed. Defaults to the Region set in the provider configuration.
    timeouts object
    type string
    Type of the directory setting.
    value string

    Value of the directory setting. For example, Disable or Enable.

    The following arguments are optional:

    directoryId String
    ID of the directory.
    name String
    Name of the directory setting. For example, TLS_1_0.
    region String
    Region where this resource will be managed. Defaults to the Region set in the provider configuration.
    timeouts DirectorySettingTimeouts
    type String
    Type of the directory setting.
    value String

    Value of the directory setting. For example, Disable or Enable.

    The following arguments are optional:

    directoryId string
    ID of the directory.
    name string
    Name of the directory setting. For example, TLS_1_0.
    region string
    Region where this resource will be managed. Defaults to the Region set in the provider configuration.
    timeouts DirectorySettingTimeouts
    type string
    Type of the directory setting.
    value string

    Value of the directory setting. For example, Disable or Enable.

    The following arguments are optional:

    directory_id str
    ID of the directory.
    name str
    Name of the directory setting. For example, TLS_1_0.
    region str
    Region where this resource will be managed. Defaults to the Region set in the provider configuration.
    timeouts DirectorySettingTimeoutsArgs
    type str
    Type of the directory setting.
    value str

    Value of the directory setting. For example, Disable or Enable.

    The following arguments are optional:

    directoryId String
    ID of the directory.
    name String
    Name of the directory setting. For example, TLS_1_0.
    region String
    Region where this resource will be managed. Defaults to the Region set in the provider configuration.
    timeouts Property Map
    type String
    Type of the directory setting.
    value String

    Value of the directory setting. For example, Disable or Enable.

    The following arguments are optional:

    Supporting Types

    DirectorySettingTimeouts, DirectorySettingTimeoutsArgs

    Create string
    A string that can be parsed as a duration consisting of numbers and unit suffixes, such as "30s" or "2h45m". Valid time units are "s" (seconds), "m" (minutes), "h" (hours).
    Update string
    A string that can be parsed as a duration consisting of numbers and unit suffixes, such as "30s" or "2h45m". Valid time units are "s" (seconds), "m" (minutes), "h" (hours).
    Create string
    A string that can be parsed as a duration consisting of numbers and unit suffixes, such as "30s" or "2h45m". Valid time units are "s" (seconds), "m" (minutes), "h" (hours).
    Update string
    A string that can be parsed as a duration consisting of numbers and unit suffixes, such as "30s" or "2h45m". Valid time units are "s" (seconds), "m" (minutes), "h" (hours).
    create string
    A string that can be parsed as a duration consisting of numbers and unit suffixes, such as "30s" or "2h45m". Valid time units are "s" (seconds), "m" (minutes), "h" (hours).
    update string
    A string that can be parsed as a duration consisting of numbers and unit suffixes, such as "30s" or "2h45m". Valid time units are "s" (seconds), "m" (minutes), "h" (hours).
    create String
    A string that can be parsed as a duration consisting of numbers and unit suffixes, such as "30s" or "2h45m". Valid time units are "s" (seconds), "m" (minutes), "h" (hours).
    update String
    A string that can be parsed as a duration consisting of numbers and unit suffixes, such as "30s" or "2h45m". Valid time units are "s" (seconds), "m" (minutes), "h" (hours).
    create string
    A string that can be parsed as a duration consisting of numbers and unit suffixes, such as "30s" or "2h45m". Valid time units are "s" (seconds), "m" (minutes), "h" (hours).
    update string
    A string that can be parsed as a duration consisting of numbers and unit suffixes, such as "30s" or "2h45m". Valid time units are "s" (seconds), "m" (minutes), "h" (hours).
    create str
    A string that can be parsed as a duration consisting of numbers and unit suffixes, such as "30s" or "2h45m". Valid time units are "s" (seconds), "m" (minutes), "h" (hours).
    update str
    A string that can be parsed as a duration consisting of numbers and unit suffixes, such as "30s" or "2h45m". Valid time units are "s" (seconds), "m" (minutes), "h" (hours).
    create String
    A string that can be parsed as a duration consisting of numbers and unit suffixes, such as "30s" or "2h45m". Valid time units are "s" (seconds), "m" (minutes), "h" (hours).
    update String
    A string that can be parsed as a duration consisting of numbers and unit suffixes, such as "30s" or "2h45m". Valid time units are "s" (seconds), "m" (minutes), "h" (hours).

    Import

    Identity Schema

    Required

    • directoryId (String) ID of the directory.
    • name (String) Name of the directory setting.

    Optional

    • accountId (String) AWS Account where this resource is managed.
    • region (String) Region where this resource is managed.

    Using pulumi import, import a directory setting using directory_id,name. For example:

    $ pulumi import aws:directoryservice/directorySetting:DirectorySetting example d-1234567890,TLS_1_0
    

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

    Package Details

    Repository
    AWS Classic pulumi/pulumi-aws
    License
    Apache-2.0
    Notes
    This Pulumi package is based on the aws Terraform Provider.
    aws logo aws logo
    Viewing docs for AWS v7.52.1
    published on Wednesday, Oct 28, 2026 by Pulumi

      Try Pulumi Cloud free.
      Your team will thank you.

      Start free trial