Datasets:
GenIaC-SecBench / human_reference_dataset /aws-cloudformation-templates /DirectoryService /DirectoryServiceSimpleAD.json
| { | |
| "AWSTemplateFormatVersion": "2010-09-09", | |
| "Parameters": { | |
| "DomainName": { | |
| "Description": "FQDN of the domain for this directory", | |
| "Type": "String", | |
| "Default": "corp.example.com" | |
| }, | |
| "SimpleADShortName": { | |
| "Description": "Netbios name of the domain for this directory", | |
| "Type": "String", | |
| "Default": "corp" | |
| }, | |
| "CreateAlias": { | |
| "Description": "Only required for applications which need a URL to connect to the directory", | |
| "Type": "String", | |
| "AllowedValues": [ | |
| "true", | |
| "false" | |
| ], | |
| "Default": "false" | |
| }, | |
| "PrivateSubnet1": { | |
| "Description": "Subnet to be used for the Directoty", | |
| "Type": "List<AWS::EC2::Subnet::Id>" | |
| }, | |
| "PrivateSubnet2": { | |
| "Description": "Subnet to be used for the Directoty", | |
| "Type": "List<AWS::EC2::Subnet::Id>" | |
| }, | |
| "VPCID": { | |
| "Description": "The VPC the directory will be created in", | |
| "Type": "List<AWS::EC2::VPC::Id>" | |
| }, | |
| "Size": { | |
| "Description": "Size of the Simple AD", | |
| "Type": "String", | |
| "AllowedValues": [ | |
| "Small", | |
| "Large" | |
| ], | |
| "Default": "Small" | |
| } | |
| }, | |
| "Conditions": { | |
| "Alias": { | |
| "Fn::Equals": [ | |
| { | |
| "Ref": "CreateAlias" | |
| }, | |
| "true" | |
| ] | |
| } | |
| }, | |
| "Resources": { | |
| "SimpleAD": { | |
| "Type": "AWS::DirectoryService::SimpleAD", | |
| "Properties": { | |
| "CreateAlias": false, | |
| "EnableSso": false, | |
| "Name": { | |
| "Ref": "DomainName" | |
| }, | |
| "Password": "{{resolve:secretsmanager:simple-ad-pw:SecretString:pasword}}", | |
| "ShortName": { | |
| "Ref": "SimpleADShortName" | |
| }, | |
| "Size": { | |
| "Ref": "Size" | |
| }, | |
| "VpcSettings": { | |
| "SubnetIds": [ | |
| { | |
| "Fn::Select": [ | |
| "0", | |
| { | |
| "Ref": "PrivateSubnet1" | |
| } | |
| ] | |
| }, | |
| { | |
| "Fn::Select": [ | |
| "0", | |
| { | |
| "Ref": "PrivateSubnet2" | |
| } | |
| ] | |
| } | |
| ], | |
| "VpcId": { | |
| "Fn::Select": [ | |
| "0", | |
| { | |
| "Ref": "VPCID" | |
| } | |
| ] | |
| } | |
| } | |
| } | |
| } | |
| }, | |
| "Outputs": { | |
| "DirectoryID": { | |
| "Description": "ID of the SimpleAD", | |
| "Value": { | |
| "Ref": "SimpleAD" | |
| } | |
| }, | |
| "PrimaryDNS": { | |
| "Description": "DNS IPs of the SimpleAD", | |
| "Value": { | |
| "Fn::Select": [ | |
| 0, | |
| { | |
| "Fn::GetAtt": [ | |
| "SimpleAD", | |
| "DnsIpAddresses" | |
| ] | |
| } | |
| ] | |
| } | |
| }, | |
| "SecondaryDNS": { | |
| "Description": "DNS IPs of the SimpleAD", | |
| "Value": { | |
| "Fn::Select": [ | |
| 1, | |
| { | |
| "Fn::GetAtt": [ | |
| "SimpleAD", | |
| "DnsIpAddresses" | |
| ] | |
| } | |
| ] | |
| } | |
| }, | |
| "DirectoryAlias": { | |
| "Description": "URL for the alias", | |
| "Value": { | |
| "Fn::GetAtt": [ | |
| "SimpleAD", | |
| "Alias" | |
| ] | |
| }, | |
| "Condition": "Alias" | |
| } | |
| } | |
| } | |