Skip to content

Commit e841d8d

Browse files
authored
Add Terraform variables for Azure infrastructure
1 parent 917b628 commit e841d8d

1 file changed

Lines changed: 129 additions & 0 deletions

File tree

Lines changed: 129 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,129 @@
1+
variable "subscription_id" {
2+
type = string
3+
description = "Azure subscription ID"
4+
}
5+
6+
variable "resource_group_name" {
7+
type = string
8+
description = "Name of the resource group"
9+
default = "rg-func-high-decay"
10+
}
11+
12+
variable "location" {
13+
type = string
14+
description = "Azure region for resources"
15+
default = "West US"
16+
}
17+
18+
variable "environment" {
19+
type = string
20+
description = "Environment name"
21+
default = "dev"
22+
}
23+
24+
variable "storage_account_tier" {
25+
type = string
26+
description = "Storage account tier"
27+
default = "Standard"
28+
}
29+
30+
variable "storage_account_replication_type" {
31+
type = string
32+
description = "Storage account replication type"
33+
default = "LRS"
34+
}
35+
36+
variable "app_service_plan_tier" {
37+
type = string
38+
description = "App Service Plan tier (PremiumV3 tier for high performance)"
39+
default = "P1v3"
40+
}
41+
42+
variable "app_service_plan_size" {
43+
type = string
44+
description = "App Service Plan size (PremiumV3 tier for high performance)"
45+
default = "P1v3"
46+
}
47+
48+
variable "sql_server_admin_login" {
49+
type = string
50+
description = "SQL Server admin login"
51+
default = "sqladmin"
52+
}
53+
54+
variable "sql_server_admin_password" {
55+
type = string
56+
description = "SQL Server admin password"
57+
sensitive = true
58+
}
59+
60+
variable "sql_database_name" {
61+
type = string
62+
description = "SQL Database name"
63+
default = "funcdb"
64+
}
65+
66+
# Optional: provide an existing storage account name to avoid creating a new one
67+
variable "override_storage_account_name" {
68+
type = string
69+
description = "If set, use this existing storage account name instead of creating a new one"
70+
default = ""
71+
}
72+
73+
# Optional: provide the access key for the existing storage account (sensitive)
74+
variable "override_storage_account_key" {
75+
type = string
76+
description = "If set, use this storage account access key instead of the created account's key"
77+
sensitive = true
78+
default = ""
79+
}
80+
81+
# Optional: if you already have an App Service Plan in-region, set its resource id here to avoid creating one
82+
variable "existing_service_plan_id" {
83+
type = string
84+
description = "Resource ID of an existing App Service Plan to use instead of creating a new one"
85+
default = ""
86+
}
87+
88+
# Resource name suffix for demo environments
89+
variable "resource_suffix" {
90+
description = "Suffix to append to all resource names for uniqueness."
91+
type = string
92+
}
93+
94+
# Base names for resources (optional, for further flexibility)
95+
variable "base_service_plan_name" {
96+
description = "Base name for the service plan."
97+
type = string
98+
default = "asp-high-decay"
99+
}
100+
variable "base_app_insights_name" {
101+
description = "Base name for Application Insights."
102+
type = string
103+
default = "appi-high-decay"
104+
}
105+
variable "base_log_analytics_name" {
106+
description = "Base name for Log Analytics Workspace."
107+
type = string
108+
default = "log-high-decay"
109+
}
110+
variable "base_key_vault_name" {
111+
description = "Base name for Key Vault."
112+
type = string
113+
default = "kv-highdecay"
114+
}
115+
variable "base_sql_server_name" {
116+
description = "Base name for SQL Server."
117+
type = string
118+
default = "sql-high-decay"
119+
}
120+
variable "base_function_app_name" {
121+
description = "Base name for Function App."
122+
type = string
123+
default = "func-high-decay"
124+
}
125+
variable "base_data_storage_name" {
126+
description = "Base name for Data Storage Account."
127+
type = string
128+
default = "sthighdecay"
129+
}

0 commit comments

Comments
 (0)