Skip to content

Azure Bicep & Microsoft.DevTestLab/schedules cannot get targetResourceId #5086

Answered by brwilkinson
Jetelaczek asked this question in Q&A
Discussion options

You must be logged in to vote

Hi @Jetelaczek

In this case there is a very specific naming standard required, which is: shutdown-computevm-${computerName}

So just replace whatever you used to name your virtualMachine with computerName above.

Sample here:
https://github.com/brwilkinson/AzureDeploymentFramework/blob/f79d488fb6fd6191629f65d46b98297979464200/ADF/bicep/VM.bicep#L326

In the case of the sample:

// name of vm
name: '${Deployment}-vm${vm.Name}'

// name of schedule
name: 'shutdown-computevm-${Deployment}-vm${vm.Name}'

so computername is: ${Deployment}-vm${vm.Name}

Replies: 1 comment 2 replies

Comment options

You must be logged in to vote
2 replies
@Jetelaczek
Comment options

@brwilkinson
Comment options

Answer selected by Jetelaczek
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants