Class: Terraformer::Resource::DatadogMonitor

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

Class Method Summary collapse

Instance Method Summary collapse

Methods included from Templating

#apply_template, #template_path

Constructor Details

#initialize(options, client) ⇒ DatadogMonitor

Returns a new instance of DatadogMonitor.



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

def initialize(options, client)
  @credentials = Terraformer::Credentials::Datadog.get_from_options(options) 
  @client = client.new(@credentials[:api_key], @credentials[:app_key])
end

Class Method Details

.execute(options, client: Dogapi::Client) ⇒ Object



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

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

Instance Method Details

#executeObject



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

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