Add parameters to outputs template render

This commit is contained in:
Stefan Reimer 2020-06-22 14:17:49 +01:00
parent 3fb7da29c2
commit b8eca4e94e
2 changed files with 4 additions and 1 deletions

View File

@ -357,7 +357,7 @@ class Stack(object):
my_template = pkg_resources.read_text(templates, template)
jenv = JinjaEnv()
template = jenv.from_string(my_template)
data = {'stackname': "/".join([self.rel_path, self.stackname]), 'timestamp': datetime.now(tzutc()), 'outputs': self.outputs}
data = {'stackname': "/".join([self.rel_path, self.stackname]), 'timestamp': datetime.now(tzutc()), 'outputs': self.outputs, 'parameters': self.parameters}
with open(output_file, 'w') as output_contents:
output_contents.write(template.render(**data))

View File

@ -1,5 +1,8 @@
---
# Source: CloudBender for stack {{ stackname }} at {{ timestamp }}
ClusterName: {{ parameters.ClusterName }}
Domain: {{ parameters.DnsZone }}
cert-manager:
IamArn: {{ outputs.CertManagerRoleArn }}