Skip to content

Commit

Permalink
adding secondary pip disable
Browse files Browse the repository at this point in the history
  • Loading branch information
RavinderReddyF5 committed Dec 22, 2022
1 parent ad21bf3 commit 3796edf
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 15 deletions.
18 changes: 7 additions & 11 deletions main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -272,27 +272,23 @@ resource "azurerm_public_ip" "external_public_ip" {
name = "${local.instance_prefix}-pip-ext-${count.index}"
location = data.azurerm_resource_group.bigiprg.location
resource_group_name = data.azurerm_resource_group.bigiprg.name
//allocation_method = var.allocation_method
domain_name_label = format("%s-ext-%s", local.instance_prefix, count.index)
allocation_method = "Static" # Static is required due to the use of the Standard sku
sku = "Standard" # the Standard sku is required due to the use of availability zones
// availability_zone = var.availabilityZones_public_ip
domain_name_label = format("%s-ext-%s", local.instance_prefix, count.index)
allocation_method = "Static" # Static is required due to the use of the Standard sku
sku = "Standard" # the Standard sku is required due to the use of availability zones
tags = merge(local.tags, {
Name = format("%s-pip-ext-%s", local.instance_prefix, count.index)
}
)
}

resource "azurerm_public_ip" "secondary_external_public_ip" {
count = length(local.external_public_subnet_id)
count = var.cfe_secondary_vip_disable ? 0 : length(local.external_public_subnet_id)
name = "${local.instance_prefix}-secondary-pip-ext-${count.index}"
location = data.azurerm_resource_group.bigiprg.location
resource_group_name = data.azurerm_resource_group.bigiprg.name
//allocation_method = var.allocation_method
domain_name_label = format("%s-sec-ext-%s", local.instance_prefix, count.index)
allocation_method = "Static" # Static is required due to the use of the Standard sku
sku = "Standard" # the Standard sku is required due to the use of availability zones
// availability_zone = var.availabilityZones_public_ip
domain_name_label = format("%s-sec-ext-%s", local.instance_prefix, count.index)
allocation_method = "Static" # Static is required due to the use of the Standard sku
sku = "Standard" # the Standard sku is required due to the use of availability zones
tags = merge(local.tags, {
Name = format("%s-secondary-pip-ext-%s", local.instance_prefix, count.index)
}
Expand Down
13 changes: 9 additions & 4 deletions variables.tf
Original file line number Diff line number Diff line change
Expand Up @@ -168,14 +168,14 @@ variable "script_name" {
variable "DO_URL" {
description = "URL to download the BIG-IP Declarative Onboarding module"
type = string
default = "https://github.com/F5Networks/f5-declarative-onboarding/releases/download/v1.33.0/f5-declarative-onboarding-1.33.0-7.noarch.rpm"
default = "https://github.com/F5Networks/f5-declarative-onboarding/releases/download/v1.34.0/f5-declarative-onboarding-1.34.0-5.noarch.rpm"
}
## Please check and update the latest AS3 URL from https://github.com/F5Networks/f5-appsvcs-extension/releases/latest
# always point to a specific version in order to avoid inadvertent configuration inconsistency
variable "AS3_URL" {
description = "URL to download the BIG-IP Application Service Extension 3 (AS3) module"
type = string
default = "https://github.com/F5Networks/f5-appsvcs-extension/releases/download/v3.40.0/f5-appsvcs-3.40.0-5.noarch.rpm"
default = "https://github.com/F5Networks/f5-appsvcs-extension/releases/download/v3.41.0/f5-appsvcs-3.41.0-1.noarch.rpm"
}

## Please check and update the latest TS URL from https://github.com/F5Networks/f5-telemetry-streaming/releases/latest
Expand All @@ -192,7 +192,7 @@ variable "TS_URL" {
variable "FAST_URL" {
description = "URL to download the BIG-IP FAST module"
type = string
default = "https://github.com/F5Networks/f5-appsvcs-templates/releases/download/v1.21.0/f5-appsvcs-templates-1.21.0-1.noarch.rpm"
default = "https://github.com/F5Networks/f5-appsvcs-templates/releases/download/v1.22.0/f5-appsvcs-templates-1.22.0-1.noarch.rpm"
}

## Please check and update the latest Failover Extension URL from https://github.com/F5Networks/f5-cloud-failover-extension/releases/latest
Expand All @@ -207,7 +207,7 @@ variable "CFE_URL" {
variable "INIT_URL" {
description = "URL to download the BIG-IP runtime init"
type = string
default = "https://cdn.f5.com/product/cloudsolutions/f5-bigip-runtime-init/v1.5.1/dist/f5-bigip-runtime-init-1.5.1-1.gz.run"
default = "https://cdn.f5.com/product/cloudsolutions/f5-bigip-runtime-init/v1.5.2/dist/f5-bigip-runtime-init-1.5.2-1.gz.run"
}
variable "libs_dir" {
description = "Directory on the BIG-IP to download the A&O Toolchain into"
Expand Down Expand Up @@ -289,6 +289,11 @@ variable "internalnic_failover_tags" {
default = {}
}

variable "cfe_secondary_vip_disable" {
type = bool
description = "Disable Externnal Public IP Association to instance based on this flag (Usecase CFE Scenario)"
default = false
}
variable "sleep_time" {
type = string
default = "300s"
Expand Down

0 comments on commit 3796edf

Please sign in to comment.