class GeoEngineer::Resources::AwsLambdaFunction
AwsLambdaFunction
is the aws_lambda_function
terrform resource,
{www.terraform.io/docs/providers/aws/r/lambda_function.html Terraform Docs}
Public Class Methods
_fetch_remote_resources(provider)
click to toggle source
# File lib/geoengineer/resources/aws_lambda_function.rb, line 35 def self._fetch_remote_resources(provider) AwsClients.lambda(provider).list_functions['functions'].map(&:to_h).map do |function| function.merge({ _terraform_id: function[:function_name], _geo_id: function[:function_name] }) end end
Public Instance Methods
to_terraform_state()
click to toggle source
Calls superclass method
GeoEngineer::Resource#to_terraform_state
# File lib/geoengineer/resources/aws_lambda_function.rb, line 21 def to_terraform_state tfstate = super tfstate[:primary][:attributes] = { 'function_name' => function_name, 'publish' => (publish || "false"), 's3_bucket' => (s3_bucket || ""), 's3_key' => (s3_key || "") } tfstate[:primary][:attributes]['filename'] = filename if filename tfstate end