diff options
| author | m-chandler <mchandler89@gmail.com> | 2022-01-25 08:24:26 +1000 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2022-01-25 08:24:26 +1000 |
| commit | 689e3c87a851a331c4b084cc211d5d90b29ce6bd (patch) | |
| tree | b7f0123c24439ed9505927af4cc446485f5f98bd /cf.yml | |
| parent | a3bbdc6fdeaac12ab4de602cd1b82c884ca4d49e (diff) | |
| parent | 7290615791393f15f636eb616e76ae7e7d2384c5 (diff) | |
Merge pull request #20 from apeabody/master
ADD: EFS Improvements
Diffstat (limited to 'cf.yml')
| -rw-r--r-- | cf.yml | 23 |
1 files changed, 12 insertions, 11 deletions
@@ -196,7 +196,11 @@ Resources: Efs:
Type: AWS::EFS::FileSystem
- Properties: {}
+ DeletionPolicy: Retain
+ Properties:
+ LifecyclePolicies:
+ - TransitionToIA: AFTER_7_DAYS
+ - TransitionToPrimaryStorageClass: AFTER_1_ACCESS
MountA:
Type: AWS::EFS::MountTarget
@@ -271,17 +275,10 @@ Resources: UserData:
Fn::Base64: !Sub |
#!/bin/bash -xe
- yum install -y amazon-efs-utils
- mkdir /opt/factorio
- mount -t efs ${Efs}:/ /opt/factorio
- chown 845:845 /opt/factorio
echo ECS_CLUSTER=${EcsCluster} >> /etc/ecs/ecs.config
AutoScalingGroup:
Type: AWS::AutoScaling::AutoScalingGroup
- DependsOn:
- - MountA
- - MountB
Properties:
AutoScalingGroupName: !Sub "${AWS::StackName}-asg"
DesiredCapacity: !FindInMap [ ServerState, !Ref ServerState, DesiredCapacity ]
@@ -339,11 +336,15 @@ Resources: EcsTask:
Type: AWS::ECS::TaskDefinition
+ DependsOn:
+ - MountA
+ - MountB
Properties:
Volumes:
- - Host:
- SourcePath: /opt/factorio
- Name: factorio
+ - Name: factorio
+ EFSVolumeConfiguration:
+ FilesystemId: !Ref Efs
+ TransitEncryption: ENABLED
ContainerDefinitions:
- Name: factorio
MemoryReservation: 1024
|
