Class: Chef::Provider::AwsInstance
Constant Summary
Chef::Provisioning::AWSDriver::AWSProvider::AWSResource
Instance Attribute Summary
#purging
Instance Method Summary
collapse
#aws_tagger, #converge_tags
#action_handler, #converge_by, #region, #whyrun_supported?
Instance Method Details
#create_aws_object(instance) ⇒ Object
9
|
# File 'lib/chef/provider/aws_instance.rb', line 9
def create_aws_object(instance); end
|
#destroy_aws_object(instance) ⇒ Object
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
|
# File 'lib/chef/provider/aws_instance.rb', line 13
def destroy_aws_object(instance)
message = "delete instance #{new_resource}"
message += " in VPC #{instance.vpc.id}" unless instance.vpc.nil?
message += " in #{region}"
converge_by message do
instance.terminate
end
converge_by "waited until instance #{new_resource} is :terminated" do
instance.wait_until_terminated do |w|
w.delay = 5
w.max_attempts = 60
w.before_wait do |attempts, response|
action_handler.report_progress "waited #{(attempts-1)*5}/#{60*5}s for #{instance.id} status to terminate..."
end
end
end
end
|
#update_aws_object(instance) ⇒ Object
11
|
# File 'lib/chef/provider/aws_instance.rb', line 11
def update_aws_object(instance); end
|