Sha256: 678bc2b9fe4174e1189eafca7d1f1dee91d30f4ba9467c5fe2a9817196ba9fb6

Contents?: true

Size: 1.42 KB

Versions: 31

Compression:

Stored size: 1.42 KB

Contents

# frozen_string_literal: true

CloudFormation do
  DESCRIPTION ||= 'ecs description'

  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

31 entries across 31 versions & 1 rubygems

Version Path
cfndsl-1.7.2 sample/ecs.rb
cfndsl-1.6.0 sample/ecs.rb
cfndsl-1.5.0 sample/ecs.rb
cfndsl-1.4.0 sample/ecs.rb
cfndsl-1.3.9 sample/ecs.rb
cfndsl-1.3.8 sample/ecs.rb
cfndsl-1.3.7 sample/ecs.rb
cfndsl-1.3.6 sample/ecs.rb
cfndsl-1.3.5 sample/ecs.rb
cfndsl-1.3.4 sample/ecs.rb
cfndsl-1.3.3 sample/ecs.rb
cfndsl-1.3.2 sample/ecs.rb
cfndsl-1.3.1 sample/ecs.rb
cfndsl-1.3.0 sample/ecs.rb
cfndsl-1.2.0 sample/ecs.rb
cfndsl-1.1.1 sample/ecs.rb
cfndsl-1.1.0 sample/ecs.rb
cfndsl-1.0.6 sample/ecs.rb
cfndsl-1.0.5 sample/ecs.rb
cfndsl-1.0.4 sample/ecs.rb