diff --git a/schemas/alpha/azure.yaml.json b/schemas/alpha/azure.yaml.json index f846f3f1fd5..f925a5be805 100644 --- a/schemas/alpha/azure.yaml.json +++ b/schemas/alpha/azure.yaml.json @@ -352,6 +352,44 @@ ] } }, + "resources": { + "type": "object", + "additionalProperties": { + "type": "object", + "required": [ + "type" + ], + "properties": { + "type": { + "type": "string", + "title": "Type of resource", + "description": "The type of resource to be created. (Example: db.postgres)", + "enum": [ + "db.postgres", + "db.redis", + "db.mongo", + "ai.openai.model", + "host.containerapp" + ] + }, + "uses": { + "type": "array", + "title": "Other resources that this resource uses", + "items": { + "type": "string" + }, + "uniqueItems": true + } + }, + "allOf": [ + { "if": { "properties": { "type": { "const": "host.containerapp" }}}, "then": { "$ref": "#/definitions/containerAppResource" } }, + { "if": { "properties": { "type": { "const": "ai.openai.model" }}}, "then": { "$ref": "#/definitions/aiModelResource" } }, + { "if": { "properties": { "type": { "const": "db.postgres" }}}, "then": { "$ref": "#/definitions/resource"} }, + { "if": { "properties": { "type": { "const": "db.redis" }}}, "then": { "$ref": "#/definitions/resource"} }, + { "if": { "properties": { "type": { "const": "db.mongo" }}}, "then": { "$ref": "#/definitions/resource"} } + ] + } + }, "pipeline": { "type": "object", "title": "Definition of continuous integration pipeline", @@ -702,11 +740,6 @@ "items": { "type": "string" } - }, - "remoteBuild": { - "type": "boolean", - "title": "Optional. Whether to build the image remotely", - "description": "If set to true, the image will be built remotely using the Azure Container Registry remote build feature. If set to false, the image will be built locally using Docker." } } }, @@ -1159,6 +1192,107 @@ } } } + }, + "resource": { + "type": "object", + "additionalProperties": false, + "properties": { + "type": { + "type": "string", + "title": "Type of resource", + "description": "The type of resource to be created. (Example: db.postgres)", + "enum": [ + "db.postgres", + "db.redis", + "db.mongo", + "host.containerapp", + "ai.openai.model" + ] + }, + "uses": { + "type": "array", + "title": "Other resources that this resource uses", + "items": { + "type": "string" + }, + "uniqueItems": true + } + } + }, + "containerAppResource": { + "type": "object", + "description": "A Docker-based container app.", + "additionalProperties": false, + "required": [ + "port" + ], + "properties": { + "type": true, + "uses": true, + "port": { + "type": "integer", + "title": "Port that the container app listens on", + "description": "Optional. The port that the container app listens on. (Default: 80)" + }, + "env": { + "type": "array", + "title": "Environment variables to set for the container app", + "items": { + "type": "object", + "required": [ + "name" + ], + "additionalProperties": false, + "properties": { + "name": { + "type": "string", + "title": "Name of the environment variable" + }, + "value": { + "type": "string", + "title": "Value of the environment variable. Supports environment variable substitution." + }, + "secret": { + "type": "string", + "title": "Secret value of the environment variable. Supports environment variable substitution." + } + } + } + } + } + }, + "aiModelResource": { + "type": "object", + "description": "A deployed, ready-to-use AI model.", + "additionalProperties": false, + "required": [ + "model" + ], + "properties": { + "type": true, + "uses": true, + "model": { + "type": "object", + "description": "The underlying AI model.", + "additionalProperties": false, + "required": [ + "name", + "version" + ], + "properties": { + "name": { + "type": "string", + "title": "The name of the AI model.", + "description": "Required. The name of the AI model." + }, + "version": { + "type": "string", + "title": "The version of the AI model.", + "description": "Required. The version of the AI model." + } + } + } + } } } } \ No newline at end of file