hashicorp / terraform-provider-azurerm

Terraform provider for Azure Resource Manager
https://registry.terraform.io/providers/hashicorp/azurerm/latest/docs
Mozilla Public License 2.0
4.51k stars 4.6k forks source link

Support for VMSS 2.0 shutdown filtering #26459

Open tom171296 opened 2 months ago

tom171296 commented 2 months ago

Is there an existing issue for this?

Community Note

Description

In the VMSS 2.0 shutdown capability, you're able to set a zone filter to only shutdown node that are in the selected zones. This filter feature is present here but is always nil. I would like the possibility to filter zones in the VMSS target selector.

New or Affected Resource(s)/Data Source(s)

azurerm_chaos_studio_experiment

Potential Terraform Configuration

resource "azurerm_chaos_studio_experiment" "example" {
  location            = azurerm_resource_group.example.location
  name                = "example"
  resource_group_name = azurerm_resource_group.example.name

  identity {
    type = "SystemAssigned"
  }

  selectors {
    name                    = "Selector1"
    chaos_studio_target_ids = [azurerm_chaos_studio_target.example.id]
    filter                  = {
                                type: 'Simple'
                                parameters: {
                                  zones: [
                                        'string'
                                   ]
                             }
  }

  steps {
    name = "example"
    branch {
      name = "example"
      actions {
        urn           = azurerm_chaos_studio_capability.example.urn
        selector_name = "Selector1"
        parameters = {
          abruptShutdown = "false"
        }
        action_type = "continuous"
        duration    = "PT10M"
      }
    }
  }
}

References

https://learn.microsoft.com/en-us/azure/templates/microsoft.chaos/experiments?pivots=deployment-language-bicep#filter

tom171296 commented 2 months ago

I'd like to fix this myself, is that possible? That I come up with a suggestion and propose an implementation

AndrewCi commented 1 month ago

We're also looking for this support. @tom171296 were you able to develop a fix?