Closed MikeDembek closed 2 months ago
Thanks @MikeDembek I will fix this.
@Kanik09, interested in your thoughts on this issue. Should we be able to create VMSS Flex instances without a source image or os profile? These are optional parameters in the azurerm_orchestrated_virtual_machine_scale_set provider and also appear to be optional in the ARM API and also the CLI.
If I remove these sections, I get the following error message from the underlying Terraform provider:
Error: creating Orchestrated Virtual Machine Scale Set (Subscription: "1f16fd54-0921-4c3d-81b1-edde291f16df"
│ Resource Group Name: "rg-zcul"
│ Virtual Machine Scale Set Name: "vmss-zcul"): performing CreateOrUpdate: unexpected status 400 (400 Bad Request) with error: InvalidParameter: Required parameter 'osProfile' is missing (null).
│
│ with module.terraform_azurerm_avm_res_compute_virtualmachinescaleset.azurerm_orchestrated_virtual_machine_scale_set.virtual_machine_scale_set,
│ on ..\..\main.tf line 1, in resource "azurerm_orchestrated_virtual_machine_scale_set" "virtual_machine_scale_set":
│ 1: resource "azurerm_orchestrated_virtual_machine_scale_set" "virtual_machine_scale_set" {
@marcelkmfst
Fixed validation in v0.3.0. The underlying provider still fails if an image and os provider is not provided. I am closing the issue as there is nothing more I can do in the AVM.
Please create a issue in the underlying VMSS Flex provider if required. I'd create the issue myself, but I don't know the business justification for creating VMSS without an image or os profile. It is probably best that you interact with them directly instead of me getting in the middle.
Note that you can create a VMSS with 0 instances, but you still need to provide an image and os profile.
Thank you - for me this was about consistency between documentation and usage of the module in practice more than a specific business justification (I was doing a PoC with a minimum viable config, not something I'd do outside early-phase testing). I appreciate the follow-up.
Check for previous/existing GitHub issues
Issue Type?
Bug
(Optional) Module Version
0.2.0
(Optional) Correlation Id
No response
Description
Hello, I'm seeing validation errors if I don't specify an os_profile, which is listed as an optional parameter in both the AVM and the underlying provider documentation. Here's an example error:
Here's a basic example of what I'm using to reproduce this:
In the AVM's variables.tf we see os_profile defaults to null, but that appears to fail the validations starting at line 599. Could this be updated to either result in a pass on a default/null entry?
Thanks!