def parse_stack_policy(name, value)
      Cfer::LOGGER.debug "Using #{name} from: #{value}"
      if value.nil?
        {}
      elsif value.is_a?(Hash)
        {"#{name}_body".to_sym => value.to_json}
      elsif value.match(/\A#{URI::regexp(%w[http https s3])}\z/) # looks like a URL
        {"#{name}_url".to_sym => value}
      elsif File.exist?(value)                               # looks like a file to read
        {"#{name}_body".to_sym => File.read(value)}
      elsif is_json?(value)                                   # looks like a JSON string
        {"#{name}_body".to_sym => value}
      else                                                    # none of the above
        raise Cfer::Util::CferError, "Stack policy must be an S3 url, a filename, or a valid json string"
      end
    end
def parse_stack_policy(name, value)
      Cfer::LOGGER.debug "Using #{name} from: #{value}"
      if value.nil?
        {}
      elsif value.is_a?(Hash)
        {"#{name}_body".to_sym => value.to_json}
      elsif value.match(/\A#{URI::regexp(%w[http https s3])}\z/) # looks like a URL
        {"#{name}_url".to_sym => value}
      elsif File.exist?(value)                               # looks like a file to read
        {"#{name}_body".to_sym => File.read(value)}
      elsif is_json?(value)                                   # looks like a JSON string
        {"#{name}_body".to_sym => value}
      else                                                    # none of the above
        raise Cfer::Util::CferError, "Stack policy must be an S3 url, a filename, or a valid json string"
      end
    end
Parses stack-policy-* options as an S3 URL, file to read, or JSON string

 @param name [String] Name of option: 'stack_policy' or 'stack_policy_during_update'
 @param value [String] String containing URL, filename or JSON string
 @return [Hash] Hash suitable for merging into options for create_stack or update_stack