generated from Azure/terraform-azurerm-avm-template
-
Notifications
You must be signed in to change notification settings - Fork 6
/
Copy pathvariables.failovergroup.tf
45 lines (41 loc) · 2.2 KB
/
variables.failovergroup.tf
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
variable "failover_group" {
type = map(object({
location = optional(string)
name = optional(string)
partner_managed_instance_id = optional(string)
readonly_endpoint_failover_policy_enabled = optional(bool)
read_write_endpoint_failover_policy = optional(object({
grace_minutes = optional(number)
mode = optional(string)
}))
timeouts = optional(object({
create = optional(string)
delete = optional(string)
read = optional(string)
update = optional(string)
}))
}))
description = <<-DESCRIPTION
Map of failover groups. There can only be one failover group in the map.
- `location` - (Required) The Azure Region where the Managed Instance Failover Group should exist. Changing this forces a new resource to be created.
- `name` - (Required) The name which should be used for this Managed Instance Failover Group. Changing this forces a new resource to be created.
- `partner_managed_instance_id` - (Required) The ID of the Azure SQL Managed Instance which will be replicated to. Changing this forces a new resource to be created.
- `readonly_endpoint_failover_policy_enabled` - (Optional) Failover policy for the read-only endpoint. Defaults to `true`.
---
`read_write_endpoint_failover_policy` block supports the following:
- `grace_minutes` - (Optional) Applies only if `mode` is `Automatic`. The grace period in minutes before failover with data loss is attempted.
- `mode` - (Required) The failover mode. Possible values are `Automatic` or `Manual`.
---
`timeouts` block supports the following:
- `create` - (Defaults to 30 minutes) Used when creating the Managed Instance Failover Group.
- `delete` - (Defaults to 30 minutes) Used when deleting the Managed Instance Failover Group.
- `read` - (Defaults to 5 minutes) Used when retrieving the Managed Instance Failover Group.
- `update` - (Defaults to 30 minutes) Used when updating the Managed Instance Failover Group.
DESCRIPTION
nullable = false
default = {}
validation {
condition = length(var.failover_group) <= 1
error_message = "The 'failover_group' map must contain 0 or 1 items."
}
}