Skip to content

Commit fecaa57

Browse files
APPS-11763: VPC integration (#1059)
* APPS-11763: VPC integration * Update the egress ip yml file * Add VPC integration into the AppSpec * Fix VPC array in the AppSpec * Remove type array from app for vpc * Make lint happy * Update create and update request * Update description * Update req body upon feedback * Update type as object * Fix lint test * Keep separate file for egress * Update struct of vpc --------- Co-authored-by: anup-deka <adeka@digitalocean.com>
1 parent 866c5bb commit fecaa57

File tree

7 files changed

+59
-1
lines changed

7 files changed

+59
-1
lines changed

specification/resources/apps/apps_create.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,8 @@ requestBody:
3939
- path: /api
4040
egress:
4141
type: DEDICATED_IP
42+
vpc:
43+
id: c22d8f48-4bc4-49f5-8ca0-58e7164427ac
4244
required: true
4345

4446
responses:

specification/resources/apps/examples/python/apps_update.yml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -225,6 +225,8 @@ source: |-
225225
"version": "12",
226226
}
227227
],
228-
}
228+
“vpc”: {
229+
“id”: “c22d8f48-4bc4-49f5-8ca0-58e7164427ac”,
230+
}
229231
}
230232
update_resp = client.apps.update(id="bb245ba", body=req)

specification/resources/apps/models/app.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -87,6 +87,8 @@ properties:
8787
type: array
8888
items:
8989
$ref: apps_dedicated_egress_ip.yml
90+
vpc:
91+
$ref: apps_vpc.yml
9092
required:
9193
- spec
9294
type: object

specification/resources/apps/models/app_spec.yml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -102,6 +102,9 @@ properties:
102102

103103
maintenance:
104104
$ref: app_maintenance_spec.yml
105+
106+
vpc:
107+
$ref: apps_vpc.yml
105108

106109
required:
107110
- name
Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
type: object
2+
readOnly: true
3+
properties:
4+
id:
5+
title: The ID of the VPC.
6+
type: string
7+
example: c22d8f48-4bc4-49f5-8ca0-58e7164427ac
8+
egress_ips:
9+
title: The egress ips associated with the VPC.
10+
type: array
11+
items:
12+
$ref: apps_vpc_egress_ip.yml
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
type: object
2+
properties:
3+
ip:
4+
type: string
5+
example: 10.0.0.1

specification/resources/apps/responses/examples.yml

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,10 @@ apps:
2222
type: "PRIMARY"
2323
zone: "example.com"
2424
minimum_tls_version: "1.3"
25+
vpc:
26+
id: c22d8f48-4bc4-49f5-8ca0-58e7164427ac
27+
egress_ips:
28+
- ip: 10.0.0.1
2529
default_ingress: https://sample-php-iaj87.ondigitalocean.app
2630
created_at: 2020-11-19T20:27:18Z
2731
updated_at: 2020-12-01T00:42:16Z
@@ -47,6 +51,10 @@ apps:
4751
type: "PRIMARY"
4852
zone: "example.com"
4953
minimum_tls_version: "1.3"
54+
vpc:
55+
id: c22d8f48-4bc4-49f5-8ca0-58e7164427ac
56+
egress_ips:
57+
- ip: 10.0.0.1
5058
services:
5159
- name: sample-php
5260
source_commit_hash: 54d4a727f457231062439895000d45437c7bb405
@@ -76,6 +84,10 @@ apps:
7684
type: "PRIMARY"
7785
zone: "example.com"
7886
minimum_tls_version: "1.3"
87+
vpc:
88+
id: c22d8f48-4bc4-49f5-8ca0-58e7164427ac
89+
egress_ips:
90+
- ip: 10.0.0.1
7991
services:
8092
- name: sample-php
8193
source_commit_hash: 54d4a727f457231062439895000d45437c7bb405
@@ -199,6 +211,10 @@ apps:
199211
- ip: 192.168.1.2
200212
id: 4768fb15-2837-4dda-9be5-3951df4bc3d0
201213
status: ASSIGNED
214+
vpc:
215+
id: c22d8f48-4bc4-49f5-8ca0-58e7164427ac
216+
egress_ips:
217+
- ip: 10.0.0.1
202218
links:
203219
pages: {}
204220
meta:
@@ -231,6 +247,10 @@ app:
231247
- domain: "sample-golang.example.com"
232248
zone: "example.com"
233249
minimum_tls_version: "1.3"
250+
vpc:
251+
id: c22d8f48-4bc4-49f5-8ca0-58e7164427ac
252+
egress_ips:
253+
- ip: 10.0.0.1
234254
default_ingress: https://sample-golang-zyhgn.ondigitalocean.app
235255
created_at: '2021-02-10T16:45:14Z'
236256
updated_at: '2021-02-10T17:06:56Z'
@@ -255,6 +275,10 @@ app:
255275
- domain: "sample-golang.example.com"
256276
zone: "example.com"
257277
minimum_tls_version: "1.3"
278+
vpc:
279+
id: c22d8f48-4bc4-49f5-8ca0-58e7164427ac
280+
egress_ips:
281+
- ip: 10.0.0.1
258282
services:
259283
- name: web
260284
source_commit_hash: db6936cb46047c576962962eed81ad52c21f35d7
@@ -340,6 +364,10 @@ app:
340364
type: "PRIMARY"
341365
zone: "example.com"
342366
minimum_tls_version: "1.3"
367+
vpc:
368+
id: c22d8f48-4bc4-49f5-8ca0-58e7164427ac
369+
egress_ips:
370+
- ip: 10.0.0.1
343371
region:
344372
slug: ams
345373
label: Amsterdam
@@ -430,6 +458,10 @@ app:
430458
- ip: 192.168.1.2
431459
id: 4768fb15-2837-4dda-9be5-3951df4bc3d0
432460
status: ASSIGNED
461+
vpc:
462+
id: c22d8f48-4bc4-49f5-8ca0-58e7164427ac
463+
egress_ips:
464+
- ip: 10.0.0.1
433465

434466

435467
deployments:

0 commit comments

Comments
 (0)