Sha256: ae9f19870602a686413583b222e75c11daa08515b0cdfdc7fbafad5a3c05cb93
Contents?: true
Size: 867 Bytes
Versions: 15
Compression:
Stored size: 867 Bytes
Contents
module Jets::Cfn::Resource::Nested class Authorizer < Base def initialize(options={}) super @path = options[:path] end def definition logical_id = authorizer_logical_id { logical_id => { Type: "AWS::CloudFormation::Stack", Properties: { TemplateURL: template_url, Parameters: parameters, } } } end def parameters params = Jets::Cfn::Params::Common.parameters params[:RestApi] = "!GetAtt ApiGateway.Outputs.RestApi" params end # map the path to a camelized logical_id. IE: ProtectAuthorizer def authorizer_logical_id regexp = Regexp.new("#{Jets::Names.templates_folder}/authorizers-") authorizer_name = @path.sub(regexp, '').sub('.yml', '') authorizer_name.underscore.camelize end end end
Version data entries
15 entries across 15 versions & 1 rubygems