Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion AGENTS.md
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ cloudamqp instance delete --id <id>

#### Resize Instance Disk
```bash
cloudamqp instance resize --id <id> --disk-size=<gb> [--allow-downtime]
cloudamqp instance resize-disk --id <id> --disk-size=<gb> [--allow-downtime]
```
- Required: disk-size (in GB)
- Optional: allow-downtime flag
Expand Down
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ A command line interface for the CloudAMQP API that provides complete management
- **Simple Configuration**: Plain text API key storage in `~/.cloudamqprc`
- **Flag-Based Commands**: Clean command structure with `--id` flags for instance operations
- **Copy Settings**: Clone configuration from existing instances (metrics, firewall, alarms, etc.)
- **Wait for Ready**: Optional `--wait` flag for long-running operations (create, resize, upgrades)
- **Wait for Ready**: Optional `--wait` flag for long-running operations (create, resize-disk, upgrades)
- **User-Friendly**: Clear help messages, examples, and safety confirmations
- **Error Handling**: Proper API error extraction and display

Expand Down Expand Up @@ -122,7 +122,7 @@ cloudamqp instance get --id 1234
cloudamqp instance update --id 1234 --name=new-name --plan=rabbit-1

# Resize instance disk
cloudamqp instance resize --id 1234 --disk-size=100 --allow-downtime
cloudamqp instance resize-disk --id 1234 --disk-size=100 --allow-downtime

# Delete instance (with confirmation)
cloudamqp instance delete --id 1234
Expand Down
2 changes: 1 addition & 1 deletion cmd/command_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ func TestInstanceCommand(t *testing.T) {
assert.Contains(t, commandNames, "get --id <id>")
assert.Contains(t, commandNames, "update --id <id>")
assert.Contains(t, commandNames, "delete --id <id>")
assert.Contains(t, commandNames, "resize --id <id>")
assert.Contains(t, commandNames, "resize-disk --id <id>")
}

func TestVPCCommand(t *testing.T) {
Expand Down
6 changes: 3 additions & 3 deletions cmd/instance_resize.go
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ var (
)

var instanceResizeCmd = &cobra.Command{
Use: "resize --id <id>",
Use: "resize-disk --id <id>",
Short: "Resize instance disk",
Long: `Resize the disk size of an instance. Default behavior is to expand the disk without any downtime.
Currently limited to instances in Amazon Web Services (AWS) and Google Compute Engine (GCE).
Expand All @@ -25,8 +25,8 @@ Note: This action is asynchronous. The request will return almost immediately. T
Note: Due to restrictions from cloud providers, it's only possible to resize the disk every 8 hours unless --allow-downtime is set.

Available disk sizes: 0, 25, 50, 100, 250, 500, 1000, 2000 GB`,
Example: ` cloudamqp instance resize --id 1234 --disk-size=100
cloudamqp instance resize --id 1234 --disk-size=250 --allow-downtime`,
Example: ` cloudamqp instance resize-disk --id 1234 --disk-size=100
cloudamqp instance resize-disk --id 1234 --disk-size=250 --allow-downtime`,
Args: cobra.NoArgs,
RunE: func(cmd *cobra.Command, args []string) error {
var err error
Expand Down
Loading