Class: Chef::Provider::AwsElasticsearchDomain
Constant Summary
Chef::Provisioning::AWSDriver::AWSProvider::AWSResource
Instance Attribute Summary
#purging
Instance Method Summary
collapse
#action_handler, #converge_by, #region, #whyrun_supported?
Instance Method Details
#aws_tagger ⇒ Object
28
29
30
31
32
33
34
35
36
|
# File 'lib/chef/provider/aws_elasticsearch_domain.rb', line 28
def aws_tagger
@aws_tagger ||= begin
strategy = Chef::Provisioning::AWSDriver::TaggingStrategy::Elasticsearch.new(
es_client,
new_resource.aws_object.arn,
new_resource.aws_tags)
Chef::Provisioning::AWSDriver::AWSTagger.new(strategy, action_handler)
end
end
|
38
39
40
|
# File 'lib/chef/provider/aws_elasticsearch_domain.rb', line 38
def converge_tags
aws_tagger.converge_tags
end
|
#create_aws_object ⇒ Object
7
8
9
10
11
|
# File 'lib/chef/provider/aws_elasticsearch_domain.rb', line 7
def create_aws_object
converge_by "create Elasticsearch domain #{new_resource.domain_name}" do
es_client.create_elasticsearch_domain(update_payload)
end
end
|
#destroy_aws_object(domain) ⇒ Object
13
14
15
16
17
|
# File 'lib/chef/provider/aws_elasticsearch_domain.rb', line 13
def destroy_aws_object(domain)
converge_by "destroy Elasticsearch domain #{new_resource.domain_name}" do
es_client.delete_elasticsearch_domain({domain_name: new_resource.domain_name})
end
end
|
#update_aws_object(domain) ⇒ Object
19
20
21
22
23
24
25
26
|
# File 'lib/chef/provider/aws_elasticsearch_domain.rb', line 19
def update_aws_object(domain)
updates = required_updates(domain)
if ! updates.empty?
converge_by updates do
es_client.update_elasticsearch_domain_config(update_payload)
end
end
end
|