Skip to content
Open
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
6 changes: 6 additions & 0 deletions deployment/terraform/azure/observers/variables.tf
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,12 @@ variable "resource_suffix" {
default = null
}

variable "enable_nay_gw" {
description = "Enables NAT gw creation"
type = bool
default = false
}

variable "enable_encryption_at_host" {
description = "Enables encryption at host for the node's managed disks"
type = bool
Expand Down
14 changes: 11 additions & 3 deletions deployment/terraform/azure/observers/vpc.tf
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,8 @@ resource "azurerm_subnet_network_security_group_association" "this" {
}

resource "azurerm_nat_gateway" "this" {
count = var.enable_nay_gw ? 1 : 0

name = "${local.resource_prefix}-vnet-nat-gw"
resource_group_name = local.resource_group_name
location = local.location
Expand All @@ -28,11 +30,15 @@ resource "azurerm_nat_gateway" "this" {
}

resource "azurerm_subnet_nat_gateway_association" "this" {
count = var.enable_nay_gw ? 1 : 0

subnet_id = azurerm_subnet.this.id
nat_gateway_id = azurerm_nat_gateway.this.id
nat_gateway_id = azurerm_nat_gateway.this[0].id
}

resource "azurerm_public_ip" "nat_gw" {
count = var.enable_nay_gw ? 1 : 0

name = "${local.resource_prefix}-nat-gw-public-ip"
location = local.location
resource_group_name = local.resource_group_name
Expand All @@ -43,6 +49,8 @@ resource "azurerm_public_ip" "nat_gw" {
}

resource "azurerm_nat_gateway_public_ip_association" "this" {
nat_gateway_id = azurerm_nat_gateway.this.id
public_ip_address_id = azurerm_public_ip.nat_gw.id
count = var.enable_nay_gw ? 1 : 0

nat_gateway_id = azurerm_nat_gateway.this[0].id
public_ip_address_id = azurerm_public_ip.nat_gw[0].id
}
6 changes: 6 additions & 0 deletions deployment/terraform/azure/private-sentries/variables.tf
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,12 @@ variable "location" {
default = null
}

variable "enable_nay_gw" {
description = "Enables NAT gw creation"
type = bool
default = false
}

variable "enable_encryption_at_host" {
description = "Enables encryption at host for the node's managed disks"
type = bool
Expand Down
14 changes: 11 additions & 3 deletions deployment/terraform/azure/private-sentries/vpc.tf
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,8 @@ resource "azurerm_subnet_network_security_group_association" "this" {
}

resource "azurerm_nat_gateway" "this" {
count = var.enable_nay_gw ? 1 : 0

name = "private-sentries-vnet-nat-gw"
resource_group_name = local.resource_group_name
location = local.location
Expand All @@ -28,11 +30,15 @@ resource "azurerm_nat_gateway" "this" {
}

resource "azurerm_subnet_nat_gateway_association" "this" {
count = var.enable_nay_gw ? 1 : 0

subnet_id = azurerm_subnet.this.id
nat_gateway_id = azurerm_nat_gateway.this.id
nat_gateway_id = azurerm_nat_gateway.this[0].id
}

resource "azurerm_public_ip" "nat_gw" {
count = var.enable_nay_gw ? 1 : 0

name = "private-sentries-nat-gw-public-ip"
location = local.location
resource_group_name = local.resource_group_name
Expand All @@ -43,6 +49,8 @@ resource "azurerm_public_ip" "nat_gw" {
}

resource "azurerm_nat_gateway_public_ip_association" "this" {
nat_gateway_id = azurerm_nat_gateway.this.id
public_ip_address_id = azurerm_public_ip.nat_gw.id
count = var.enable_nay_gw ? 1 : 0

nat_gateway_id = azurerm_nat_gateway.this[0].id
public_ip_address_id = azurerm_public_ip.nat_gw[0].id
}
6 changes: 6 additions & 0 deletions deployment/terraform/azure/public-sentries/variables.tf
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,12 @@ variable "resource_suffix" {
default = null
}

variable "enable_nay_gw" {
description = "Enables NAT gw creation"
type = bool
default = false
}

variable "enable_encryption_at_host" {
description = "Enables encryption at host for the node's managed disks"
type = bool
Expand Down
14 changes: 11 additions & 3 deletions deployment/terraform/azure/public-sentries/vpc.tf
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,8 @@ resource "azurerm_subnet_network_security_group_association" "this" {
}

resource "azurerm_nat_gateway" "this" {
count = var.enable_nay_gw ? 1 : 0

name = "${local.resource_prefix}-vnet-nat-gw"
resource_group_name = local.resource_group_name
location = local.location
Expand All @@ -30,11 +32,15 @@ resource "azurerm_nat_gateway" "this" {
}

resource "azurerm_subnet_nat_gateway_association" "this" {
count = var.enable_nay_gw ? 1 : 0

subnet_id = azurerm_subnet.this.id
nat_gateway_id = azurerm_nat_gateway.this.id
nat_gateway_id = azurerm_nat_gateway.this[0].id
}

resource "azurerm_public_ip" "nat_gw" {
count = var.enable_nay_gw ? 1 : 0

name = "${local.resource_prefix}-nat-gw-public-ip"
location = local.location
resource_group_name = local.resource_group_name
Expand All @@ -45,6 +51,8 @@ resource "azurerm_public_ip" "nat_gw" {
}

resource "azurerm_nat_gateway_public_ip_association" "this" {
nat_gateway_id = azurerm_nat_gateway.this.id
public_ip_address_id = azurerm_public_ip.nat_gw.id
count = var.enable_nay_gw ? 1 : 0

nat_gateway_id = azurerm_nat_gateway.this[0].id
public_ip_address_id = azurerm_public_ip.nat_gw[0].id
}
6 changes: 6 additions & 0 deletions deployment/terraform/azure/validator/variables.tf
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,12 @@ variable "location" {
default = null
}

variable "enable_nay_gw" {
description = "Enables NAT gw creation"
type = bool
default = false
}

variable "enable_encryption_at_host" {
description = "Enables encryption at host for the node's managed disks"
type = bool
Expand Down
14 changes: 11 additions & 3 deletions deployment/terraform/azure/validator/vpc.tf
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,8 @@ resource "azurerm_subnet_network_security_group_association" "this" {
}

resource "azurerm_nat_gateway" "this" {
count = var.enable_nay_gw ? 1 : 0

name = "validator-vnet-nat-gw"
resource_group_name = local.resource_group_name
location = local.location
Expand All @@ -28,11 +30,15 @@ resource "azurerm_nat_gateway" "this" {
}

resource "azurerm_subnet_nat_gateway_association" "this" {
count = var.enable_nay_gw ? 1 : 0

subnet_id = azurerm_subnet.this.id
nat_gateway_id = azurerm_nat_gateway.this.id
nat_gateway_id = azurerm_nat_gateway.this[0].id
}

resource "azurerm_public_ip" "nat_gw" {
count = var.enable_nay_gw ? 1 : 0

name = "validator-nat-gw-public-ip"
location = local.location
resource_group_name = local.resource_group_name
Expand All @@ -43,6 +49,8 @@ resource "azurerm_public_ip" "nat_gw" {
}

resource "azurerm_nat_gateway_public_ip_association" "this" {
nat_gateway_id = azurerm_nat_gateway.this.id
public_ip_address_id = azurerm_public_ip.nat_gw.id
count = var.enable_nay_gw ? 1 : 0

nat_gateway_id = azurerm_nat_gateway.this[0].id
public_ip_address_id = azurerm_public_ip.nat_gw[0].id
}
Loading