fireflycons / PSCloudFormation

Easy CloudFormation deployments from PowerShell command line. Exports CloudFormation Stacks to Terraform
MIT License
6 stars 0 forks source link

InvalidOperationException: Sequence contains no elements when no resource change #73

Closed fireflycons closed 4 years ago

fireflycons commented 4 years ago

On running stack update, if there are no resources changed, e.g. only outputs have been changed, then this exception is thrown

fireflycons commented 4 years ago

Tracked to PSLogger.LogChangeset

Method need the following at the beginning

if (!changes.Changes.Any())
{
    this.LogInformation("No changes to stack resources. Other changes such as Outputs may be present.");
    return new Dictionary<string, int>();
}