Esempio n. 1
0
func destroyStack(svc *cloudformation.CloudFormation, name string) error {
	dreq := &cloudformation.DeleteStackInput{
		StackName: aws.String(name),
	}
	_, err := svc.DeleteStack(dreq)
	return err
}
Esempio n. 2
0
func deleteStack(s Stack, distinctId string, CF *cloudformation.CloudFormation) error {
	deleteAttempts[s.StackName] += 1
	switch deleteAttempts[s.StackName] {
	case 1:
		fmt.Printf("Deleting %s...\n", s.Name)
	default:
		fmt.Printf("Retrying deleting %s...\n", s.Name)
	}

	_, err := CF.DeleteStack(&cloudformation.DeleteStackInput{
		StackName: aws.String(s.StackName),
	})
	return err
}
Esempio n. 3
0
func delStack(svc *awscf.CloudFormation, stackName string) {
	input := &awscf.DeleteStackInput{
		StackName: aws.String(stackName),
	}

	_, err := svc.DeleteStack(input)
	if err != nil {
		log.Fatal(err)
	}
	// the log.Println ends up looking like
	// 2015/06/04 16:55:36 {
	//
	// }
	//
	// log.Println(awsutil.StringValue(resp))
}