// Execute deletes the service's CloudFormation stack.
// If the service is being removed from the application, Execute will
// also delete the ECR repository and the SSM parameter.
Execute deletes the service's CloudFormation stack.
If the service is being removed from the application, Execute will
also delete the ECR repository and the SSM parameter.
// Execute deletes the service ' s CloudFormation stack . // If the service is being removed from the application Execute will // also delete the ECR repository and the SSM parameter .
func (o *deleteSvcOpts) Execute() error {
	if err := o.appEnvironments(); err != nil {
		return err
	}
	if err := o.deleteStacks(); err != nil {
		return err
	}
	if !o.needsAppCleanup() {
		return nil
	}
	if err := o.emptyECRRepos(); err != nil {
		return err
	}
	if err := o.removeSvcFromApp(); err != nil {
		return err
	}
	if err := o.deleteSSMParam(); err != nil {
		return err
	}
	log.Successf("Deleted service %s from application %s.\n", o.name, o.appName)
	return nil
}
func ( o * deleteSvcOpts ) Execute ( ) error { if err := o . appEnvironments ( ) ; err != nil { return err } if err := o . deleteStacks ( ) ; err != nil { return err } if ! o . needsAppCleanup ( ) { return nil } if err := o . emptyECRRepos ( ) ; err != nil { return err } if err := o . removeSvcFromApp ( ) ; err != nil { return err } if err := o . deleteSSMParam ( ) ; err != nil { return err } log . Successf ( " \n " , o . name , o . appName ) return nil }
Execute deletes the service's CloudFormation stack.
Execute deletes the service ' s CloudFormation stack .
// Skip removing the service from the application if // we are only removing the stack from a particular environment.