class Amigrind::Blueprints::Evaluator::AWSConfigEvaluator
Public Class Methods
new(bp, evaluator, &block)
click to toggle source
# File lib/amigrind/blueprints/evaluator.rb, line 168 def initialize(bp, evaluator, &block) @bp = bp @evaluator = evaluator instance_eval(&block) end
Private Instance Methods
custom(key, value)
click to toggle source
# File lib/amigrind/blueprints/evaluator.rb, line 227 def custom(key, value) raise "custom 'key' must be a Symbol." unless key.is_a?(Symbol) raise "custom 'value' must be non-nil." if value.nil? @bp.aws.custom[key] = value end
method_missing(m, *args)
click to toggle source
# File lib/amigrind/blueprints/evaluator.rb, line 234 def method_missing(m, *args) @bp.aws.send(:"#{m}=", args[0]) end
properties()
click to toggle source
# File lib/amigrind/blueprints/evaluator.rb, line 178 def properties @evaluator.properties end
run_tag(key, value)
click to toggle source
# File lib/amigrind/blueprints/evaluator.rb, line 182 def run_tag(key, value) raise "'key' must be a String." unless key.is_a?(String) raise "'value' must be stringable." unless value.respond_to?(:to_s) @bp.aws.run_tags[key] = value.to_s end
run_volume_tag(key, value)
click to toggle source
# File lib/amigrind/blueprints/evaluator.rb, line 194 def run_volume_tag(key, value) raise "'key' must be a String." unless key.is_a?(String) raise "'value' must be stringable." unless value.respond_to?(:to_s) @bp.aws.run_volume_tags[key] = value.to_s end
security_group(sg_id)
click to toggle source
# File lib/amigrind/blueprints/evaluator.rb, line 220 def security_group(sg_id) regex = Amigrind::Core::SG_REGEX raise "'sg_id' must be a resource (#{regex.source})." unless regex.match(sg_id) @bp.aws.security_group_ids << sg_id end
subnet(subnet_id)
click to toggle source
# File lib/amigrind/blueprints/evaluator.rb, line 213 def subnet(subnet_id) regex = Amigrind::Core::SUBNET_REGEX raise "'subnet_id' must be a resource (#{regex.source})" unless regex.match(subnet_id) @bp.aws.subnet_ids << subnet_id end
vpc(vpc_id)
click to toggle source
# File lib/amigrind/blueprints/evaluator.rb, line 206 def vpc(vpc_id) regex = Amigrind::Core::VPC_REGEX raise "'vpc_id' must be a resource (#{regex.source})" unless regex.match(vpc_id) @bp.aws.vpc_id = vpc_id end