diff --git a/internal/cmd/deploy/deploy.go b/internal/cmd/deploy/deploy.go index d017e3b8..6cd177a2 100644 --- a/internal/cmd/deploy/deploy.go +++ b/internal/cmd/deploy/deploy.go @@ -19,6 +19,8 @@ import ( "github.com/spf13/cobra" ) +const noChangeFoundMsg = "The submitted information didn't contain changes. Submit different information to create a change set." + type configFileFormat struct { Parameters map[string]string `yaml:"Parameters"` Tags map[string]string `yaml:"Tags"` @@ -159,7 +161,13 @@ YAML: spinner.Push("Creating change set") changeSetName, createErr := cfn.CreateChangeSet(template, parameters, combinedTags, stackName, roleArn) if createErr != nil { - panic(ui.Errorf(createErr, "error creating changeset")) + if createErr.Error() == noChangeFoundMsg { + spinner.Pop() + fmt.Println(console.Green("Change set was created, but there is no change. Deploy was skipped.")) + return + } else { + panic(ui.Errorf(createErr, "error creating changeset")) + } } changeSetStatus, err := cfn.GetChangeSet(stackName, changeSetName)