From 1183026cb944a03fdd21f0af94ccd912a17e9b5d Mon Sep 17 00:00:00 2001 From: SSharma-10 Date: Thu, 24 Jul 2025 20:22:03 +0530 Subject: [PATCH 1/2] Added project_id --- specification/resources/droplets/examples.yml | 4 +++- .../resources/droplets/examples/curl/droplets_create.yml | 2 +- .../resources/droplets/examples/go/droplets_create.yml | 1 + .../resources/droplets/examples/python/droplets_create.yml | 3 ++- .../resources/droplets/examples/ruby/droplets_create.yml | 1 + specification/resources/droplets/models/droplet_create.yml | 7 +++++++ 6 files changed, 15 insertions(+), 3 deletions(-) diff --git a/specification/resources/droplets/examples.yml b/specification/resources/droplets/examples.yml index 46310b9f7..c1e4937c6 100644 --- a/specification/resources/droplets/examples.yml +++ b/specification/resources/droplets/examples.yml @@ -15,6 +15,7 @@ droplet_create_request: - web user_data: "#cloud-config\nruncmd:\n - touch /test.txt\n" vpc_uuid: 760e09ef-dc84-11e8-981e-3cfdfeaae000 + project_id: 88b72d1a-b78a-4d9f-9090-b53c4399073f droplet_multi_create_request: value: @@ -34,4 +35,5 @@ droplet_multi_create_request: - env:prod - web user_data: "#cloud-config\nruncmd:\n - touch /test.txt\n" - vpc_uuid: 760e09ef-dc84-11e8-981e-3cfdfeaae000 \ No newline at end of file + vpc_uuid: 760e09ef-dc84-11e8-981e-3cfdfeaae000 + project_id: 88b72d1a-b78a-4d9f-9090-b53c4399073f \ No newline at end of file diff --git a/specification/resources/droplets/examples/curl/droplets_create.yml b/specification/resources/droplets/examples/curl/droplets_create.yml index 4bbca945c..19f2c2258 100644 --- a/specification/resources/droplets/examples/curl/droplets_create.yml +++ b/specification/resources/droplets/examples/curl/droplets_create.yml @@ -3,5 +3,5 @@ source: |- curl -X POST \ -H "Content-Type: application/json" \ -H "Authorization: Bearer $DIGITALOCEAN_TOKEN" \ - -d '{"name":"example.com","region":"nyc3","size":"s-1vcpu-1gb","image":"ubuntu-20-04-x64","ssh_keys":[289794,"3b:16:e4:bf:8b:00:8b:b8:59:8c:a9:d3:f0:19:fa:45"],"backups":true,"ipv6":true,"monitoring":true,"tags":["env:prod","web"],"user_data":"#cloud-config\nruncmd:\n - touch /test.txt\n","vpc_uuid":"760e09ef-dc84-11e8-981e-3cfdfeaae000"}' \ + -d '{"name":"example.com","region":"nyc3","size":"s-1vcpu-1gb","image":"ubuntu-20-04-x64","ssh_keys":[289794,"3b:16:e4:bf:8b:00:8b:b8:59:8c:a9:d3:f0:19:fa:45"],"backups":true,"ipv6":true,"monitoring":true,"tags":["env:prod","web"],"user_data":"#cloud-config\nruncmd:\n - touch /test.txt\n","vpc_uuid":"760e09ef-dc84-11e8-981e-3cfdfeaae000","project_id":"88b72d1a-b78a-4d9f-9090-b53c4399073f"}' \ "https://api.digitalocean.com/v2/droplets" diff --git a/specification/resources/droplets/examples/go/droplets_create.yml b/specification/resources/droplets/examples/go/droplets_create.yml index 956eafac9..a23d6c08f 100644 --- a/specification/resources/droplets/examples/go/droplets_create.yml +++ b/specification/resources/droplets/examples/go/droplets_create.yml @@ -30,4 +30,5 @@ source: |- Tags: []string{"env:prod","web"}, UserData: "#cloud-config\nruncmd:\n - touch /test.txt\n", VPCUUID: "760e09ef-dc84-11e8-981e-3cfdfeaae000", + ProjectID: "88b72d1a-b78a-4d9f-9090-b53c4399073f", } diff --git a/specification/resources/droplets/examples/python/droplets_create.yml b/specification/resources/droplets/examples/python/droplets_create.yml index 3f0a0b8bc..1a48c93c1 100644 --- a/specification/resources/droplets/examples/python/droplets_create.yml +++ b/specification/resources/droplets/examples/python/droplets_create.yml @@ -22,7 +22,8 @@ source: |- "web" ], "user_data": "#cloud-config\nruncmd:\n - touch /test.txt\n", - "vpc_uuid": "760e09ef-dc84-11e8-981e-3cfdfeaae000" + "vpc_uuid": "760e09ef-dc84-11e8-981e-3cfdfeaae000", + "project_id": "88b72d1a-b78a-4d9f-9090-b53c4399073f" } resp = client.droplets.create(body=req) diff --git a/specification/resources/droplets/examples/ruby/droplets_create.yml b/specification/resources/droplets/examples/ruby/droplets_create.yml index f254034b2..b8284af2e 100644 --- a/specification/resources/droplets/examples/ruby/droplets_create.yml +++ b/specification/resources/droplets/examples/ruby/droplets_create.yml @@ -16,5 +16,6 @@ source: |- tags: ["env:prod","web"], user_data: "#cloud-config\nruncmd:\n - touch /test.txt\n", vpc_uuid: "760e09ef-dc84-11e8-981e-3cfdfeaae000", + project_id: "88b72d1a-b78a-4d9f-9090-b53c4399073f", ) client.droplets.create(droplet) diff --git a/specification/resources/droplets/models/droplet_create.yml b/specification/resources/droplets/models/droplet_create.yml index 714823c7b..49306bead 100644 --- a/specification/resources/droplets/models/droplet_create.yml +++ b/specification/resources/droplets/models/droplet_create.yml @@ -114,6 +114,12 @@ properties: will be assigned. If excluded, the Droplet will be assigned to your account's default VPC for the region.
Requires `vpc:read` scope. + project_id: + type: string + example: 88b72d1a-b78a-4d9f-9090-b53c4399073f + description: The unique identifier of the project to associate the Droplet + with. The Droplet will be created within this project. + with_droplet_agent: type: boolean example: true @@ -127,3 +133,4 @@ properties: required: - size - image +- project_id From c813b5b007678a53b7fcc64108e51a7e8e503c41 Mon Sep 17 00:00:00 2001 From: SSharma-10 Date: Tue, 5 Aug 2025 20:54:42 +0530 Subject: [PATCH 2/2] removed required --- specification/resources/droplets/models/droplet_create.yml | 1 - 1 file changed, 1 deletion(-) diff --git a/specification/resources/droplets/models/droplet_create.yml b/specification/resources/droplets/models/droplet_create.yml index 49306bead..702475cc9 100644 --- a/specification/resources/droplets/models/droplet_create.yml +++ b/specification/resources/droplets/models/droplet_create.yml @@ -133,4 +133,3 @@ properties: required: - size - image -- project_id