https://pulumi.com logo
Title
a

average-greece-53878

06/02/2021, 4:07 PM
Hello! I'm using azure-native's
VirtualMachineRunCommandByVirtualMachine
and get this error:
Code="OperationNotAllowed" Message="The property 'runCommands' is not valid because the 'Microsoft.Compute/RunCommandPreview' feature is not enabled for this subscription."
b

billowy-army-68599

06/02/2021, 4:09 PM
can you open a github issue in the provider repo for this? https://github.com/pulumi/pulumi-azure-native/
we generate our SDK directly from the upstream APIs so if it's outdated, it'd be a surprise 😄
t

tall-librarian-49374

06/02/2021, 4:12 PM
Based on https://github.com/Azure/azure-sdk-for-go/issues/14493
Microsoft confirmed, that the Microsoft.Compute/RunCommandPreview feature is no longer used/available.
This resource uses
/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachines/{vmName}/runCommands/{runCommandName}
defined in the API version 2021-03-01
Is Microsoft suggesting this API is outdated?
a

average-greece-53878

06/02/2021, 4:25 PM
The relevant part of Microsoft's response was:
You shared with me the following error:
"error: autorest/azure: Service returned an error. Status=nil
Code='OperationNotAllowed' Message='The property 'runCommands' is not valid because the 'Microsoft.Compute/RunCommandPreview' feature is not enabled for this subscription.'".
 
This error suggests that this job is looking for the Run Command feature under the Preview features for the subscription, however it is now out of public preview.
Since this Job is being ran using the Pulumi third party software, it is possible the job is outdated regarding the state of the Run Command Feature, since Pulumi itself is not supported by Microsoft support I suggested opening a request with their support.
t

tall-librarian-49374

06/02/2021, 6:33 PM
Do you have a relevant ARM template or something like that with a “supported” tool?
a

average-greece-53878

06/03/2021, 2:29 PM
No, not currently using ARM templates
Would ARM template be a workaround for this?
t

tall-librarian-49374

06/04/2021, 8:30 PM
If you find a working ARM template, I’ll figure out how to translate it to Pulumi
t

tall-librarian-49374

06/22/2021, 10:28 AM
And does it work? I think it’s exactly the same resource that you’ve been trying….
a

average-greece-53878

06/22/2021, 1:22 PM
No clue. Nobody in our org has experience writing and deploying ARM templates. That's one of the reasons we hoped to use Pulumi. Is running powershell commands on Windows VMs not that common via Pulumi?