-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathvariables.tf
71 lines (61 loc) · 1.9 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
variable "resource_group_name" {
description = "The name of the controller's RG"
type = string
default = "PAMonCloud-BYOI-Controller-RG"
}
variable "location" {
description = "Location for deployment"
type = string
default = "westeurope"
}
variable "vnet_cidr" {
description = "VNET CIDR block"
type = string
default = "10.0.0.0/16"
}
variable "subnet_cidr" {
description = "Subnet CIDR block"
type = string
default = "10.0.1.0/24"
}
variable "allowed_ssh_cidr" {
description = "CIDR block allowed for SSH inbound access"
type = string
default = "0.0.0.0/0" # Change CIDR scope for better security
}
variable "vm_admin_user" {
description = "Admin username for the VM"
type = string
default = "azureadmin"
}
variable "vm_admin_password" {
description = "Admin password for the VM"
type = string
sensitive = true
}
variable "vm_size" {
description = "The size of the VM"
type = string
default = "Standard_D2s_v3"
}
variable "storage_account_id" {
description = "Resource ID of the storage account containing the BYOI zip"
type = string
validation {
condition = can(
regex("^/subscriptions/[0-9a-fA-F-]{36}/resourceGroups/[a-zA-Z0-9_.-]+/providers/Microsoft.Storage/storageAccounts/[a-z][a-z0-9]{2,23}$", var.storage_account_id)
)
error_message = <<-EOF
The storage_account_id must be a valid Azure storage account resource ID in the following format:
/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Storage/storageAccounts/{storageAccountName}
EOF
}
}
variable "container_name" {
description = "Name of the storage account container where BYOI zip is stored"
type = string
}
variable "file_name" {
description = "BYOI zip file name to be downloaded from Azure storage account"
type = string
}