Skip to content

lb and eip resource changes in terraform #627

Open
@sbogar-shs

Description

@sbogar-shs

I am running into three issues when customizing the security groups and using static IPs for a concourse network lb using bbl

  1. aws_eip resources should now be using domain = 'vpc" instead of vpc = true

This one is more of a "nice to have"
2) aws_lb does not like the subnet entry when trying to use Elastic IPs:
subnets = ["${aws_subnet.lb_subnets.*.id}"]
This generates an error when you run bbl up using EIPs

The correct syntax for mapping subnets to EIPs in aws_lb:

dynamic "subnet_mapping" {
  for_each = aws_subnet.lb_subnets[*].id
  content {
    subnet_id = subnet_mapping.value
    allocation_id = aws_eip.nlb_eip[subnet_mapping.key].id
  }
}

new resource for lb eips

resource "aws_eip" "nlb_eip" {
  count  = length(var.availability_zones)
  domain = "vpc"
}

  1. when running bbl destroy it seems to wipe out the bbl-template.tf which is very limiting to what can be merged with _override.tf files as you are not allowed to add any new inputs/objects...this is extremely limiting...or maybe I am missing something (very possible). Once you have done any customization I am finding I am stuck in a state where bbl can not destroy the infrastructure.

Is there a reason why bbl-template.tf is being replaced during a bbl destroy?

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

Status

Pending Review | Discussion

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions