UNPKG

@incdevco/framework

Version:
111 lines 3.37 kB
{ "AWSTemplateFormatVersion": "2010-09-09", "Description": "Template to create all resources for each Client.", "Parameters": { "CertificateArn": { "Type": "String" }, "DomainName": { "Type": "String" }, "GoogleClientId": { "Type": "String" }, "Stage": { "Type": "String" } }, "Conditions": { "IsProduction": {"Fn::Equals": [{"Ref": "Stage"}, "production"]} }, "Mappings": {}, "Resources": { "HostedZone": { "Type": "AWS::Route53::HostedZone", "Properties": { "Name": {"Fn::Join": ["", [ {"Fn::If": ["IsProduction", "", "development."]}, {"Ref": "DomainName"} ]]} } }, "LoggingStack": { "Type": "AWS::CloudFormation::Stack", "Properties": { "NotificationARNs": {"Ref": "AWS::NotificationARNs"}, "Parameters": { "AssetsBucket": {"Fn::ImportValue": "AssetsBucket"} }, "TemplateURL": {"Fn::Join": ["", [ "https://s3-", {"Ref": "AWS::Region"}, ".amazonaws.com/", {"Fn::ImportValue": "AssetsBucket"}, "/cloud-formation-templates/main/logging/stack.json" ]]} } }, "UserStack": { "Type": "AWS::CloudFormation::Stack", "Properties": { "NotificationARNs": {"Ref": "AWS::NotificationARNs"}, "Parameters": { "AssetsS3Bucket": {"Fn::ImportValue": "AssetsBucket"}, "GoogleClientId": {"Ref": "GoogleClientId"}, "Stage": {"Ref": "Stage"} }, "TemplateURL": {"Fn::Join": ["", [ "https://s3-", {"Ref": "AWS::Region"}, ".amazonaws.com/", {"Fn::ImportValue": "AssetsBucket"}, "/cloud-formation-templates/main/user/stack.json" ]]} } }, "WebClientStack": { "Type": "AWS::CloudFormation::Stack", "Properties": { "NotificationARNs": {"Ref": "AWS::NotificationARNs"}, "Parameters": { "CertificateArn": {"Ref": "CertificateArn"}, "DomainName": {"Ref": "DomainName"}, "HostedZoneId": {"Ref": "HostedZone"}, "LoggingBucketDomainName": {"Fn::GetAtt": ["LoggingStack", "Outputs.BucketDomainName"]}, "LoggingBucket": {"Fn::GetAtt": ["LoggingStack", "Outputs.BucketName"]}, "Stage": {"Ref": "Stage"} }, "TemplateURL": {"Fn::Join": ["", [ "https://s3-", {"Ref": "AWS::Region"}, ".amazonaws.com/", {"Fn::ImportValue": "AssetsBucket"}, "/cloud-formation-templates/main/web-client/stack.json" ]]} } } }, "Outputs": { "Region": { "Value": {"Ref": "AWS::Region"} }, "CognitoIdentityPoolId": { "Value": {"Fn::GetAtt": ["UserStack", "Outputs.IdentityPoolId"]} }, "CognitoIdentityPoolRegion": { "Value": {"Ref": "AWS::Region"} }, "HostedZoneNameServers": { "Value": {"Fn::Join": [",", {"Fn::GetAtt": ["HostedZone", "NameServers"]}]} }, "WwwClientApiKey": { "Value": {"Fn::GetAtt": ["WebClientStack", "Outputs.WwwClientApiKey"]} }, "WwwClientBucket": { "Value": {"Fn::GetAtt": ["WebClientStack", "Outputs.WwwClientBucket"]} }, "WwwClientUrl": { "Value": {"Fn::GetAtt": ["WebClientStack", "Outputs.WwwClientUrl"]} } } }