Skip to content

Commit

Permalink
added status code variable
Browse files Browse the repository at this point in the history
  • Loading branch information
balpurewal committed Oct 16, 2024
1 parent 1950803 commit 02e6c04
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 1 deletion.
1 change: 1 addition & 0 deletions azurerm/modules/azurerm-app-gateway/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -85,6 +85,7 @@ No modules.
| <a name="input_disable_complete_propagation"></a> [disable\_complete\_propagation](#input\_disable\_complete\_propagation) | n/a | `bool` | `false` | no |
| <a name="input_dns_resource_group"></a> [dns\_resource\_group](#input\_dns\_resource\_group) | RG that contains the existing DNS zones, if the zones are not being created here | `string` | `null` | no |
| <a name="input_dns_zone"></a> [dns\_zone](#input\_dns\_zone) | ########################### # DNS SETTINGS ########################## | `string` | `""` | no |
| <a name="input_expected_status_codes"></a> [expected\_status\_codes](#input\_expected\_status\_codes) | The expect status code returned from the health probe | `list` | <pre>[<br> "200"<br>]</pre> | no |
| <a name="input_host_name"></a> [host\_name](#input\_host\_name) | Host header to be sent to the backend servers. Cannot be set if pick\_host\_name\_from\_backend\_address is set to true | `string` | `null` | no |
| <a name="input_pfx_password"></a> [pfx\_password](#input\_pfx\_password) | n/a | `string` | `"Password1"` | no |
| <a name="input_pick_host_name_from_backend_http_settings"></a> [pick\_host\_name\_from\_backend\_http\_settings](#input\_pick\_host\_name\_from\_backend\_http\_settings) | Whether the host header should be picked from the backend HTTP settings. Defaults to false. | `bool` | `false` | no |
Expand Down
2 changes: 1 addition & 1 deletion azurerm/modules/azurerm-app-gateway/app_gateway.tf
Original file line number Diff line number Diff line change
Expand Up @@ -109,7 +109,7 @@ resource "azurerm_application_gateway" "network" {
path = var.probe_path
pick_host_name_from_backend_http_settings = var.pick_host_name_from_backend_http_settings
match {
status_code = ["200"]
status_code = var.expected_status_codes
}
}

Expand Down
5 changes: 5 additions & 0 deletions azurerm/modules/azurerm-app-gateway/vars.tf
Original file line number Diff line number Diff line change
Expand Up @@ -203,3 +203,8 @@ variable "host_name" {
default = null
description = "Host header to be sent to the backend servers. Cannot be set if pick_host_name_from_backend_address is set to true"
}

variable "expected_status_codes" {
default = ["200"]
description = "The expect status code returned from the health probe"
}

0 comments on commit 02e6c04

Please sign in to comment.