Skip to content

Latest commit

 

History

History
45 lines (28 loc) · 1.28 KB

azurerm_lb_rule_invalid_load_distribution.md

File metadata and controls

45 lines (28 loc) · 1.28 KB

azurerm_lb_rule_invalid_load_distribution

Warns about values that appear to be invalid based on azure-rest-api-specs.

Allowed values are:

  • Default
  • SourceIP
  • SourceIPProtocol

Example

resource "azurerm_lb_rule" "foo" {
  load_distribution = ... // invalid value
}
$ tflint
1 issue(s) found:

Error: "..." is an invalid value as load_distribution (azurerm_lb_rule_invalid_load_distribution)

  on template.tf line 2:
  2:   load_distribution = ... // invalid value

Reference: https://github.com/terraform-linters/tflint-ruleset-azurerm/blob/v0.1.0/docs/rules/azurerm_lb_rule_invalid_load_distribution.md

Why

Requests containing invalid values will return an error when calling the API by terraform apply.

How to Fix

Replace the warned value with a valid value.

Source

This rule is automatically generated from azure-rest-api-specs. If you are uncertain about the warning, check the following API schema referenced by this rule.

https://github.com/Azure/azure-rest-api-specs/tree/master/specification/network/resource-manager/Microsoft.Network/stable/2023-09-01/loadBalancer.json