You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Currently every templates needs to implement sceptre_handler method template.py
import troposphere as tr
def sceptre_handler(sceptre_user_data):
# from here the template developer has access only to sceptre_user_data
# if stack_config contains parameters developer needs to create them without having any reference to the stack config
tmplt = tr.Template()
tmplt.add_parameter(tr.parameter(Parameter('VpcId'))
# but properties of resources could be loaded from stack config via sceptre_user_data
tmpl.add_resource(tr.ec2.SecurityGroup('sg', **sceptre_user_data['SecurityGroup'])
Possible quick fix is to add parameters and other data passed to the Template.
Another way is to refactor the approach how the templates are being created.
The text was updated successfully, but these errors were encountered:
Currently only
sceptre_user_data
is passed tosceptre.Template
https://github.com/cloudreach/sceptre/blob/master/sceptre/stack.py#L203
and then passed to
sceptre_handler
https://github.com/cloudreach/sceptre/blob/master/sceptre/template.py#L129
This leads to lose relation between template and stack config.
E.G:
stack_config.yaml
Currently every templates needs to implement
sceptre_handler
methodtemplate.py
Possible quick fix is to add
parameters
and other data passed to theTemplate
.Another way is to refactor the approach how the templates are being created.
The text was updated successfully, but these errors were encountered: