Skip to content

Commit

Permalink
wait for delete
Browse files Browse the repository at this point in the history
  • Loading branch information
cplee committed Oct 31, 2018
1 parent d481a0e commit f58c637
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion provider/aws/servicecatalog.go
Expand Up @@ -177,7 +177,7 @@ func (scManager *serviceCatalogManager) TerminateProvisionedProducts(productID s
continue
}

log.Infof(" Deleting provisionedProduct '%s'", provisionedProduct.Id)
log.Infof(" Deleting provisionedProduct '%s'", aws.StringValue(provisionedProduct.Id))
stackID := aws.StringValue(provisionedProduct.PhysicalId)

_, err = scManager.scAPI.TerminateProvisionedProduct(&servicecatalog.TerminateProvisionedProductInput{
Expand All @@ -188,6 +188,8 @@ func (scManager *serviceCatalogManager) TerminateProvisionedProducts(productID s
return false
}

time.Sleep(time.Second * 5)

log.Infof(" Deleting stack '%s'", stackID)
scManager.stackManager.AwaitFinalStatus(strings.Split(stackID, "/")[1])
}
Expand Down

0 comments on commit f58c637

Please sign in to comment.