(ctx context.Context, stackName string)
| 208 | } |
| 209 | |
| 210 | func (s *StackDeployer) stackExists(ctx context.Context, stackName string) (bool, error) { |
| 211 | input := &cloudformation.DescribeStacksInput{ |
| 212 | StackName: aws.String(stackName), |
| 213 | } |
| 214 | |
| 215 | _, err := s.clients.CloudFormation.DescribeStacksWithContext(ctx, input) |
| 216 | if err != nil { |
| 217 | if awsErr, ok := err.(awserr.Error); ok { |
| 218 | if awsErr.Code() == "ValidationError" { |
| 219 | return false, nil |
| 220 | } |
| 221 | } |
| 222 | return false, err |
| 223 | } |
| 224 | |
| 225 | return true, nil |
| 226 | } |
| 227 | |
| 228 | func (s *StackDeployer) waitForStackOperation(ctx context.Context, stackName, targetStatus string, timeout time.Duration) error { |
| 229 | checkFn := func() (bool, error) { |
no test coverage detected