Reputation: 45
Terraform plan
outputs strange results. For every load balancer, it outputs
~ module.api-origin-demo-prod.aws_alb.origin-alb
enable_cross_zone_load_balancing: "" => "false"
enable_http2: "" => "true"
From what I understand, cross zone load balancing is a feature for AWS's classic load balancers, not the application load balancers (ALBs) we use. The HTTP2 setting is strange too becuase it's enabled in the AWS console, so they're is no "change" in the settings that Terraform should pick up. Thanks!
Upvotes: 1
Views: 909
Reputation: 878
I would suggest setting your terminal env variable to Debug so you can see what's happening behind the scenes .
To do that in your terminal assumed you have installed the terraform
Do : export TF_LOG="DEBUG"
That should be enough for giving you output and debug your next steps.
Upvotes: 1
Reputation: 2557
aws_alb
aka aws_lb
implements both ALBs and network load balancers based on the setting of the load_balancer_type
argument. enable_cross_zone_load_balancing
is only applicable to network load balancers.
You could try terraform show
to see what the current state of those attributes are. It is possible for terraform's state to diverge from reality if the infrastructure is being modified in AWS' console or by other tools. If you aren't using remote state, there can be divergence even if terraform is being used exclusively.
If something really seems amiss, you can enable debug logs and search for the relevant API calls for the ALBs to see how it believes there is a change:
TF_LOG=DEBUG terraform plan
Upvotes: 0