Class: SparkleFormation::Resources::Terraform

Inherits:
SparkleFormation::Resources show all
Extended by:
Bogo::Memoization
Defined in:
lib/sparkle_formation/resources/terraform.rb

Overview

Terraform specific resources collection

Constant Summary collapse

RESOURCE_TYPE_NAMESPACE_SPLITTER =

String to split for resource namespacing

["_"]

Constants inherited from SparkleFormation::Resources

PROPERTY_UPDATE_CONDITIONALS, RESOURCE_TYPE_TR

Class Method Summary collapse

Methods inherited from SparkleFormation::Resources

base_key, load, lookup, register, registry, registry_key, resource, resource_customizer, resource_lookup, resource_type_splitter

Methods included from Utils::AnimalStrings

#camel, #snake

Class Method Details

.included(_klass) ⇒ Object

Auto load data when included



37
38
39
# File 'lib/sparkle_formation/resources/terraform.rb', line 37

def included(_klass)
  load!
end

.load!TrueClass

Load the builtin Terraform resources

Returns:

  • (TrueClass)


20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
# File 'lib/sparkle_formation/resources/terraform.rb', line 20

def load!
  memoize(:terraform_resources, :global) do
    load(
      File.join(
        File.dirname(__FILE__),
        "terraform_resources.json"
      )
    )
    # NOTE: Internal resource type used for nesting
    register("module",
             "properties" => [],
             "full_properties" => {})
    true
  end
end