Azure / terraform-azurerm-avm-res-compute-virtualmachinescaleset

MIT License
4 stars 10 forks source link

[VMSS Terraform AVM Review PG Feedback] #2 Best Practices #59

Closed Kanik09 closed 2 months ago

Kanik09 commented 5 months ago

Please follow the below best practices for the corresponding modules. Not all practices should be followed for both default and max.

 

VMSS Best Practice Applicable AVM Module Applicable for Default Applicable for Max
Deploy VMSS with Flex Orchestration mode Terraform, Bicep Yes Yes
Configure VMSS autoscale to custom and configure scaling metrics Terraform, Bicep No Yes
Configure Predictive autoscale and atleast for forecast only Terraform, Bicep No Yes
Deploy VMSS across availaibility zones with VMSS flex Terraform, Bicep Yes Yes
Disable Force strictly even balance across zones to avoid scale in and out fail attempts Terraform, Bicep Yes Yes
Enable VMSS application health monitoring Terraform, Bicep Yes if condition shared over Email is met.  Yes if condition shared over Email is met. 
Enable Automatic Repair Policy Terraform, Bicep Requires health monitoring to be enabled. Requires health monitoring to be enabled. 
Set Patch orchestration options to Azure-orchestrated Terraform, Bicep Yes Yes
Upgrade VMSS Image versions scheduled to be deprecated or already retired Terraform, Bicep    
Configure Allocation Policy Spreading Algorithm to max spreading Terraform, Bicep Yes Yes
terrymandin commented 3 months ago

As per @matt-FFFFFF comment in issue [VMSS Terraform AVM Review PG Feedback] #1 Structure of the module I will be removing the "max" example.

@Kanik09 , as you had 2 best practices around autoscaling, perhaps I should add windows and linux examples specifically for the auto scale use case?

Kanik09 commented 3 months ago

Hey @terrymandin yes let's do that. But let's ensure that both of the best practices are includes. We can add examples for both Windows and Linux.

terrymandin commented 2 months ago

@Kanik09, I have aligned with your recommendations in v0.3.0. I have also created new auto scale linux and windows examples.