|
62 | 62 | "metadata": { |
63 | 63 | "description": "Deployment name for role assignment operation" |
64 | 64 | } |
| 65 | + }, |
| 66 | + "storageAccountAllowSharedKeyAccess": { |
| 67 | + "type": "bool", |
| 68 | + "defaultValue": false, |
| 69 | + "metadata": { |
| 70 | + "description": "Whether to allow shared key access on the storage account. Defaults to false (secure) for new accounts; existing accounts should pass their current value to avoid breaking changes." |
| 71 | + } |
65 | 72 | } |
66 | 73 | }, |
67 | 74 | "functions": [], |
68 | | - "variables": {}, |
| 75 | + "variables": { |
| 76 | + "storageAccountContributorRoleId": "17d1049b-9a84-46fb-8f53-869881c3d3ab", |
| 77 | + "storageBlobDataContributorRoleId": "ba92f5b4-2d11-453d-a403-e96b0029c9fe" |
| 78 | + }, |
69 | 79 | "resources": [ |
70 | 80 | { |
71 | 81 | "type": "Microsoft.Quantum/workspaces", |
72 | | - "apiVersion": "2019-11-04-preview", |
| 82 | + "apiVersion": "2025-12-15-preview", |
73 | 83 | "name": "[parameters('quantumWorkspaceName')]", |
74 | 84 | "location": "[parameters('location')]", |
75 | 85 | "tags": "[parameters('tags')]", |
|
105 | 115 | "kind": "[parameters('storageAccountKind')]", |
106 | 116 | "properties": { |
107 | 117 | "allowBlobPublicAccess": false, |
| 118 | + "allowSharedKeyAccess": "[parameters('storageAccountAllowSharedKeyAccess')]", |
108 | 119 | "minimumTlsVersion": "TLS1_2" |
109 | 120 | }, |
110 | 121 | "resources": [ |
|
145 | 156 | }, |
146 | 157 | { |
147 | 158 | "apiVersion": "2020-04-01-preview", |
148 | | - "name": "[concat(parameters('storageAccountName'), '/Microsoft.Authorization/', guid(reference(concat('Microsoft.Quantum/Workspaces/', parameters('quantumWorkspaceName')), '2019-11-04-preview', 'Full').identity.principalId))]", |
| 159 | + "name": "[concat(parameters('storageAccountName'), '/Microsoft.Authorization/', guid(reference(concat('Microsoft.Quantum/Workspaces/', parameters('quantumWorkspaceName')), '2025-12-15-preview', 'Full').identity.principalId, variables('storageAccountContributorRoleId')))]", |
| 160 | + "type": "Microsoft.Storage/storageAccounts/providers/roleAssignments", |
| 161 | + "location": "[parameters('storageAccountLocation')]", |
| 162 | + "properties": { |
| 163 | + "roleDefinitionId": "[resourceId('Microsoft.Authorization/roleDefinitions', variables('storageAccountContributorRoleId'))]", |
| 164 | + "principalId": "[reference(concat('Microsoft.Quantum/Workspaces/', parameters('quantumWorkspaceName')), '2025-12-15-preview', 'Full').identity.principalId]", |
| 165 | + "principalType": "ServicePrincipal" |
| 166 | + }, |
| 167 | + "dependsOn": [ |
| 168 | + "[parameters('storageAccountId')]" |
| 169 | + ] |
| 170 | + }, |
| 171 | + { |
| 172 | + "apiVersion": "2020-04-01-preview", |
| 173 | + "name": "[concat(parameters('storageAccountName'), '/Microsoft.Authorization/', guid(reference(concat('Microsoft.Quantum/Workspaces/', parameters('quantumWorkspaceName')), '2025-12-15-preview', 'Full').identity.principalId, variables('storageBlobDataContributorRoleId')))]", |
149 | 174 | "type": "Microsoft.Storage/storageAccounts/providers/roleAssignments", |
150 | 175 | "location": "[parameters('storageAccountLocation')]", |
151 | 176 | "properties": { |
152 | | - "roleDefinitionId": "[resourceId('Microsoft.Authorization/roleDefinitions', '17d1049b-9a84-46fb-8f53-869881c3d3ab')]", |
153 | | - "principalId": "[reference(concat('Microsoft.Quantum/Workspaces/', parameters('quantumWorkspaceName')), '2019-11-04-preview', 'Full').identity.principalId]", |
| 177 | + "roleDefinitionId": "[resourceId('Microsoft.Authorization/roleDefinitions', variables('storageBlobDataContributorRoleId'))]", |
| 178 | + "principalId": "[reference(concat('Microsoft.Quantum/Workspaces/', parameters('quantumWorkspaceName')), '2025-12-15-preview', 'Full').identity.principalId]", |
154 | 179 | "principalType": "ServicePrincipal" |
155 | 180 | }, |
156 | 181 | "dependsOn": [ |
|
0 commit comments