-
Notifications
You must be signed in to change notification settings - Fork 9.8k
Open
Labels
enhancementRequests to existing resources that expand the functionality or scope.Requests to existing resources that expand the functionality or scope.service/elbv2Issues and PRs that pertain to the elbv2 service.Issues and PRs that pertain to the elbv2 service.
Description
Description
The aws_lb resource says:
- subnet_mapping - (Optional) Subnet mapping block. See below. For Load Balancers of type network subnet mappings can only be added.
- subnets - (Optional) List of subnet IDs to attach to the LB. For Load Balancers of type network subnets can only be added (see Availability Zones), deleting a subnet for load balancers of type network will force a recreation of the resource.
The Networking & Content Delivery blog (13 Feb 2025) Exploring new subnet management capabilities of Network Load Balancer says:
NLBs now support full subnet management, including removal of subnets, matching the capabilities of Application Load Balancer (ALB) ... The introduction of the ability to remove subnets using the SetSubnets API changes subnet management for NLBs. This new capability enables you to modify subnet configurations after deployment, allowing you to relocate your load balancer to any desired subnet within your Amazon Virtual Private Cloud (Amazon VPC).
Affected Resource(s) and/or Data Source(s)
Potential Terraform Configuration
resource "aws_lb" "this" {
name = "this-nlb"
internal = false
load_balancer_type = "network"
subnets = [for subnet in aws_subnet.public : subnet.id]
}References
Update Availability Zones
SetSubnet API
Would you like to implement a fix?
No
gabrielbiasi, aristosvo, mbk-ok, umi0410, simoleone and 5 more
Metadata
Metadata
Assignees
Labels
enhancementRequests to existing resources that expand the functionality or scope.Requests to existing resources that expand the functionality or scope.service/elbv2Issues and PRs that pertain to the elbv2 service.Issues and PRs that pertain to the elbv2 service.