fix: do NOT write clear text outputs to disk

This commit is contained in:
Stefan Reimer 2022-03-15 11:18:38 +01:00
parent 6a8c41ff47
commit dd43cfc3f4

View File

@ -486,11 +486,6 @@ class Stack(object):
stack = pulumi_init(self) stack = pulumi_init(self)
self.outputs = stack.outputs() self.outputs = stack.outputs()
# If secrets replace with clear values for now
for k in self.outputs.keys():
if self.outputs[k].secret:
self.outputs[k] = self.outputs[k].value
else: else:
self.read_template_file() self.read_template_file()
try: try:
@ -518,11 +513,6 @@ class Stack(object):
pass pass
if self.outputs: if self.outputs:
logger.info(
"{} {} Outputs:\n{}".format(
self.region, self.stackname, pprint.pformat(self.outputs, indent=2)
)
)
if self.store_outputs: if self.store_outputs:
try: try:
filename = self.cfn_data["Metadata"]["CustomOutputs"]["Name"] filename = self.cfn_data["Metadata"]["CustomOutputs"]["Name"]
@ -553,6 +543,17 @@ class Stack(object):
"Wrote outputs for %s to %s", self.stackname, output_file "Wrote outputs for %s to %s", self.stackname, output_file
) )
# If secrets replace with clear values for now, display ONLY
for k in self.outputs.keys():
if self.outputs[k].secret:
self.outputs[k] = self.outputs[k].value
logger.info(
"{} {} Outputs:\n{}".format(
self.region, self.stackname, pprint.pformat(self.outputs, indent=2)
)
)
def create_docs(self, template=False, graph=False): def create_docs(self, template=False, graph=False):
"""Read rendered template, parse documentation fragments, eg. parameter description """Read rendered template, parse documentation fragments, eg. parameter description
and create a mardown doc file for the stack and create a mardown doc file for the stack