-
Notifications
You must be signed in to change notification settings - Fork 33
Expand file tree
/
Copy pathcfn-prereqs-directory.yaml
More file actions
39 lines (36 loc) · 1 KB
/
cfn-prereqs-directory.yaml
File metadata and controls
39 lines (36 loc) · 1 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
AWSTemplateFormatVersion: '2010-09-09'
Description: 'Prereq: Simple AD directory for WorkSpaces tutorials. Uses default VPC.'
Parameters:
DirectoryName:
Type: String
Default: corp.example.com
DirectorySize:
Type: String
Default: Small
AllowedValues: [Small, Large]
VpcId:
Type: AWS::EC2::VPC::Id
Description: VPC for the directory (use default VPC)
SubnetId1:
Type: AWS::EC2::Subnet::Id
Description: First subnet (must be in a different AZ from SubnetId2)
SubnetId2:
Type: AWS::EC2::Subnet::Id
Description: Second subnet (must be in a different AZ from SubnetId1)
Resources:
Directory:
Type: AWS::DirectoryService::SimpleAD
Properties:
Name: !Ref DirectoryName
Password: 'TutorialPass123!'
Size: !Ref DirectorySize
VpcSettings:
VpcId: !Ref VpcId
SubnetIds:
- !Ref SubnetId1
- !Ref SubnetId2
Outputs:
DirectoryId:
Value: !Ref Directory
Export:
Name: !Sub '${AWS::StackName}-DirectoryId'