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: add virtual hub security partner provider support #66

Merged
merged 1 commit into from
Oct 28, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,7 @@ End-to-end testing is not conducted on these modules, as they are individual com
|------|------|
| [azurerm_point_to_site_vpn_gateway.p2s_gateway](https://registry.terraform.io/providers/hashicorp/azurerm/latest/docs/resources/point_to_site_vpn_gateway) | resource |
| [azurerm_virtual_hub.vhub](https://registry.terraform.io/providers/hashicorp/azurerm/latest/docs/resources/virtual_hub) | resource |
| [azurerm_virtual_hub_security_partner_provider.spp](https://registry.terraform.io/providers/hashicorp/azurerm/latest/docs/resources/virtual_hub_security_partner_provider) | resource |
| [azurerm_virtual_wan.vwan](https://registry.terraform.io/providers/hashicorp/azurerm/latest/docs/resources/virtual_wan) | resource |
| [azurerm_vpn_gateway.vpn_gateway](https://registry.terraform.io/providers/hashicorp/azurerm/latest/docs/resources/vpn_gateway) | resource |
| [azurerm_vpn_gateway_connection.vpn_connection](https://registry.terraform.io/providers/hashicorp/azurerm/latest/docs/resources/vpn_gateway_connection) | resource |
Expand Down
17 changes: 17 additions & 0 deletions main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -196,3 +196,20 @@ resource "azurerm_vpn_gateway_connection" "vpn_connection" {
remote_address_ranges = try(each.value.remote_address_ranges, [])
}
}

# security partner provider
resource "azurerm_virtual_hub_security_partner_provider" "spp" {
for_each = {
for k, v in lookup(var.vwan, "vhubs", {}) : k => v
if lookup(v, "security_partner_provider", null) != null
}

name = each.value.security_partner_provider.name
resource_group_name = coalesce(lookup(var.vwan, "resource_group", null), var.resource_group)
location = coalesce(lookup(each.value, "location", null), var.location)
virtual_hub_id = azurerm_virtual_hub.vhub[each.key].id
security_provider_name = each.value.security_partner_provider.security_provider_name
tags = try(each.value.tags, var.tags)

depends_on = [azurerm_vpn_gateway.vpn_gateway]
}
Loading