diff --git a/specification/app/resource-manager/Microsoft.App/preview/2022-06-01-preview/CommonDefinitions.json b/specification/app/resource-manager/Microsoft.App/preview/2022-06-01-preview/CommonDefinitions.json index c396923f83d0..1a2a021c4a10 100644 --- a/specification/app/resource-manager/Microsoft.App/preview/2022-06-01-preview/CommonDefinitions.json +++ b/specification/app/resource-manager/Microsoft.App/preview/2022-06-01-preview/CommonDefinitions.json @@ -594,6 +594,10 @@ "name" ] }, + "secretStoreComponent": { + "description": "Name of a Dapr component to retrieve component secrets from", + "type": "string" + }, "metadata": { "description": "Component metadata", "type": "array", diff --git a/specification/app/resource-manager/Microsoft.App/preview/2022-06-01-preview/ManagedEnvironmentsDaprComponents.json b/specification/app/resource-manager/Microsoft.App/preview/2022-06-01-preview/ManagedEnvironmentsDaprComponents.json index 90d052a42bf4..e081003402cb 100644 --- a/specification/app/resource-manager/Microsoft.App/preview/2022-06-01-preview/ManagedEnvironmentsDaprComponents.json +++ b/specification/app/resource-manager/Microsoft.App/preview/2022-06-01-preview/ManagedEnvironmentsDaprComponents.json @@ -111,8 +111,11 @@ } }, "x-ms-examples": { - "Get Dapr Component": { - "$ref": "./examples/DaprComponents_Get.json" + "Get Dapr Component with secrets": { + "$ref": "./examples/DaprComponents_Get_Secrets.json" + }, + "Get Dapr Component with secret store component": { + "$ref": "./examples/DaprComponents_Get_SecretStoreComponent.json" } } }, @@ -173,8 +176,11 @@ }, "x-ms-long-running-operation": false, "x-ms-examples": { - "Create or update dapr component": { - "$ref": "./examples/DaprComponents_CreateOrUpdate.json" + "Create or update dapr component with secrets": { + "$ref": "./examples/DaprComponents_CreateOrUpdate_Secrets.json" + }, + "Create or update dapr component with secret store component": { + "$ref": "./examples/DaprComponents_CreateOrUpdate_SecretStoreComponent.json" } } }, diff --git a/specification/app/resource-manager/Microsoft.App/preview/2022-06-01-preview/examples/DaprComponents_CreateOrUpdate_SecretStoreComponent.json b/specification/app/resource-manager/Microsoft.App/preview/2022-06-01-preview/examples/DaprComponents_CreateOrUpdate_SecretStoreComponent.json new file mode 100644 index 000000000000..c549a8ca4278 --- /dev/null +++ b/specification/app/resource-manager/Microsoft.App/preview/2022-06-01-preview/examples/DaprComponents_CreateOrUpdate_SecretStoreComponent.json @@ -0,0 +1,78 @@ +{ + "parameters": { + "subscriptionId": "8efdecc5-919e-44eb-b179-915dca89ebf9", + "resourceGroupName": "examplerg", + "environmentName": "myenvironment", + "componentName": "reddog", + "api-version": "2022-06-01-preview", + "daprComponentEnvelope": { + "properties": { + "componentType": "state.azure.cosmosdb", + "version": "v1", + "ignoreErrors": false, + "initTimeout": "50s", + "secretStoreComponent": "my-secret-store", + "metadata": [ + { + "name": "url", + "value": "" + }, + { + "name": "database", + "value": "itemsDB" + }, + { + "name": "collection", + "value": "items" + }, + { + "name": "masterkey", + "secretRef": "masterkey" + } + ], + "scopes": [ + "container-app-1", + "container-app-2" + ] + } + } + }, + "responses": { + "200": { + "body": { + "id": "/subscriptions/8efdecc5-919e-44eb-b179-915dca89ebf9/resourceGroups/examplerg/providers/Microsoft.App/managedEnvironments/jlaw-demo1/daprcomponents/reddog", + "name": "reddog", + "type": "Microsoft.App/managedEnvironments/daprcomponents", + "properties": { + "componentType": "state.azure.cosmosdb", + "version": "v1", + "ignoreErrors": false, + "initTimeout": "50s", + "secretStoreComponent": "my-secret-store", + "metadata": [ + { + "name": "url", + "value": "" + }, + { + "name": "database", + "value": "itemsDB" + }, + { + "name": "collection", + "value": "items" + }, + { + "name": "masterkey", + "secretRef": "masterkey" + } + ], + "scopes": [ + "container-app-1", + "container-app-2" + ] + } + } + } + } +} diff --git a/specification/app/resource-manager/Microsoft.App/preview/2022-06-01-preview/examples/DaprComponents_CreateOrUpdate.json b/specification/app/resource-manager/Microsoft.App/preview/2022-06-01-preview/examples/DaprComponents_CreateOrUpdate_Secrets.json similarity index 100% rename from specification/app/resource-manager/Microsoft.App/preview/2022-06-01-preview/examples/DaprComponents_CreateOrUpdate.json rename to specification/app/resource-manager/Microsoft.App/preview/2022-06-01-preview/examples/DaprComponents_CreateOrUpdate_Secrets.json diff --git a/specification/app/resource-manager/Microsoft.App/preview/2022-06-01-preview/examples/DaprComponents_Get_SecretStoreComponent.json b/specification/app/resource-manager/Microsoft.App/preview/2022-06-01-preview/examples/DaprComponents_Get_SecretStoreComponent.json new file mode 100644 index 000000000000..f2c2e78380e6 --- /dev/null +++ b/specification/app/resource-manager/Microsoft.App/preview/2022-06-01-preview/examples/DaprComponents_Get_SecretStoreComponent.json @@ -0,0 +1,47 @@ +{ + "parameters": { + "subscriptionId": "8efdecc5-919e-44eb-b179-915dca89ebf9", + "resourceGroupName": "examplerg", + "environmentName": "myenvironment", + "componentName": "reddog", + "api-version": "2022-06-01-preview" + }, + "responses": { + "200": { + "body": { + "id": "/subscriptions/8efdecc5-919e-44eb-b179-915dca89ebf9/resourceGroups/examplerg/providers/Microsoft.App/managedEnvironments/jlaw-demo1/daprcomponents/reddog", + "name": "reddog", + "type": "Microsoft.App/managedEnvironments/daprcomponents", + "properties": { + "componentType": "state.azure.cosmosdb", + "version": "v1", + "ignoreErrors": false, + "initTimeout": "50s", + "secretStoreComponent": "my-secret-store", + "metadata": [ + { + "name": "url", + "value": "" + }, + { + "name": "database", + "value": "itemsDB" + }, + { + "name": "collection", + "value": "items" + }, + { + "name": "masterkey", + "secretRef": "masterkey" + } + ], + "scopes": [ + "container-app-1", + "container-app-2" + ] + } + } + } + } +} diff --git a/specification/app/resource-manager/Microsoft.App/preview/2022-06-01-preview/examples/DaprComponents_Get.json b/specification/app/resource-manager/Microsoft.App/preview/2022-06-01-preview/examples/DaprComponents_Get_Secrets.json similarity index 100% rename from specification/app/resource-manager/Microsoft.App/preview/2022-06-01-preview/examples/DaprComponents_Get.json rename to specification/app/resource-manager/Microsoft.App/preview/2022-06-01-preview/examples/DaprComponents_Get_Secrets.json diff --git a/specification/app/resource-manager/Microsoft.App/preview/2022-06-01-preview/examples/DaprComponents_List.json b/specification/app/resource-manager/Microsoft.App/preview/2022-06-01-preview/examples/DaprComponents_List.json index 168e30a9d07e..0c021c36c9ed 100644 --- a/specification/app/resource-manager/Microsoft.App/preview/2022-06-01-preview/examples/DaprComponents_List.json +++ b/specification/app/resource-manager/Microsoft.App/preview/2022-06-01-preview/examples/DaprComponents_List.json @@ -46,6 +46,74 @@ "container-app-2" ] } + }, + { + "id": "/subscriptions/8efdecc5-919e-44eb-b179-915dca89ebf9/resourceGroups/examplerg/providers/Microsoft.App/managedEnvironments/myenvironment/daprcomponents/vaultdog", + "name": "vaultdog", + "type": "Microsoft.App/managedEnvironments/daprcomponents", + "properties": { + "componentType": "state.azure.cosmosdb", + "version": "v1", + "ignoreErrors": false, + "initTimeout": "50s", + "secretStoreComponent": "my-secret-store", + "metadata": [ + { + "name": "url", + "value": "" + }, + { + "name": "database", + "value": "itemsDB" + }, + { + "name": "collection", + "value": "items" + }, + { + "name": "masterkey", + "secretRef": "masterkey" + } + ], + "scopes": [ + "container-app-1", + "container-app-2" + ] + } + }, + { + "id": "/subscriptions/8efdecc5-919e-44eb-b179-915dca89ebf9/resourceGroups/examplerg/providers/Microsoft.App/managedEnvironments/myenvironment/daprcomponents/vaultdog", + "name": "vaultdog", + "type": "Microsoft.App/managedEnvironments/daprcomponents", + "properties": { + "componentType": "state.azure.cosmosdb", + "version": "v1", + "ignoreErrors": false, + "initTimeout": "50s", + "secretStoreComponent": "my-secret-store", + "metadata": [ + { + "name": "url", + "secretRef": "cosmosdb/url" + }, + { + "name": "database", + "value": "itemsDB" + }, + { + "name": "collection", + "value": "items" + }, + { + "name": "masterkey", + "secretRef": "cosmosdb/masterkey" + } + ], + "scopes": [ + "container-app-1", + "container-app-2" + ] + } } ] }