MCPcopy Create free account
hub / github.com/dan-v/lambda-nat-proxy / stackExists

Method stackExists

internal/deploy/stack.go:210–226  ·  view source on GitHub ↗
(ctx context.Context, stackName string)

Source from the content-addressed store, hash-verified

208}
209
210func (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
228func (s *StackDeployer) waitForStackOperation(ctx context.Context, stackName, targetStatus string, timeout time.Duration) error {
229 checkFn := func() (bool, error) {

Callers 1

DeployStackMethod · 0.95

Calls 1

Tested by

no test coverage detected