Class: Jets::Resource::ChildStack::Authorizer
- Includes:
- CommonParameters
- Defined in:
- lib/jets/resource/child_stack/authorizer.rb
Instance Method Summary collapse
-
#authorizer_logical_id ⇒ Object
map the path to a camelized logical_id.
- #definition ⇒ Object
-
#initialize(s3_bucket, options = {}) ⇒ Authorizer
constructor
A new instance of Authorizer.
- #parameters ⇒ Object
- #template_filename ⇒ Object
Methods included from CommonParameters
Methods inherited from Base
Methods inherited from Base
Constructor Details
#initialize(s3_bucket, options = {}) ⇒ Authorizer
Returns a new instance of Authorizer.
5 6 7 8 |
# File 'lib/jets/resource/child_stack/authorizer.rb', line 5 def initialize(s3_bucket, ={}) super @path = [:path] end |
Instance Method Details
#authorizer_logical_id ⇒ Object
map the path to a camelized logical_id. IE: ProtectAuthorizer
30 31 32 33 34 |
# File 'lib/jets/resource/child_stack/authorizer.rb', line 30 def regexp = Regexp.new(".*#{Jets.config.project_namespace}-authorizers-") = @path.sub(regexp, '').sub('.yml', '') .underscore.camelize end |
#definition ⇒ Object
10 11 12 13 14 15 16 17 18 19 20 21 |
# File 'lib/jets/resource/child_stack/authorizer.rb', line 10 def definition logical_id = { logical_id => { type: "AWS::CloudFormation::Stack", properties: { template_url: template_url, parameters: parameters, } } } end |
#parameters ⇒ Object
23 24 25 26 27 |
# File 'lib/jets/resource/child_stack/authorizer.rb', line 23 def parameters params = common_parameters params[:RestApi] = "!GetAtt ApiGateway.Outputs.RestApi" params end |
#template_filename ⇒ Object
36 37 38 |
# File 'lib/jets/resource/child_stack/authorizer.rb', line 36 def template_filename @path end |