Sha256: 758e0a11d57bbff1a2e0859e7433fe960a8f5a133672958bb5c6761739b21708

Contents?: true

Size: 1.47 KB

Versions: 17

Compression:

Stored size: 1.47 KB

Contents

module Convection
  module DSL
    ##
    # Formatting helpers for Intrinsic Functions
    module IntrinsicFunctions
      def base64(content)
        {
          'Fn::Base64' => content
        }
      end

      def fn_and(*conditions)
        {
          'Fn::And' => conditions
        }
      end

      def fn_equals(value_1, value_2)
        {
          'Fn::Equals' => [value_1, value_2]
        }
      end

      def fn_if(condition, value_true, value_false)
        {
          'Fn::If' => [condition, value_true, value_false]
        }
      end

      def fn_import_value(value)
        {
          'Fn::ImportValue' => value
        }
      end

      def fn_not(condition)
        {
          'Fn::Not' => [condition]
        }
      end

      def fn_or(*conditions)
        {
          'Fn::Or' => conditions
        }
      end

      def find_in_map(map_name, key_1, key_2)
        {
          'Fn::FindInMap' => [map_name, key_1, key_2]
        }
      end

      def get_att(resource, attr_name)
        {
          'Fn::GetAtt' => [resource, attr_name]
        }
      end

      def get_azs(region)
        {
          'Fn::GetAZs' => region
        }
      end

      def join(delimiter, *values)
        {
          'Fn::Join' => [delimiter, values]
        }
      end

      def select(index, *objects)
        {
          'Fn::Select' => [index, objects]
        }
      end

      def fn_ref(resource)
        {
          'Ref' => resource
        }
      end
    end
  end
end

Version data entries

17 entries across 17 versions & 1 rubygems

Version Path
convection-1.1.2 lib/convection/dsl/intrinsic_functions.rb
convection-1.1.1 lib/convection/dsl/intrinsic_functions.rb
convection-1.1.0 lib/convection/dsl/intrinsic_functions.rb
convection-1.0.7 lib/convection/dsl/intrinsic_functions.rb
convection-1.0.6 lib/convection/dsl/intrinsic_functions.rb
convection-1.0.5 lib/convection/dsl/intrinsic_functions.rb
convection-1.0.4 lib/convection/dsl/intrinsic_functions.rb
convection-1.0.3 lib/convection/dsl/intrinsic_functions.rb
convection-1.0.2 lib/convection/dsl/intrinsic_functions.rb
convection-1.0.1 lib/convection/dsl/intrinsic_functions.rb
convection-1.0.0.pre.beta.10 lib/convection/dsl/intrinsic_functions.rb
convection-1.0.0.pre.beta.9 lib/convection/dsl/intrinsic_functions.rb
convection-1.0.0.pre.beta.8 lib/convection/dsl/intrinsic_functions.rb
convection-1.0.0.pre.beta.7 lib/convection/dsl/intrinsic_functions.rb
convection-1.0.0.pre.beta.6 lib/convection/dsl/intrinsic_functions.rb
convection-1.0.0.pre.beta.4 lib/convection/dsl/intrinsic_functions.rb
convection-1.0.0.pre.beta.1 lib/convection/dsl/intrinsic_functions.rb