aboutsummaryrefslogtreecommitdiffstats
path: root/cf.yml
diff options
context:
space:
mode:
authorMichael Chandler <mchandler89@gmail.com>2019-10-06 08:37:15 +1000
committerMichael Chandler <mchandler89@gmail.com>2019-10-06 08:37:15 +1000
commitb8f48b11cb25cb1f1ea77e23e804273894c7c2a2 (patch)
treed2d81839748c905944edb4b4a54880a51dbe6523 /cf.yml
parent08f2bc231543dd06ced7458236a258279be6ff60 (diff)
Allow stack to be deployed multiple times in same region.
Diffstat (limited to 'cf.yml')
-rw-r--r--cf.yml20
1 files changed, 10 insertions, 10 deletions
diff --git a/cf.yml b/cf.yml
index bf66dc8..0266074 100644
--- a/cf.yml
+++ b/cf.yml
@@ -209,8 +209,8 @@ Resources:
EfsSg:
Type: AWS::EC2::SecurityGroup
Properties:
- GroupName: factorio-efs
- GroupDescription: factorio-efs
+ GroupName: !Sub "${AWS::StackName}-efs"
+ GroupDescription: !Sub "${AWS::StackName}-efs"
SecurityGroupIngress:
- FromPort: 2049
ToPort: 2049
@@ -225,8 +225,8 @@ Resources:
Ec2Sg:
Type: AWS::EC2::SecurityGroup
Properties:
- GroupName: factorio-ec2
- GroupDescription: factorio-ec2
+ GroupName: !Sub "${AWS::StackName}-ec2"
+ GroupDescription: !Sub "${AWS::StackName}-ec2"
SecurityGroupIngress:
- !If
- IpAddressProvided
@@ -275,7 +275,7 @@ Resources:
- MountA
- MountB
Properties:
- AutoScalingGroupName: factorio
+ AutoScalingGroupName: !Sub "${AWS::StackName}-asg"
DesiredCapacity: !FindInMap [ ServerState, !Ref ServerState, AutoScalingCapacity ]
LaunchConfigurationName: !Ref LaunchConfiguration
MaxSize: !FindInMap [ ServerState, !Ref ServerState, AutoScalingCapacity ]
@@ -316,14 +316,14 @@ Resources:
EcsCluster:
Type: AWS::ECS::Cluster
Properties:
- ClusterName: factorio
+ ClusterName: !Sub "${AWS::StackName}-cluster"
EcsService:
Type: AWS::ECS::Service
Properties:
Cluster: !Ref EcsCluster
DesiredCount: 1
- ServiceName: factorio
+ ServiceName: !Sub "${AWS::StackName}-ecs-service"
TaskDefinition: !Ref EcsTask
DeploymentConfiguration:
MaximumPercent: 100
@@ -418,7 +418,7 @@ Resources:
]
})
Description: Sets Route 53 DNS Record for Factorio
- FunctionName: factorio-set-dns
+ FunctionName: !Sub "${AWS::StackName}-set-dns"
Handler: index.handler
MemorySize: 128
Role: !GetAtt SetDNSRecordLambdaRole.Arn
@@ -437,11 +437,11 @@ Resources:
detail:
AutoScalingGroupName:
- !Ref AutoScalingGroup
- Name: Factorio-Instance-Launch
+ Name: !Sub "${AWS::StackName}-instance-launch"
State: ENABLED
Targets:
- Arn: !GetAtt SetDNSRecordLambda.Arn
- Id: factorio-set-dns
+ Id: !Sub "${AWS::StackName}-set-dns"
LaunchEventLambdaPermission:
Type: AWS::Lambda::Permission
send patches to the email below
yukais@pinapelz.com
include the subject [PATCH repo_name]
pinapelz.com
homepage