I'm not quite sure how to go about this.
I got a Terraform code to build a Linux VM on Azure. The Size is pre-defined in the Code. I was wondering how I can define the VM Size so that the user can pass the size via pre-defined Variable in the CLI.
The current variables user can pass in CLI is only Azure region:
variable "location" {
type = string
description = "Azure location of Terraform deployment"
default = "canadacentral"
}
Where the user will pass terraform apply -var "location=eastus" for example, however I would like to allow the user to also pass something like -var "size=small".
The small would represent Standard_DS1_v2 for example, where medium would instead use Standard_B2ms.