Skip to content

Commit

Permalink
Merge 4c5db25 into bf17047
Browse files Browse the repository at this point in the history
  • Loading branch information
lillianberryfly authored Feb 21, 2025
2 parents bf17047 + 4c5db25 commit cf847e9
Show file tree
Hide file tree
Showing 4 changed files with 15 additions and 3 deletions.
2 changes: 1 addition & 1 deletion go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@ require (
github.com/spf13/pflag v1.0.6
github.com/spf13/viper v1.19.0
github.com/stretchr/testify v1.10.0
github.com/superfly/fly-go v0.1.40
github.com/superfly/fly-go v0.1.41
github.com/superfly/graphql v0.2.5
github.com/superfly/lfsc-go v0.1.1
github.com/superfly/macaroon v0.2.14-0.20240819201738-61a02aa53648
Expand Down
4 changes: 2 additions & 2 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -633,8 +633,8 @@ github.com/stretchr/testify v1.10.0 h1:Xv5erBjTwe/5IxqUQTdXv5kgmIvbHo3QQyRwhJsOf
github.com/stretchr/testify v1.10.0/go.mod h1:r2ic/lqez/lEtzL7wO/rwa5dbSLXVDPFyf8C91i36aY=
github.com/subosito/gotenv v1.6.0 h1:9NlTDc1FTs4qu0DDq7AEtTPNw6SVm7uBMsUCUjABIf8=
github.com/subosito/gotenv v1.6.0/go.mod h1:Dk4QP5c2W3ibzajGcXpNraDfq2IrhjMIvMSWPKKo0FU=
github.com/superfly/fly-go v0.1.40 h1:/s8vbjj/16aPlxdM2sU0uoIAjDqJ2OrkVrqMTX0I6dY=
github.com/superfly/fly-go v0.1.40/go.mod h1:lad5/CIMPpYvuAYQSwT8C154xuZPgBmhbkLwgau5V+o=
github.com/superfly/fly-go v0.1.41 h1:ca4LOCwI2b9jQKBkanXrsall5pBeEkQqnKHUjGL9SbI=
github.com/superfly/fly-go v0.1.41/go.mod h1:lad5/CIMPpYvuAYQSwT8C154xuZPgBmhbkLwgau5V+o=
github.com/superfly/graphql v0.2.5 h1:61TUt5MrWxlOpdipfYNl9TsG0dXnvb3tkkn/Dre2GcA=
github.com/superfly/graphql v0.2.5/go.mod h1:CVfDl31srm8HnJ9udwLu6hFNUW/P6GUM2dKcG1YQ8jc=
github.com/superfly/lfsc-go v0.1.1 h1:dGjLgt81D09cG+aR9lJZIdmonjZSR5zYCi7s54+ZU2Q=
Expand Down
6 changes: 6 additions & 0 deletions internal/command/volumes/create.go
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,11 @@ func newCreate() *cobra.Command {
Description: "Place the volume in a separate hardware zone from existing volumes to help ensure availability",
Default: true,
},
flag.Bool{
Name: "unique-zone-app-wide",
Description: "Checks all volumes in app for unique zone handling, instead of only volumes with the same name (which is the default)",
Default: false,
},
flag.String{
Name: "snapshot-id",
Description: "Create the volume from the specified snapshot",
Expand Down Expand Up @@ -151,6 +156,7 @@ func runCreate(ctx context.Context) error {
SizeGb: fly.Pointer(flag.GetInt(ctx, "size")),
Encrypted: fly.Pointer(!flag.GetBool(ctx, "no-encryption")),
RequireUniqueZone: fly.Pointer(flag.GetBool(ctx, "require-unique-zone")),
UniqueZoneAppWide: fly.Pointer(flag.GetBool(ctx, "unique-zone-app-wide")),
SnapshotID: snapshotID,
ComputeRequirements: computeRequirements,
SnapshotRetention: fly.Pointer(flag.GetInt(ctx, "snapshot-retention")),
Expand Down
6 changes: 6 additions & 0 deletions internal/command/volumes/fork.go
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,11 @@ func newFork() *cobra.Command {
Description: "Place the volume in a separate hardware zone from existing volumes. This is the default.",
Default: true,
},
flag.Bool{
Name: "unique-zone-app-wide",
Description: "Checks all volumes in app for unique zone handling, instead of only volumes with the same name (which is the default)",
Default: false,
},
flag.String{
Name: "region",
Shorthand: "r",
Expand Down Expand Up @@ -116,6 +121,7 @@ func runFork(ctx context.Context) error {
input := fly.CreateVolumeRequest{
Name: name,
RequireUniqueZone: fly.Pointer(flag.GetBool(ctx, "require-unique-zone")),
UniqueZoneAppWide: fly.Pointer(flag.GetBool(ctx, "unique-zone-app-wide")),
SourceVolumeID: &vol.ID,
ComputeRequirements: computeRequirements,
ComputeImage: attachedMachineImage,
Expand Down

0 comments on commit cf847e9

Please sign in to comment.