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

Add support for ddos_protection_plan in vnet sub-module #92

Open
jinkang23 opened this issue Sep 11, 2024 · 0 comments
Open

Add support for ddos_protection_plan in vnet sub-module #92

jinkang23 opened this issue Sep 11, 2024 · 0 comments
Assignees
Labels
enhancement New feature or request

Comments

@jinkang23
Copy link

jinkang23 commented Sep 11, 2024

Is your feature request related to a problem?

In our Azure environment, we assign DDoS Network Protection Plan to any Virtual Networks with Azure Public IPs. Since the Hub NGFW Firewall VM Series have a network interface with Public IP associated, we need to be able to set and enable DDoS protection plan in the azurerm_virtual_network resource. Currently configuration is not available in the vnet sub-module.

I would like to see support for optionally specifying the ddos_protection_plan block in the azurerm_virtual_network resource within the vnet sub-module.

Describe the solution you'd like

variable "ddos_protection_plan" {
  type = object({
    id = string 
    enable = bool
  })
  default = null
}


resource "azurerm_virtual_network" "this" {
  count = var.create_virtual_network ? 1 : 0

  ...

  dynamic "ddos_protection_plan" {
    for_each = var.ddos_protection_plan != null ? [1] : []
    content {
      id = ddos_protection_plan.value.id
      enable = ddos_protection_plan.value.enable
    }
  }

  ...

}

Describe alternatives you've considered.

None

Additional context

No response

@jinkang23 jinkang23 added the enhancement New feature or request label Sep 11, 2024
@acelebanski acelebanski self-assigned this Oct 14, 2024
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