(ctx context.Context, clusterStackNames []string, clusterName string)
| 676 | } |
| 677 | |
| 678 | func (c *StackCollection) getClusterStackFromList(ctx context.Context, clusterStackNames []string, clusterName string) (*Stack, error) { |
| 679 | clusterStackName := c.MakeClusterStackName() |
| 680 | if clusterName != "" { |
| 681 | clusterStackName = c.MakeClusterStackNameFromName(clusterName) |
| 682 | } |
| 683 | |
| 684 | for _, stack := range clusterStackNames { |
| 685 | if stack == clusterStackName { |
| 686 | stack, err := c.DescribeStack(ctx, &types.Stack{StackName: &clusterStackName}) |
| 687 | if err != nil { |
| 688 | return nil, err |
| 689 | } |
| 690 | if matchesCluster(clusterName, stack.Tags) { |
| 691 | return stack, nil |
| 692 | |
| 693 | } |
| 694 | } |
| 695 | } |
| 696 | return nil, nil |
| 697 | } |
| 698 | |
| 699 | // DescribeStackEvents describes the events that have occurred on the stack |
| 700 | func (c *StackCollection) DescribeStackEvents(ctx context.Context, i *Stack) ([]types.StackEvent, error) { |
no test coverage detected