cli: create or read state file during constellation create (#2470)

Signed-off-by: Daniel Weiße <dw@edgeless.systems>
This commit is contained in:
Daniel Weiße 2023-10-17 14:37:09 +02:00 committed by GitHub
parent 1a141c3972
commit fe7e16e1cc
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
4 changed files with 128 additions and 88 deletions

View file

@ -191,7 +191,7 @@ func (c *createCmd) create(cmd *cobra.Command, creator cloudCreator, fileHandler
}
c.log.Debugf("Successfully created the cloud resources for the cluster")
stateFile, err := state.ReadFromFile(fileHandler, constants.StateFilename)
stateFile, err := state.CreateOrRead(fileHandler, constants.StateFilename)
if err != nil {
return fmt.Errorf("reading state file: %w", err)
}