forked from Azure-Terraformer/terraform-azurerm-compute-skus
-
Notifications
You must be signed in to change notification settings - Fork 0
/
variables.tf
77 lines (69 loc) · 1.55 KB
/
variables.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
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
variable "location" {
type = string
description = <<DESCRIPTION
The Azure region for which to retrieve the list of SKUs.
DESCRIPTION
}
variable "vm_filter" {
type = object({
resources = object({
vcpu = object({
min = optional(number, 0)
max = optional(number, 9999)
})
memory_gb = object({
min = optional(number, 0)
max = optional(number, 999999)
})
})
})
default = {
resources = {
vcpu = {
min = 0
max = 9999
}
memory_gb = {
min = 0
max = 999999
}
}
}
description = <<DESCRIPTION
An object specifying filtering criteria for VM SKUs based on vCPU and memory requirements.
Attributes:
- `resources`: An object containing:
- `vcpu`: An object containing:
- `min` (number): Minimum number of vCPUs required.
- `max` (number, optional): Maximum number of vCPUs allowed (default: 9999).
- `memory_gb`: An object containing:
- `min` (number): Minimum amount of memory (in GB) required.
- `max` (number, optional): Maximum amount of memory (in GB) allowed (default: 999999).
Sample inputs:
1. Specifying only `vcpu.min`:
```
vm_filter = {
resources = {
vcpu = {
min = 4
}
}
}
```
2. Specifying `vcpu.min`, `vcpu.max`, and `memory_gb.min`:
```
vm_filter = {
resources = {
vcpu = {
min = 4
max = 8
}
memory_gb = {
min = 16
}
}
}
```
In both cases, the default values will be applied for any unspecified attributes (`vcpu.max` and `memory_gb.max`).
DESCRIPTION
}