Class: AWS::CloudFormation::Stack
- Inherits:
-
Object
- Object
- AWS::CloudFormation::Stack
- Defined in:
- lib/stacco.rb
Instance Attribute Summary collapse
-
#service_registry ⇒ Object
Returns the value of attribute service_registry.
Instance Method Summary collapse
- #buckets ⇒ Object
- #distributions ⇒ Object
- #elastic_ips ⇒ Object
- #resources_of_type(type_name) ⇒ Object
Instance Attribute Details
#service_registry ⇒ Object
Returns the value of attribute service_registry.
32 33 34 |
# File 'lib/stacco.rb', line 32 def service_registry @service_registry end |
Instance Method Details
#buckets ⇒ Object
42 43 44 |
# File 'lib/stacco.rb', line 42 def buckets self.resources_of_type("S3::Bucket").map{ |res| @service_registry[:s3].buckets[res.physical_resource_id] }.find_all{ |r| r.exists? } end |
#distributions ⇒ Object
38 39 40 |
# File 'lib/stacco.rb', line 38 def distributions self.resources_of_type("CloudFront::Distribution").map{ |res| @service_registry[:cloudfront].distributions[res.physical_resource_id] } end |
#elastic_ips ⇒ Object
46 47 48 |
# File 'lib/stacco.rb', line 46 def elastic_ips self.resources_of_type("EC2::EIP").map{ |res| @service_registry[:ec2].elastic_ips[res.physical_resource_id] } end |
#resources_of_type(type_name) ⇒ Object
34 35 36 |
# File 'lib/stacco.rb', line 34 def resources_of_type(type_name) self.resources.find_all{ |r| r.resource_type == "AWS::#{type_name}" && r.resource_status =~ /_COMPLETE/ && r.resource_status != "DELETE_COMPLETE" } end |