Can't deploy hybridRunbookWorkerGroups without error
- Dominant language
- Bicep
- Stars
- 3.6k
- Forks
- 830
- Avg merge
- 1d 2h
- Merged PRs (30d)
- 79
Description
**Bicep version**
run `bicep --version` via the Bicep CLI, `az bicep version` via the AZ CLI or via VS code by navigating to the extensions tab and searching for Bicep
Bicep CLI version 0.4.1008 (223b8d227a)
**Describe the bug**
I am trying to deploy a hybrid worker group, hybrid worker, and then deploy the hybrid extension to a basic windows VM. When I go to run this code, The group successfully creates but throws an error.
```bicep
resource hybrid_worker_group 'Microsoft.Automation/automationAccounts/hybridRunbookWorkerGroups@2021-06-22' = {
name: 'HybridGroup1'
parent: automation_test_acct
dependsOn:[automation_credential
]
}
```
Error message
```
{"status":"Failed","error":{"code":"DeploymentFailed","message":"At least one resource deployment operation failed. Please list deployment operations for details. Please see https://aka.ms/DeployOperations for usage details.","details":[{"code":"InternalServerError","message":"{\r\n \"error\": {\r\n \"code\": \"ResourceDeploymentFailure\",\r\n \"message\": \"The response for resource had empty or invalid content.\"\r\n }\r\n}"}]}}
```
Raw error
```
{
"code": "DeploymentFailed",
"message": "At least one resource deployment operation failed. Please list deployment operations for details. Please see https://aka.ms/DeployOperations for usage details.",
"details": [
{
"code": "ResourceDeploymentFailure",
"message": "The response for resource had empty or invalid content."
}
]
}
```
So looking at the provider documentation here - https://docs.microsoft.com/en-us/azure/templates/microsoft.automation/2021-06-22/automationaccounts/hybridrunbookworkergroups?tabs=bicep#runascredentialassociationproperty
I need to reference a credential block. I do not need to do this in the portal though and it can be blank. I have tried just including a blank credential block, omitting the block and for the heck of it, deploying a credential and then referencing the credential in multiple ways (static name, referencing credential_test.name, credential_test.property.description) and then I get this error
```bicep
resource automation_credential 'Microsoft.Automation/automationAccounts/credentials@2020-01-13-preview' = {
name: 'unused'
parent: automation_test_acct
properties: {
description: 'unused'
password: 'username'
userName: 'password123'
}
}
output output2 string = automation_credential.name
resource hybrid_worker_group 'Microsoft.Automation/automationAccounts/hybridRunbookWorkerGroups@2021-06-22' = {
name: 'HybridGroup1'
parent: automation_test_acct
credential: {
name: automation_credential.properties.description
}
dependsOn:[automation_credential
]
}
```
```
{"status":"Failed","error":{"code":"DeploymentFailed","message":"At least one resource deployment operation failed. Please list deployment operations for details. Please see https://aka.ms/DeployOperations for usage details.","details":[{"code":"InternalServerError","message":"{\r\n \"error\": {\r\n \"code\": \"ResourceDeploymentFailure\",\r\n \"message\": \"The response for resource had empty or invalid content.\"\r\n }\r\n}"}]}}
```
**Additional context**
I know this feature is in preview but trying to see if this is a problem with my bicep code or from what I can tell appears to be potentially a bug. any help is appreciated!
Contributor guide
Research direction
Reproduce the deployment using the shown hybridRunbookWorkerGroups Bicep resource and the listed Bicep CLI or Azure CLI commands. Inspect the deployment operations referenced by aka.ms/DeployOperations, comparing cases with no credential block, a blank block, and a credential reference. Done means the hybrid worker group deploys without the empty or invalid content error.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- azure
- Domain
- cloud
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100