feat: add OpenIn option to coder_app (#15743)

This PR is the coder/coder part of [the open_in parameter
issue](https://github.com/coder/terraform-provider-coder/issues/297)
aiming to add a new optional parameter to choose how to open modules.

This PR is heavily linked [to this
PR](https://github.com/coder/terraform-provider-coder/pull/321).

ℹ️ For now, some integrations tests can not be pushed as it requires a
release on the terraform-provider repo.
This commit is contained in:
Vincent Vielle
2025-01-03 11:27:02 +01:00
committed by GitHub
parent 3f1795fd92
commit 08463c27d8
34 changed files with 1075 additions and 800 deletions
+1
View File
@@ -452,6 +452,7 @@ curl -X GET http://coder-server:8080/api/v2/workspaceagents/{workspaceagent} \
"hidden": true,
"icon": "string",
"id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
"open_in": "string",
"sharing_level": "owner",
"slug": "string",
"subdomain": true,
+8
View File
@@ -78,6 +78,7 @@ curl -X GET http://coder-server:8080/api/v2/users/{user}/workspace/{workspacenam
"hidden": true,
"icon": "string",
"id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
"open_in": "string",
"sharing_level": "owner",
"slug": "string",
"subdomain": true,
@@ -268,6 +269,7 @@ curl -X GET http://coder-server:8080/api/v2/workspacebuilds/{workspacebuild} \
"hidden": true,
"icon": "string",
"id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
"open_in": "string",
"sharing_level": "owner",
"slug": "string",
"subdomain": true,
@@ -592,6 +594,7 @@ curl -X GET http://coder-server:8080/api/v2/workspacebuilds/{workspacebuild}/res
"hidden": true,
"icon": "string",
"id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
"open_in": "string",
"sharing_level": "owner",
"slug": "string",
"subdomain": true,
@@ -714,6 +717,7 @@ Status Code **200**
| `»»» hidden` | boolean | false | | |
| `»»» icon` | string | false | | Icon is a relative path or external URL that specifies an icon to be displayed in the dashboard. |
| `»»» id` | string(uuid) | false | | |
| `»»» open_in` | string | false | | |
| `»»» sharing_level` | [codersdk.WorkspaceAppSharingLevel](schemas.md#codersdkworkspaceappsharinglevel) | false | | |
| `»»» slug` | string | false | | Slug is a unique identifier within the agent. |
| `»»» subdomain` | boolean | false | | Subdomain denotes whether the app should be accessed via a path on the `coder server` or via a hostname-based dev URL. If this is set to true and there is no app wildcard configured on the server, the app will not be accessible in the UI. |
@@ -892,6 +896,7 @@ curl -X GET http://coder-server:8080/api/v2/workspacebuilds/{workspacebuild}/sta
"hidden": true,
"icon": "string",
"id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
"open_in": "string",
"sharing_level": "owner",
"slug": "string",
"subdomain": true,
@@ -1155,6 +1160,7 @@ curl -X GET http://coder-server:8080/api/v2/workspaces/{workspace}/builds \
"hidden": true,
"icon": "string",
"id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
"open_in": "string",
"sharing_level": "owner",
"slug": "string",
"subdomain": true,
@@ -1318,6 +1324,7 @@ Status Code **200**
| `»»»» hidden` | boolean | false | | |
| `»»»» icon` | string | false | | Icon is a relative path or external URL that specifies an icon to be displayed in the dashboard. |
| `»»»» id` | string(uuid) | false | | |
| `»»»» open_in` | string | false | | |
| `»»»» sharing_level` | [codersdk.WorkspaceAppSharingLevel](schemas.md#codersdkworkspaceappsharinglevel) | false | | |
| `»»»» slug` | string | false | | Slug is a unique identifier within the agent. |
| `»»»» subdomain` | boolean | false | | Subdomain denotes whether the app should be accessed via a path on the `coder server` or via a hostname-based dev URL. If this is set to true and there is no app wildcard configured on the server, the app will not be accessible in the UI. |
@@ -1550,6 +1557,7 @@ curl -X POST http://coder-server:8080/api/v2/workspaces/{workspace}/builds \
"hidden": true,
"icon": "string",
"id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
"open_in": "string",
"sharing_level": "owner",
"slug": "string",
"subdomain": true,
+7
View File
@@ -6633,6 +6633,7 @@ If the schedule is empty, the user will be updated to use the default schedule.|
"hidden": true,
"icon": "string",
"id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
"open_in": "string",
"sharing_level": "owner",
"slug": "string",
"subdomain": true,
@@ -6816,6 +6817,7 @@ If the schedule is empty, the user will be updated to use the default schedule.|
"hidden": true,
"icon": "string",
"id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
"open_in": "string",
"sharing_level": "owner",
"slug": "string",
"subdomain": true,
@@ -7216,6 +7218,7 @@ If the schedule is empty, the user will be updated to use the default schedule.|
"hidden": true,
"icon": "string",
"id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
"open_in": "string",
"sharing_level": "owner",
"slug": "string",
"subdomain": true,
@@ -7236,6 +7239,7 @@ If the schedule is empty, the user will be updated to use the default schedule.|
| `hidden` | boolean | false | | |
| `icon` | string | false | | Icon is a relative path or external URL that specifies an icon to be displayed in the dashboard. |
| `id` | string | false | | |
| `open_in` | string | false | | |
| `sharing_level` | [codersdk.WorkspaceAppSharingLevel](#codersdkworkspaceappsharinglevel) | false | | |
| `slug` | string | false | | Slug is a unique identifier within the agent. |
| `subdomain` | boolean | false | | Subdomain denotes whether the app should be accessed via a path on the `coder server` or via a hostname-based dev URL. If this is set to true and there is no app wildcard configured on the server, the app will not be accessible in the UI. |
@@ -7338,6 +7342,7 @@ If the schedule is empty, the user will be updated to use the default schedule.|
"hidden": true,
"icon": "string",
"id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
"open_in": "string",
"sharing_level": "owner",
"slug": "string",
"subdomain": true,
@@ -7723,6 +7728,7 @@ If the schedule is empty, the user will be updated to use the default schedule.|
"hidden": true,
"icon": "string",
"id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
"open_in": "string",
"sharing_level": "owner",
"slug": "string",
"subdomain": true,
@@ -7966,6 +7972,7 @@ If the schedule is empty, the user will be updated to use the default schedule.|
"hidden": true,
"icon": "string",
"id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
"open_in": "string",
"sharing_level": "owner",
"slug": "string",
"subdomain": true,
+4
View File
@@ -2028,6 +2028,7 @@ curl -X GET http://coder-server:8080/api/v2/templateversions/{templateversion}/d
"hidden": true,
"icon": "string",
"id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
"open_in": "string",
"sharing_level": "owner",
"slug": "string",
"subdomain": true,
@@ -2150,6 +2151,7 @@ Status Code **200**
| `»»» hidden` | boolean | false | | |
| `»»» icon` | string | false | | Icon is a relative path or external URL that specifies an icon to be displayed in the dashboard. |
| `»»» id` | string(uuid) | false | | |
| `»»» open_in` | string | false | | |
| `»»» sharing_level` | [codersdk.WorkspaceAppSharingLevel](schemas.md#codersdkworkspaceappsharinglevel) | false | | |
| `»»» slug` | string | false | | Slug is a unique identifier within the agent. |
| `»»» subdomain` | boolean | false | | Subdomain denotes whether the app should be accessed via a path on the `coder server` or via a hostname-based dev URL. If this is set to true and there is no app wildcard configured on the server, the app will not be accessible in the UI. |
@@ -2454,6 +2456,7 @@ curl -X GET http://coder-server:8080/api/v2/templateversions/{templateversion}/r
"hidden": true,
"icon": "string",
"id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
"open_in": "string",
"sharing_level": "owner",
"slug": "string",
"subdomain": true,
@@ -2576,6 +2579,7 @@ Status Code **200**
| `»»» hidden` | boolean | false | | |
| `»»» icon` | string | false | | Icon is a relative path or external URL that specifies an icon to be displayed in the dashboard. |
| `»»» id` | string(uuid) | false | | |
| `»»» open_in` | string | false | | |
| `»»» sharing_level` | [codersdk.WorkspaceAppSharingLevel](schemas.md#codersdkworkspaceappsharinglevel) | false | | |
| `»»» slug` | string | false | | Slug is a unique identifier within the agent. |
| `»»» subdomain` | boolean | false | | Subdomain denotes whether the app should be accessed via a path on the `coder server` or via a hostname-based dev URL. If this is set to true and there is no app wildcard configured on the server, the app will not be accessible in the UI. |
+6
View File
@@ -117,6 +117,7 @@ of the template will be used.
"hidden": true,
"icon": "string",
"id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
"open_in": "string",
"sharing_level": "owner",
"slug": "string",
"subdomain": true,
@@ -341,6 +342,7 @@ curl -X GET http://coder-server:8080/api/v2/users/{user}/workspace/{workspacenam
"hidden": true,
"icon": "string",
"id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
"open_in": "string",
"sharing_level": "owner",
"slug": "string",
"subdomain": true,
@@ -589,6 +591,7 @@ of the template will be used.
"hidden": true,
"icon": "string",
"id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
"open_in": "string",
"sharing_level": "owner",
"slug": "string",
"subdomain": true,
@@ -812,6 +815,7 @@ curl -X GET http://coder-server:8080/api/v2/workspaces \
"hidden": true,
"icon": "string",
"id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
"open_in": "string",
"sharing_level": "owner",
"slug": "string",
"subdomain": true,
@@ -1037,6 +1041,7 @@ curl -X GET http://coder-server:8080/api/v2/workspaces/{workspace} \
"hidden": true,
"icon": "string",
"id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
"open_in": "string",
"sharing_level": "owner",
"slug": "string",
"subdomain": true,
@@ -1377,6 +1382,7 @@ curl -X PUT http://coder-server:8080/api/v2/workspaces/{workspace}/dormant \
"hidden": true,
"icon": "string",
"id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
"open_in": "string",
"sharing_level": "owner",
"slug": "string",
"subdomain": true,