Skip to content

Commit a1d5f85

Browse files
authored
fix: flag to create data branch (#3913)
1 parent e5ec38b commit a1d5f85

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

cmd/branches.go

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,7 @@ var (
3232
Allowed: awsRegions(),
3333
}
3434
persistent bool
35+
withData bool
3536

3637
branchCreateCmd = &cobra.Command{
3738
Use: "create [name]",
@@ -53,6 +54,9 @@ var (
5354
if cmdFlags.Changed("persistent") {
5455
body.Persistent = &persistent
5556
}
57+
if cmdFlags.Changed("with-data") {
58+
body.WithData = &withData
59+
}
5660
return create.Run(cmd.Context(), body, afero.NewOsFs())
5761
},
5862
}
@@ -157,6 +161,7 @@ func init() {
157161
createFlags.Var(&branchRegion, "region", "Select a region to deploy the branch database.")
158162
createFlags.Var(&size, "size", "Select a desired instance size for the branch database.")
159163
createFlags.BoolVar(&persistent, "persistent", false, "Whether to create a persistent branch.")
164+
createFlags.BoolVar(&withData, "with-data", false, "Whether to clone production data to the branch database.")
160165
branchesCmd.AddCommand(branchCreateCmd)
161166
branchesCmd.AddCommand(branchListCmd)
162167
branchesCmd.AddCommand(branchGetCmd)

0 commit comments

Comments
 (0)