Sha256: eb23b307d8ec0fe6adc3f7c6ef576b6883f69184d7a6a63e7cf6223df8390fec

Contents?: true

Size: 1.12 KB

Versions: 23

Compression:

Stored size: 1.12 KB

Contents

CloudFormation {
  DESCRIPTION ||= "ecs description"

  Description DESCRIPTION

  Resource('MyECSCluster') {
    Type 'AWS::ECS::Cluster'
  }

  Resource('MyTaskDef') {
    Type 'AWS::ECS::Service'
    Property('ContainerDefinitions', [
      {
        Command: ['echo hello'],
        Cpu: 300,
        EntryPoint: ['/bin/bash'],
        Environment: [{
          Name: 'test',
          Value: 'testvalue'
        }],
        Essential: true,
        Image: 'ubuntu:latest',
        Links: ['myothercontainer'],
        Memory: 1024,
        MountPoints: [{
          ContainerPath: '/var/log',
          SourceVolume: 'log_volume',
          ReadOnly: false
        }],
        Name: 'MyTaskDef',
        PortMappings: [{
          ContainerPort: 80,
          HostPort: 8080
        }],
        VolumesFrom: [{
          SourceContainer: 'myothercontainer',
          ReadOnly: true
        }]

      }
    ])
  }

  Resource('MyECSService') {
    Type 'AWS::ECS::Service'
    Property('Cluster', Ref('MyECSCluster'))
    Property('DesiredCount', 10)
    Property('Role', 'ecsServiceRole')
    Property('TaskDefinition', 'MyTask:1')
  }
}

Version data entries

23 entries across 23 versions & 1 rubygems

Version Path
cfndsl-0.4.4 sample/ecs.rb
cfndsl-0.4.3 sample/ecs.rb
cfndsl-0.4.2 sample/ecs.rb
cfndsl-0.4.1 sample/ecs.rb
cfndsl-0.4.0 sample/ecs.rb
cfndsl-0.3.6 sample/ecs.rb
cfndsl-0.3.5 sample/ecs.rb
cfndsl-0.3.4 sample/ecs.rb
cfndsl-0.3.3 sample/ecs.rb
cfndsl-0.3.2 sample/ecs.rb
cfndsl-0.3.1 sample/ecs.rb
cfndsl-0.2.9 sample/ecs.rb
cfndsl-0.2.8 sample/ecs.rb
cfndsl-0.3.0 sample/ecs.rb
cfndsl-0.2.7 sample/ecs.rb
cfndsl-0.2.4 sample/ecs.rb
cfndsl-0.2.3 sample/ecs.rb
cfndsl-0.2.2 sample/ecs.rb
cfndsl-0.2.1 sample/ecs.rb
cfndsl-0.2.0 sample/ecs.rb