F5Networks / terraform-aws-bigip-module

Terraform module for Deploying BIG-IP in AWS
Apache License 2.0
10 stars 21 forks source link

Inconsistent interface assignments #20

Closed craigbowden76 closed 2 years ago

craigbowden76 commented 2 years ago

I am deploying using the 4nic template with module count of 2. I am then trying to programmatically configure the bigip interfaces named 1.1, 1.2, 1.3 as external, HA, and internal. but the 2 "external" interfaces do not consistently get set, sometimes it deploys the 1st external interface as the 1.1 interface and sometimes it is the 1.2. interface and vice versa. I assume this is because it is an unordered list that gets passed. Is there some way to work around this so I can accurately predict which interfaces will be assigned to which name? I hope that is clear and thank you for helping me.

craigbowden76 commented 2 years ago

module "bigip" { count = 2 source = "registry.terraform.io/F5Networks/bigip-module/aws" prefix = "bigip-aws-4nic" ec2_key_name = data.aws_key_pair.terraform-aws-f5-deploy-dev.key_name

mgmt_subnet_ids = [ { "subnet_id" = data.aws_subnets.mgmt.ids[0], "public_ip" = true, "private_ip_primary" = "" } ] mgmt_securitygroup_ids = [ data.aws_security_groups.mgmt-https.ids[0], data.aws_security_groups.mgmt-ssh.ids[0], data.aws_security_groups.mgmt-f5.ids[0] ]

external_subnet_ids = [ { "subnet_id" = data.aws_subnets.external.ids[0], "public_ip" = true, "private_ip_primary" = "", "private_ip_secondary" = "" }, { "subnet_id" = data.aws_subnets.ha.ids[0], "public_ip" = false, "private_ip_primary" = "", "private_ip_secondary" = "" } ] external_securitygroup_ids = [ data.aws_security_groups.external80.ids[0], data.aws_security_groups.external443.ids[0], data.aws_security_groups.mgmt-f5.ids[0] ]

internal_subnet_ids = [ { "subnet_id" = data.aws_subnets.internal.ids[0], "public_ip" = false, "private_ip_primary" = "" } ] internal_securitygroup_ids = [data.aws_security_groups.internal.ids[0], data.aws_security_groups.mgmt-f5.ids[0]]

custom_user_data = null f5_ami_search_name = var.f5_ami_search_name f5_username = var.f5_username f5_password = var.f5_password }