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

Removed NAT Gateway & Scale Set Probe Bugfix #4

Merged
merged 1 commit into from
Jun 6, 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
3 changes: 3 additions & 0 deletions load_balancer.tf
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,7 @@ resource "azurerm_lb_rule" "monitoring_vxlan_lb_rule" {
backend_address_pool_ids = [
azurerm_lb_backend_address_pool.monitoring_pool.id
]
probe_id = azurerm_lb_probe.sensor_health_check_probe.id
}

resource "azurerm_lb_rule" "monitoring_geneve_lb_rule" {
Expand All @@ -54,6 +55,7 @@ resource "azurerm_lb_rule" "monitoring_geneve_lb_rule" {
backend_address_pool_ids = [
azurerm_lb_backend_address_pool.monitoring_pool.id
]
probe_id = azurerm_lb_probe.sensor_health_check_probe.id
}

resource "azurerm_lb_rule" "monitoring_health_check_rule" {
Expand All @@ -79,4 +81,5 @@ resource "azurerm_lb_rule" "management_lb_rule" {
backend_address_pool_ids = [
azurerm_lb_backend_address_pool.management_pool.id
]
probe_id = azurerm_lb_probe.sensor_health_check_probe.id
}
27 changes: 0 additions & 27 deletions nat_gateway.tf

This file was deleted.

8 changes: 0 additions & 8 deletions outputs.tf
Original file line number Diff line number Diff line change
Expand Up @@ -2,14 +2,6 @@ output "internal_load_balancer_name" {
value = azurerm_lb.scale_set_lb.name
}

output "nat_gateway_public_ip_name" {
value = azurerm_public_ip.nat_gw_ip.name
}

output "nat_gateway_name" {
value = azurerm_nat_gateway.lb_nat_gw.name
}

output "sensor_identity_principal_id" {
value = azurerm_linux_virtual_machine_scale_set.sensor_scale_set.identity[0].principal_id
}
Expand Down
6 changes: 6 additions & 0 deletions scale_set.tf
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,8 @@ resource "azurerm_linux_virtual_machine_scale_set" "sensor_scale_set" {
}

health_probe_id = azurerm_lb_probe.sensor_health_check_probe.id
upgrade_mode = "Automatic"

network_interface {
name = "management-nic"
primary = true
Expand Down Expand Up @@ -51,6 +53,10 @@ resource "azurerm_linux_virtual_machine_scale_set" "sensor_scale_set" {
}

tags = var.tags

depends_on = [
azurerm_lb_rule.monitoring_health_check_rule,
]
}

resource "azurerm_monitor_autoscale_setting" "auto_scale_config" {
Expand Down
12 changes: 0 additions & 12 deletions variables.tf
Original file line number Diff line number Diff line change
Expand Up @@ -57,18 +57,6 @@ variable "sensor_admin_username" {
default = "corelight"
}

variable "nat_gateway_ip_name" {
description = "The resource name of the VMSS NAT Gateway public IP resource"
type = string
default = "cl-nat-gw-ip"
}

variable "nat_gateway_name" {
description = "The resource name of the VMSS NAT Gateway resource"
type = string
default = "cl-sensor-nat-gw"
}

variable "autoscale_setting_name" {
description = "The VMSS autoscale monitor name"
type = string
Expand Down