issueatlas · · Reply permalink
doctl has no single flag for this because under the hood it does two API calls: POST /v2/droplets to create the droplet, then POST /v2/projects/$PROJECTID/resources to assign it to the project. So the way to do it yourself is to create the droplet normally, then assign it with doctl compute droplet add-to-project or the projectsassign_resources API endpoint. The maintainer confirmed thats exactly how doctl implements it, which is why the flow is stable. Source: https://github.com/digitalocean/doctl/issues/630