Repository navigation
Expand file tree
/
Copy pathtemplate.yaml
More file actions
70 lines (63 loc) · 2.3 KB
/
Copy pathtemplate.yaml
File metadata and controls
70 lines (63 loc) · 2.3 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
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
Description: >-
**WARNING** This template creates AWS VPC NAT Gateway.
You will be billed for the AWS resources used if you create a stack from this template.
Parameters:
Tag:
Description: We tag all AWS resources for your convinience.
ConstraintDescription: Forward Slash required
AllowedPattern: '^\S+\/\S+'
Type: String
Default: on-aws/workspaces
BundledId:
Description: >
Amazon WorkSpace Bundle Id.
We want to use Amazon Linux 2 by default. You can use next command line to find related Amazon Workspaces Bundle.
aws workspaces describe-workspace-bundles --owner AMAZON --query "Bundles[?Name=='Standard with Amazon Linux 2']".
Change filter to <<Standard with Windows 10>> if you need Windows.
Type: String
Default: wsb-clj85qzj1
Resources:
VPC:
Type: AWS::CloudFormation::Stack
Properties:
TemplateURL: https://on-aws-us-east-1-master.s3.amazonaws.com/vpc/template.yaml
Parameters:
Tag: !Ref Tag
DIRECTORY:
Type: AWS::CloudFormation::Stack
Properties:
TemplateURL: https://on-aws-us-east-1-master.s3.amazonaws.com/directories/template.yaml
Parameters:
Tag: !Ref Tag
VPC: !GetAtt VPC.Outputs.VPC
PrivateSubnets: !GetAtt VPC.Outputs.PrivateSubnets
CUSTOM:
Type: AWS::CloudFormation::Stack
Properties:
TemplateURL: https://on-aws-us-east-1-master.s3.amazonaws.com/custom/workspaces/template.yaml
Parameters:
Tag: !Ref Tag
EnableWorkSpaces:
Type: Custom::CustomResource
Properties:
ServiceToken: !GetAtt CUSTOM.Outputs.EnableWorkSpacesServiceToken
DirectoryId: !GetAtt DIRECTORY.Outputs.Directory
SubnetIds: # we need only 2 subnets (even if more provided)
- !Select [ 0, !Split [',', !GetAtt VPC.Outputs.PrivateSubnets ]]
- !Select [ 1, !Split [',', !GetAtt VPC.Outputs.PrivateSubnets ]]
#Workspaces:
# Type: AWS::WorkSpaces::Workspace
# DependsOn: CreateUser
# Properties:
# BundleId: !Ref BundledId
# DirectoryId: !Ref DirectoryId
# UserName: test
# WorkspaceProperties:
# ComputeTypeName: STANDARD
# RunningMode: AUTO_STOP
# RunningModeAutoStopTimeoutInMinutes: 60
# Tags:
# - Key: App
# Value: !Ref Tag
# - Key: Name
# Value: !Ref Tag