average-nest-71706
03/11/2021, 8:38 AMtest = aws.lb.LoadBalancer(
"MyTestALB",
internal=False,
load_balancer_type="application",
security_groups=[alb_security_group.id],
subnets=[__item["id"] for __item in aws_subnet["public"]],
enable_deletion_protection=True,
#access_logs=aws.lb.LoadBalancerAccessLogsArgs(
# bucket=
# )
)
I would like to understand what this line of code is saying:
subnets=[__item["id"] for __item in aws_subnet["public"]],
My question is how am I going to get the subnets, because the lb documentation assumed that I already the code getting the subnets and it is assigned to aws_subnet["public"].broad-dog-22463
03/11/2021, 11:46 AMaverage-nest-71706
03/12/2021, 3:30 AMexample_subnet_ids = aws.ec2.get_subnet_ids(vpc_id="vpc-f...")
example_subnet = [aws.ec2.get_subnet(id=__value) for __key, __value in example_subnet_ids.ids]
I got this error after running pulumi preview.
ValueError: too many values to unpack (expected 2)
broad-dog-22463
03/12/2021, 9:06 AM