Class: SparkleFormation::SparkleStruct::Azure

Inherits:
SparkleFormation::SparkleStruct show all
Includes:
SparkleFormation::SparkleAttribute, SparkleFormation::SparkleAttribute::Azure
Defined in:
lib/sparkle_formation/sparkle_struct.rb

Overview

Azure specific struct

Instance Method Summary collapse

Constructor Details

This class inherits a constructor from SparkleFormation::SparkleStruct

Dynamic Method Handling

This class handles dynamic methods through the method_missing method in the class SparkleFormation::SparkleStruct

Instance Method Details

#__attribute_key(key) ⇒ String Originally defined in module SparkleFormation::SparkleAttribute

Format the provided key. If symbol type is provided formatting is forced. Otherwise the default formatting is applied

Parameters:

  • key (String, Symbol)

    given key

Returns:

  • (String)

    formatted key

#_depends_on(resource_name) ⇒ Array<String> #_depends_on(resource_names) ⇒ Array<String> #_depends_on(*resource_names) ⇒ Array<String> Also known as: depends_on! Originally defined in module SparkleFormation::SparkleAttribute::Azure

Note:

this will directly modify the struct at its current context to inject depends on structure

Resource dependency generator

Overloads:

  • #_depends_on(resource_name) ⇒ Array<String>

    Parameters:

    • resource_name (String, Symbol)

      logical resource name

  • #_depends_on(resource_names) ⇒ Array<String>

    Parameters:

    • resource_names (Array<String, Symbol>)

      list of logical resource names

  • #_depends_on(*resource_names) ⇒ Array<String>

    Parameters:

    • resource_names (Array<String, Symbol>)

      list of logical resource names

Returns:

  • (Array<String>)

#_dynamic(resource_type, custom_name, options = {}) ⇒ self #_dynamic(dynamic_name, custom_name, options = {}) ⇒ self Also known as: dynamic! Originally defined in module SparkleFormation::SparkleAttribute

Overloads:

  • #_dynamic(resource_type, custom_name, options = {}) ⇒ self
    Note:

    All other options are set into the new resource's properties

    Insert builtin resource

    Parameters:

    • resource_type (String, Symbol)

      provider resource type

    • custom_name (String, Symbol)

      custom name used for resource name generation

    • options (Hash) (defaults to: {})

    Options Hash (options):

    • :resource_name_suffix (String, NilClass)

      custom suffix to use for name generation (defaults to resource_type)

  • #_dynamic(dynamic_name, custom_name, options = {}) ⇒ self
    Note:

    All options are passed to dynamic with custom_name

    Call custom dynamic from available sparkle packs

    Parameters:

    • dynamic_name (Symbol)

      name of registered dynamic

    • custom_name (Symbol, String)

      unique name passed directly to registered dynamic

    • options (Hash) (defaults to: {})

    Options Hash (options):

    • :provider (String, Symbol)

      override provider restriction when fetching dynamic

Yields:

  • (new_struct)

    Provides newly inserted structure

Yield Parameters:

  • new_struct (SparkleStruct)

    newly inserted structure which can be modified

Yield Returns:

  • (Object)

    discarded

Returns:

  • (self)

#_fn_format(*args) ⇒ SparkleFormation::FunctionStruct Originally defined in module SparkleFormation::SparkleAttribute::Azure

Generate a builtin azure function

#_method(sym) ⇒ Method Also known as: method! Originally defined in module SparkleFormation::SparkleAttribute

Note:

usually used as puts! method!(:foo).source_location

Lookup a method definition on self

Parameters:

  • sym (Symbol)

    name of method

Returns:

  • (Method)

See Also:

  • Object#method

#_nest(template, *names, options = {}) ⇒ self Also known as: nest! Originally defined in module SparkleFormation::SparkleAttribute

Nest a stack resource

Parameters:

  • template (String, Symbol)

    name of desired template

  • names (String, Symbol)

    list of optional string/symbol values for resource name generation

  • options (Hash) (defaults to: {})

Options Hash (options):

  • :provider (String, Symbol)

    override provider restriction when fetching template

  • :overwrite_name (Truthy, Falsey)

    when set to true, will not include template name in resource name

  • :parameters (Hash)

    compile time parameter values to pass to nested template

Yields:

  • (new_struct)

    Provides newly inserted structure

Yield Parameters:

  • new_struct (SparkleStruct)

    newly inserted structure which can be modified

Yield Returns:

  • (Object)

    discarded

Returns:

  • (self)

#_puts(obj, ...) ⇒ NilClass Also known as: puts! Originally defined in module SparkleFormation::SparkleAttribute

Print to stdout

Parameters:

  • obj (Object)

    object to print

Returns:

  • (NilClass)

See Also:

  • Kernel.puts

#_raise(*args) ⇒ Object Also known as: raise! Originally defined in module SparkleFormation::SparkleAttribute

Raise an exception

See Also:

  • Kernel.raise

#_registry(name) ⇒ Object #_registry(name, *args, options = {}) ⇒ Object Also known as: registry! Originally defined in module SparkleFormation::SparkleAttribute

Return value of registry item

Overloads:

  • #_registry(name) ⇒ Object

    Return value from registry item with given name

    Parameters:

    • name (String, Symbol)

      registry item name

  • #_registry(name, *args, options = {}) ⇒ Object
    Note:

    args and options will be passed directly to registry item when called

    Pass given parameters to registry item with given name and return the value

    Parameters:

    • name (String, Symbol)

      registry item name

    • options (Hash) (defaults to: {})
    • options (Hash) (defaults to: {})

      :provider override provider restriction when fetching registry item

    • args (Object)

      argument list

Returns:

  • (Object)

    return value of registry item

#_resource_id(resource_name) ⇒ FunctionStruct Also known as: resource_id! Originally defined in module SparkleFormation::SparkleAttribute::Azure

Customized resourceId generator that will perform automatic lookup on defined resources for building the function if Symbol type is provided @param [String, Symbol] name of resource

Returns:

#_resource_nameString Also known as: resource_name! Originally defined in module SparkleFormation::SparkleAttribute

Return current resource name

Returns:

  • (String)

#_stack_output(stack_name, output_name) ⇒ Hash Also known as: stack_output! Originally defined in module SparkleFormation::SparkleAttribute::Azure

Reference output value from nested stack

Parameters:

  • stack_name (String, Symbol)

    logical resource name of stack

  • output_name (String, Symbol)

    stack output name

Returns:

  • (Hash)

#_system(command) ⇒ String Also known as: system! Originally defined in module SparkleFormation::SparkleAttribute

Execute system command

Parameters:

  • command (String)

Returns:

  • (String)

    result

#_variables(*args) ⇒ SparkleFormation::AzureVariableStruct Also known as: variables! Originally defined in module SparkleFormation::SparkleAttribute::Azure

Variables generator