-
Notifications
You must be signed in to change notification settings - Fork 0
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
- Update. #581
- Update. #581
Conversation
this.logHandler.debug("CLOUDFORMATION CLIENT - Getting stack information", {stackName}, AwsModuleKeyname); | ||
const command = new DescribeStacksCommand({ | ||
StackName: stackName, | ||
}) | ||
try { | ||
const response: DescribeStacksCommandOutput = await this.getClient().send(command); | ||
if(!response.Stacks || response.Stacks.length < 1){ | ||
throw new Error("No stacks were returned from cloudformation"); | ||
return undefined; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think maybe we should log a warning here as well ?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
No because it's the only way to know if a stack already exists, it's to query it.
/** | ||
* Gets the description and all its details from all the CloudFormation stacks. | ||
*/ | ||
async listStacks(): Promise<Stack[] | undefined> { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can this command really return undefined or just an empty array ?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Apparently undefined but you are right I prefer an empty array.
No description provided.