https://pulumi.com logo
#azure
Title
# azure
k

kind-mechanic-53546

03/16/2021, 9:56 PM
Any pointers on setting up a spot instance VM with azure-native? Adding the below to a VM
Copy code
billingProfile: {
                maxPrice: 0.03,
            },
            evictionPolicy: "Deallocate",
gives the error
Copy code
error: Code="InvalidParameter" Message="Eviction policy can be set only on Azure Spot Virtual Machines. For more information, see <http://aka.ms/AzureSpot/errormessages>." Target="billingProfile"
Docs don't really mention much apart from those two elements around spot instances
t

tall-librarian-49374

03/16/2021, 10:04 PM
Do you have this set?
Copy code
priority: "Spot",
k

kind-mechanic-53546

03/16/2021, 10:11 PM
No I didnt, thank you
It's right there in the docs, I just didnt scroll down far enough in my find for spot 😞
should a change in that trigger a replace as it errors?
Copy code
error: Code="BadRequest" Message="The specified priority value 'Spot' cannot be applied to the Virtual Machine 'ed-dev-admin-vm5e9acebc' since no priority was specified when the Virtual Machine was created. For more information, see <http://aka.ms/AzureSpot/errormessages>."
I can log an issue if so
t

tall-librarian-49374

03/16/2021, 10:18 PM
Ideally it should replace. Probably, an annotation is missing in Azure Open API specs.
👍 1
6 Views