Class: Terraformer::Resource::CloudWatchAlarm

Inherits:
Object
  • Object
show all
Includes:
Templating
Defined in:
lib/terraformer/resource/cloud_watch_alarm.rb

Class Method Summary collapse

Instance Method Summary collapse

Methods included from Templating

#apply_template, #template_path

Constructor Details

#initialize(options, client) ⇒ CloudWatchAlarm

Returns a new instance of CloudWatchAlarm.



10
11
12
13
# File 'lib/terraformer/resource/cloud_watch_alarm.rb', line 10

def initialize(options, client)
  @credentials = Terraformer::Credentials::Aws.get_from_options(options)
  @client = client.new(@credentials)
end

Class Method Details

.execute(options, client: Aws::CloudWatch::Client) ⇒ Object



6
7
8
# File 'lib/terraformer/resource/cloud_watch_alarm.rb', line 6

def self.execute(options, client: Aws::CloudWatch::Client)
  self.new(options, client).execute
end

Instance Method Details

#executeObject



15
16
17
# File 'lib/terraformer/resource/cloud_watch_alarm.rb', line 15

def execute
  { tf: tf, tfstate: tfstate }
end