diff options
| author | Michael Chandler <mchandler89@gmail.com> | 2019-10-06 08:37:15 +1000 |
|---|---|---|
| committer | Michael Chandler <mchandler89@gmail.com> | 2019-10-06 08:37:15 +1000 |
| commit | b8f48b11cb25cb1f1ea77e23e804273894c7c2a2 (patch) | |
| tree | d2d81839748c905944edb4b4a54880a51dbe6523 /cf.yml | |
| parent | 08f2bc231543dd06ced7458236a258279be6ff60 (diff) | |
Allow stack to be deployed multiple times in same region.
Diffstat (limited to 'cf.yml')
| -rw-r--r-- | cf.yml | 20 |
1 files changed, 10 insertions, 10 deletions
@@ -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
|
