-
Notifications
You must be signed in to change notification settings - Fork 0
/
cloudformation.yaml
89 lines (69 loc) · 2.32 KB
/
cloudformation.yaml
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
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
AWSTemplateFormatVersion: 2010-09-09
Parameters:
VpcId:
Description: VPC Id in which to launch EC2 instances
Type: AWS::EC2::VPC::Id
SubnetIds:
Description: List of Subnet Ids in which to launch EC2 instances
Type: List<AWS::EC2::Subnet::Id>
ContainerImage:
Description: URL for runtime docker container for distribution web application (repository-url/image:tag)
Type: String
UrsServer:
Description: URL for the Earthdata Login server to integrate with
Type: String
Default: https://urs.earthdata.nasa.gov
UrsClientId:
Description: Client ID for your Earthdata Login application
Type: String
UrsAuthCode:
Description: App password for your Earthdata Login application
Type: String
NoEcho: true
LoadBalancerCidrIp:
Description: CIDR block from which the web app will allow traffic
Type: String
Default: 0.0.0.0/0
ElasticSearchCidrIp:
Description: CIDR block from which elasticsearch will allow traffic
Type: String
Outputs:
ProductUrl:
Value: !GetAtt DistributionStack.Outputs.ProductUrl
BrowseUrl:
Value: !GetAtt StorageStack.Outputs.BrowseUrl
UrsRedirectUri:
Value: !GetAtt DistributionStack.Outputs.UrsRedirectUri
PrivateBucket:
Value: !GetAtt StorageStack.Outputs.PrivateBucket
PublicBucket:
Value: !GetAtt StorageStack.Outputs.PublicBucket
KibanaUrl:
Value: !GetAtt LoggingStack.Outputs.KibanaUrl
Resources:
LoggingStack:
Type: AWS::CloudFormation::Stack
Properties:
Parameters:
Name: !Sub "${AWS::StackName}-logging"
ElasticSearchCidrIp: !Ref ElasticSearchCidrIp
TemplateURL: logging/cloudformation.yaml
StorageStack:
Type: AWS::CloudFormation::Stack
Properties:
Parameters:
Name: !Ref AWS::StackName
LogBucket: !GetAtt LoggingStack.Outputs.LogBucket
TemplateURL: storage/cloudformation.yaml
DistributionStack:
Type: AWS::CloudFormation::Stack
Properties:
Parameters:
Name: !Sub "${AWS::StackName}-distribution"
VpcId: !Ref VpcId
SubnetIds: !Join [",", !Ref SubnetIds]
ProductBucket: !GetAtt StorageStack.Outputs.PrivateBucket
ContainerImage: !Ref ContainerImage
UrsClientId: !Ref UrsClientId
UrsAuthCode: !Ref UrsAuthCode
TemplateURL: distribution/cloudformation.yaml