Changing Digital Ocean droplets with doctl (resize, floating ip, rename, etc)

Docs: doctl compute floating-ip

Droplet List

doctl -t =do_api_key= compute droplet list

Create Floating IP

doctl -t =do_api_key= compute floating-ip create --droplet-id =droplet_id=

List floating IPs

doctl -t =do_api_key= compute floating-ip list

Assign existing Floating IP to existing Droplet

doctl -t =do_api_key= compute floating-ip-action assign =floating_ip= =new_droplet=

Stop old droplet

doctl -t =do_api_key= compute droplet-action shutdown =old_droplet=

Delete old droplet

doctl -t =do_api_key= compute droplet delete =old_droplet=

Rename old droplet

doctl -t =do_api_key= compute droplet-action rename --droplet-name =new_name= =old_droplet=

Rename new droplet

doctl -t =do_api_key= compute droplet-action rename --droplet-name =new_name= =new_droplet=

Change hostname

hostnamectl set-hostname =short_hostname=

Resize

doctl -t =do_api_key= compute droplet-action resize =droplet_id= --size =droplet_size= --resize-disk=true

Size list

doctl -t =do_api_key= compute size list|less