Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[FEAT] Update Center - Configuring Maintenance Configurations dynamic assignments #3

Open
aolmosj opened this issue Sep 18, 2024 · 1 comment
Labels
enhancement New feature or request

Comments

@aolmosj
Copy link

aolmosj commented Sep 18, 2024

Community Note

  • Please vote on this issue by adding a 👍 reaction to the original issue to help the community and maintainers prioritize this request
  • Please do not leave "+1" or "me too" comments, they generate extra noise for issue followers and do not help prioritize the request
  • If you are interested in working on this issue or have submitted a pull request, please leave a comment

Description

When using the Update Center module you can't configure the maintenance configurations dynamic scope.

You can make assigments for the created maintenance configuration from the virtual machine module, but I think that it could be useful to set a dynamic assignment scope for the maintenance configuration.

I could submit a PR to implement this.

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

azurerm_maintenance_assignment_dynamic_scope

Potential Terraform Configuration

New variable

variable "mc_dynamic_scope_enabled" {
  description = "Enable Maintenance configuration dynamic scope for current subscription."
  type        = bool
}

New resource

resource "azurerm_maintenance_assignment_dynamic_scope" "mc_dynamic_scope" {
  for_each = var.mc_dynamic_scope_enabled ? { for config in var.maintenance_configurations : config.configuration_name => config } : {}
  name                         = "mcdc-${each.key}"
  maintenance_configuration_id = azurerm_maintenance_configuration.maintenance_configurations[each.key].id

  filter {
    locations       = var.location
    os_types        = ["Linux", "Windows"]
  }
}

References

No response

@aolmosj aolmosj added the enhancement New feature or request label Sep 18, 2024
@aolmosj aolmosj changed the title [FEAT] Update Center - Configuring Maintenance Windows assignments [FEAT] Update Center - Configuring Maintenance Windows dynamic assignments Sep 18, 2024
@aolmosj aolmosj changed the title [FEAT] Update Center - Configuring Maintenance Windows dynamic assignments [FEAT] Update Center - Configuring Maintenance Configurations dynamic assignments Sep 18, 2024
@Shr3ps
Copy link
Member

Shr3ps commented Sep 20, 2024

Hi @aolmosj ,

Nice suggestion, would be great if you can open a PR!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants