How to get reserved instance for VM provisioned with terraform?

daniel tuttle 20 Reputation points
2023-03-22T22:27:05.6533333+00:00

Hello. I want to make sure I do this right because I don't want to spend 2000 bucks to find out I did it wrong. I want to get a 4 core 16GB ram VM as a reserved instance for 3 years so I can save money. I also want to provision this with terraform. I want to check that I am doing this right. I think that I provision the resources with terraform, then in the azure console in the Reservations section I purchase the resource reservation. Does it automatically apply to my terraform provisioned VM? If not, how do I designate my terraform provisioned VM as a reserved instance?

Azure Virtual Machines
Azure Virtual Machines
An Azure service that is used to provision Windows and Linux virtual machines.
9,013 questions
{count} votes

Accepted answer
  1. TP 124.7K Reputation points Volunteer Moderator
    2023-03-22T22:31:00.7833333+00:00

    Hi,

    If you purchase reserved instance type that matches what you provisioned with terraform, then the discount will be automatically applied.

    How the Azure reservation discount is applied to virtual machines

    https://learn.microsoft.com/en-us/azure/cost-management-billing/manage/understand-vm-reservation-charges

    In addition, keep in mind you have the ability to do a refund/exchange:

    https://learn.microsoft.com/en-us/azure/cost-management-billing/reservations/exchange-and-refund-azure-reservations

    If the above answers your question please click Accept Answer.

    Thanks.

    -TP


0 additional answers

Sort by: Most helpful

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.