Class: Jets::Cfn::Resource::Codebuild::Fleet

Inherits:
Base
  • Object
show all
Defined in:
lib/jets/cfn/resource/codebuild/fleet.rb

Instance Method Summary collapse

Methods inherited from Base

#attributes, #config, #logical_id, #normalize_tags, #parameters, #properties, #replacements, #replacer, #standarize, #template, truncate_id, #type

Methods included from Util::Camelize

#camelize

Methods included from Util::Logging

#log

Instance Method Details

#base_capacityObject



22
23
24
# File 'lib/jets/cfn/resource/codebuild/fleet.rb', line 22

def base_capacity
  Jets.bootstrap.config.codebuild.fleet.base_capacity
end

#compute_typeObject



26
27
28
# File 'lib/jets/cfn/resource/codebuild/fleet.rb', line 26

def compute_type
  codebuild_properties[:Environment][:ComputeType]
end

#definitionObject



3
4
5
6
7
8
9
10
# File 'lib/jets/cfn/resource/codebuild/fleet.rb', line 3

def definition
  {
    CodebuildFleet: {
      Type: "AWS::CodeBuild::Fleet",
      Properties: props
    }
  }
end

#environment_typeObject



30
31
32
# File 'lib/jets/cfn/resource/codebuild/fleet.rb', line 30

def environment_type
  codebuild_properties[:Environment][:Type]
end

#outputsObject



34
35
36
37
38
# File 'lib/jets/cfn/resource/codebuild/fleet.rb', line 34

def outputs
  {
    "CodebuildFleet" => "!Ref CodebuildFleet"
  }
end

#propsObject



12
13
14
15
16
17
18
19
20
# File 'lib/jets/cfn/resource/codebuild/fleet.rb', line 12

def props
  {
    BaseCapacity: base_capacity,        # Integer
    ComputeType: compute_type,          # String
    EnvironmentType: environment_type   # String
    # Name: "",                         # String
    # Tags: "",                         # [ Tag, ... ]
  }
end