Skip to content

Latest commit

 

History

History
42 lines (25 loc) · 1.55 KB

azurerm_postgresql_firewall_rule_invalid_start_ip_address.md

File metadata and controls

42 lines (25 loc) · 1.55 KB

azurerm_postgresql_firewall_rule_invalid_start_ip_address

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

In this rule, the string must match the regular expression `^(([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5]).){3}([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])$``.

Example

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

Error: "..." does not match valid pattern ^(([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])\.){3}([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])$ (azurerm_postgresql_firewall_rule_invalid_start_ip_address)

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

Reference: https://github.com/terraform-linters/tflint-ruleset-azurerm/blob/v0.1.0/docs/rules/azurerm_postgresql_firewall_rule_invalid_start_ip_address.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/postgresql/resource-manager/Microsoft.DBforPostgreSQL/stable/2017-12-01/postgresql.json