module Aws::Templates::Utils::LateBound

Late binding utilities

Late binding is a technique of referencing values which don't exist at the template calculation stage. Examples could be Process ID, SQL record calculated ID or AWS object ARN you're creating through a script or CFN template.

The module provides DSL for creating late binding points known as References.

Public Instance Methods

reference(path = nil, *args) click to toggle source

Create reference

Create and return Reference object attached to the current instance with specified path and arguments

# File lib/aws/templates/utils/late_bound.rb, line 67
def reference(path = nil, *args)
  Reference.new(self, path, args)
end
unknown() click to toggle source

Class-level DSL

# File lib/aws/templates/utils/late_bound.rb, line 74
class_scope do
  ##
  # Wrap reference for postponed instantiation
  #
  # References are instance-level objects so they can be attached only to an instance, not
  # to a class. So, to be able to do that in "default" section in an artifact, for instance,
  # you need to specify a proc/lambda object for the option. This method makes the wrappin
  # unnecessary.
  def reference(path = nil, *args)
    -> { reference(path, *args) }