Sha256: 731a8a1f110414fd9c0b746b687af77ea0f46ef429c23cb90220084e1935d5e6

Contents?: true

Size: 1.39 KB

Versions: 66

Compression:

Stored size: 1.39 KB

Contents

CloudFormation do
  DESCRIPTION ||= 'ecs description'.freeze

  Description DESCRIPTION

  Resource('MyECSCluster') do
    Type 'AWS::ECS::Cluster'
  end

  Resource('MyTaskDef') do
    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
                 }]
               }
             ])
  end

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

Version data entries

66 entries across 66 versions & 1 rubygems

Version Path
cfndsl-0.16.13 sample/ecs.rb
cfndsl-0.16.12 sample/ecs.rb
cfndsl-0.16.11 sample/ecs.rb
cfndsl-0.16.10 sample/ecs.rb
cfndsl-0.16.9 sample/ecs.rb
cfndsl-0.16.8 sample/ecs.rb
cfndsl-0.16.7 sample/ecs.rb
cfndsl-0.16.6 sample/ecs.rb
cfndsl-0.16.5 sample/ecs.rb
cfndsl-0.16.3 sample/ecs.rb
cfndsl-0.16.2 sample/ecs.rb
cfndsl-0.16.1 sample/ecs.rb
cfndsl-0.15.3 sample/ecs.rb
cfndsl-0.15.2 sample/ecs.rb
cfndsl-0.15.1 sample/ecs.rb
cfndsl-0.15.0 sample/ecs.rb
cfndsl-0.14.0 sample/ecs.rb
cfndsl-0.13.1 sample/ecs.rb
cfndsl-0.13.0 sample/ecs.rb
cfndsl-0.12.11 sample/ecs.rb