Sha256: 4f981130923e2a76ade7d6dc929d696f5ff2454e375f6771b13d81783569e8bd

Contents?: true

Size: 985 Bytes

Versions: 8

Compression:

Stored size: 985 Bytes

Contents

require 'sparkle_formation'

class SparkleFormation

  # Resources helper
  class Resources

    # Terraform specific resources collection
    class Terraform < Resources

      # String to split for resource namespacing
      RESOURCE_TYPE_NAMESPACE_SPLITTER = ['_']

      class << self

        include Bogo::Memoization

        # Load the builtin Terraform resources
        #
        # @return [TrueClass]
        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

        # Auto load data when included
        def included(_klass)
          load!
        end

      end

    end
  end
end

Version data entries

8 entries across 8 versions & 1 rubygems

Version Path
sparkle_formation-3.0.26 lib/sparkle_formation/resources/terraform.rb
sparkle_formation-3.0.24 lib/sparkle_formation/resources/terraform.rb
sparkle_formation-3.0.22 lib/sparkle_formation/resources/terraform.rb
sparkle_formation-3.0.20 lib/sparkle_formation/resources/terraform.rb
sparkle_formation-3.0.18 lib/sparkle_formation/resources/terraform.rb
sparkle_formation-3.0.16 lib/sparkle_formation/resources/terraform.rb
sparkle_formation-3.0.14 lib/sparkle_formation/resources/terraform.rb
sparkle_formation-3.0.12 lib/sparkle_formation/resources/terraform.rb