From 81c70175a587df65932a8ffebed786d909f1e52f Mon Sep 17 00:00:00 2001 From: ItalyPaleAle <43508+ItalyPaleAle@users.noreply.github.com> Date: Mon, 1 Aug 2022 19:28:03 +0000 Subject: [PATCH 1/2] Added `secretsStoreComponent` in 2022-06-01 spec Signed-off-by: ItalyPaleAle <43508+ItalyPaleAle@users.noreply.github.com> --- .../2022-06-01-preview/CommonDefinitions.json | 4 + .../ManagedEnvironmentsDaprComponents.json | 14 +++- ...s_CreateOrUpdate_SecretStoreComponent.json | 78 +++++++++++++++++++ ...aprComponents_CreateOrUpdate_Secrets.json} | 0 ...prComponents_Get_SecretStoreComponent.json | 47 +++++++++++ ...t.json => DaprComponents_Get_Secrets.json} | 0 .../examples/DaprComponents_List.json | 34 ++++++++ 7 files changed, 173 insertions(+), 4 deletions(-) create mode 100644 specification/app/resource-manager/Microsoft.App/preview/2022-06-01-preview/examples/DaprComponents_CreateOrUpdate_SecretStoreComponent.json rename specification/app/resource-manager/Microsoft.App/preview/2022-06-01-preview/examples/{DaprComponents_CreateOrUpdate.json => DaprComponents_CreateOrUpdate_Secrets.json} (100%) create mode 100644 specification/app/resource-manager/Microsoft.App/preview/2022-06-01-preview/examples/DaprComponents_Get_SecretStoreComponent.json rename specification/app/resource-manager/Microsoft.App/preview/2022-06-01-preview/examples/{DaprComponents_Get.json => DaprComponents_Get_Secrets.json} (100%) 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..f938a5c2c5b4 --- /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", + "secretsStoreComponent": "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", + "secretsStoreComponent": "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..2fc823935048 --- /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", + "secretsStoreComponent": "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..934fd30ba77e 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,40 @@ "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", + "secretsStoreComponent": "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" + ] + } } ] } From 42cbfaed15924d53235180060afbdc3cf6967da0 Mon Sep 17 00:00:00 2001 From: ItalyPaleAle <43508+ItalyPaleAle@users.noreply.github.com> Date: Mon, 1 Aug 2022 20:49:11 +0000 Subject: [PATCH 2/2] Fixed typos and added example of name/key Signed-off-by: ItalyPaleAle <43508+ItalyPaleAle@users.noreply.github.com> --- ...s_CreateOrUpdate_SecretStoreComponent.json | 4 +-- ...prComponents_Get_SecretStoreComponent.json | 2 +- .../examples/DaprComponents_List.json | 36 ++++++++++++++++++- 3 files changed, 38 insertions(+), 4 deletions(-) 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 index f938a5c2c5b4..c549a8ca4278 100644 --- 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 @@ -11,7 +11,7 @@ "version": "v1", "ignoreErrors": false, "initTimeout": "50s", - "secretsStoreComponent": "my-secret-store", + "secretStoreComponent": "my-secret-store", "metadata": [ { "name": "url", @@ -48,7 +48,7 @@ "version": "v1", "ignoreErrors": false, "initTimeout": "50s", - "secretsStoreComponent": "my-secret-store", + "secretStoreComponent": "my-secret-store", "metadata": [ { "name": "url", 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 index 2fc823935048..f2c2e78380e6 100644 --- 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 @@ -17,7 +17,7 @@ "version": "v1", "ignoreErrors": false, "initTimeout": "50s", - "secretsStoreComponent": "my-secret-store", + "secretStoreComponent": "my-secret-store", "metadata": [ { "name": "url", 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 934fd30ba77e..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 @@ -56,7 +56,7 @@ "version": "v1", "ignoreErrors": false, "initTimeout": "50s", - "secretsStoreComponent": "my-secret-store", + "secretStoreComponent": "my-secret-store", "metadata": [ { "name": "url", @@ -80,6 +80,40 @@ "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" + ] + } } ] }