2024-12-09 11:45:35 -05:00
|
|
|
variable "subscription_id" {
|
|
|
|
|
description = "The azure subscription id"
|
|
|
|
|
type = string
|
|
|
|
|
}
|
|
|
|
|
|
2024-11-04 19:54:15 -05:00
|
|
|
variable "resource_group_name" {
|
|
|
|
|
description = "The name of the resource group"
|
|
|
|
|
type = string
|
|
|
|
|
default = "evaluetonsavoir"
|
|
|
|
|
}
|
|
|
|
|
|
2024-12-09 11:45:35 -05:00
|
|
|
variable "location" {
|
|
|
|
|
description = "The location for resources"
|
2024-11-04 19:54:15 -05:00
|
|
|
type = string
|
2024-12-09 11:45:35 -05:00
|
|
|
default = "Canada Central"
|
2024-11-04 19:54:15 -05:00
|
|
|
}
|
|
|
|
|
|
2024-12-09 11:45:35 -05:00
|
|
|
variable "frontend_port" {
|
|
|
|
|
description = "The frontend port"
|
|
|
|
|
type = number
|
|
|
|
|
default = 5173
|
2024-11-04 19:54:15 -05:00
|
|
|
}
|
|
|
|
|
|
2024-12-09 11:45:35 -05:00
|
|
|
variable "backend_port" {
|
|
|
|
|
description = "The backend port"
|
|
|
|
|
type = number
|
|
|
|
|
default = 3000
|
2024-11-04 19:54:15 -05:00
|
|
|
}
|
|
|
|
|
|
2024-12-09 11:45:35 -05:00
|
|
|
variable "backend_use_port" {
|
|
|
|
|
description = "If true use port in the backend, else no"
|
|
|
|
|
type = bool
|
|
|
|
|
default = false
|
2024-11-04 19:54:15 -05:00
|
|
|
}
|
|
|
|
|
|
2024-12-09 11:45:35 -05:00
|
|
|
variable "backend_use_auth_student" {
|
|
|
|
|
description = "If true student need to authenticate, else no"
|
|
|
|
|
type = bool
|
|
|
|
|
default = false
|
2024-11-04 19:54:15 -05:00
|
|
|
}
|
|
|
|
|
|
2024-12-09 11:45:35 -05:00
|
|
|
variable "backend_session_secret" {
|
|
|
|
|
description = "The backend session secret"
|
2024-11-04 19:54:15 -05:00
|
|
|
type = string
|
|
|
|
|
}
|
|
|
|
|
|
2024-12-09 11:45:35 -05:00
|
|
|
variable "backend_email_service" {
|
|
|
|
|
description = "The name of the service use for sending email"
|
2024-11-04 19:54:15 -05:00
|
|
|
type = string
|
2024-12-09 11:45:35 -05:00
|
|
|
default = "gmail"
|
2024-11-04 19:54:15 -05:00
|
|
|
}
|
|
|
|
|
|
2024-12-09 11:45:35 -05:00
|
|
|
variable "backend_email_sender" {
|
|
|
|
|
description = "The email address used to send email"
|
2024-11-04 19:54:15 -05:00
|
|
|
type = string
|
|
|
|
|
}
|
|
|
|
|
|
2024-12-09 11:45:35 -05:00
|
|
|
variable "backend_email_password" {
|
|
|
|
|
description = "The email password"
|
2024-11-04 19:54:15 -05:00
|
|
|
type = string
|
|
|
|
|
}
|
|
|
|
|
|
2024-12-09 11:45:35 -05:00
|
|
|
variable "backend_jwt_secret" {
|
|
|
|
|
description = "The secret used to sign the jwt"
|
2024-11-04 19:54:15 -05:00
|
|
|
type = string
|
|
|
|
|
}
|
|
|
|
|
|
2024-12-09 11:45:35 -05:00
|
|
|
variable "backend_storage_share_name" {
|
|
|
|
|
description = "The backend volume share name"
|
2024-11-04 19:54:15 -05:00
|
|
|
type = string
|
2024-12-09 11:45:35 -05:00
|
|
|
default = "auth-config-share"
|
2024-11-04 19:54:15 -05:00
|
|
|
}
|
|
|
|
|
|
2024-12-09 11:45:35 -05:00
|
|
|
variable "config_volume_storage_account_name" {
|
|
|
|
|
description = "The volume storage account name"
|
2024-11-04 19:54:15 -05:00
|
|
|
type = string
|
2024-12-09 11:45:35 -05:00
|
|
|
default = "evaluetonsavoirstorage"
|
2024-11-04 19:54:15 -05:00
|
|
|
}
|
|
|
|
|
|
2024-12-09 11:45:35 -05:00
|
|
|
variable "mongo_database_name" {
|
|
|
|
|
description = "The name of the database"
|
2024-11-04 19:54:15 -05:00
|
|
|
type = string
|
2024-12-09 11:45:35 -05:00
|
|
|
default = "evaluetonsavoir"
|
2024-11-04 19:54:15 -05:00
|
|
|
}
|
|
|
|
|
|
2024-12-09 11:45:35 -05:00
|
|
|
variable "cosmosdb_account_name" {
|
|
|
|
|
description = "The name of the cosmosdb account"
|
2024-11-04 19:54:15 -05:00
|
|
|
type = string
|
2024-12-09 11:45:35 -05:00
|
|
|
default = "evaluetonsavoircosmosdb"
|
2024-11-04 19:54:15 -05:00
|
|
|
}
|
|
|
|
|
|
2024-12-09 11:45:35 -05:00
|
|
|
variable "vnet_name" {
|
|
|
|
|
description = "The name of the virtual network"
|
2024-11-04 19:54:15 -05:00
|
|
|
type = string
|
2024-12-09 11:45:35 -05:00
|
|
|
default = "evaluetonsavoirVnet"
|
2024-11-04 19:54:15 -05:00
|
|
|
}
|
|
|
|
|
|
2024-12-09 11:45:35 -05:00
|
|
|
variable "subnet_name" {
|
|
|
|
|
description = "The name of the subnet"
|
2024-11-04 19:54:15 -05:00
|
|
|
type = string
|
2024-12-09 11:45:35 -05:00
|
|
|
default = "evaluetonsavoirSubnet"
|
2024-11-04 19:54:15 -05:00
|
|
|
}
|
|
|
|
|
|
2024-12-09 11:45:35 -05:00
|
|
|
variable "public_ip_name" {
|
|
|
|
|
description = "The name of the public ip"
|
2024-11-04 19:54:15 -05:00
|
|
|
type = string
|
2024-12-09 11:45:35 -05:00
|
|
|
default = "evaluetonsavoirPublicIp"
|
2024-11-04 19:54:15 -05:00
|
|
|
}
|
|
|
|
|
|
2024-12-09 11:45:35 -05:00
|
|
|
variable "nsg_name" {
|
|
|
|
|
description = "The name of the network security group"
|
|
|
|
|
type = string
|
|
|
|
|
default = "evaluetonsavoirnsg"
|
2024-11-04 19:54:15 -05:00
|
|
|
}
|
|
|
|
|
|
2024-12-09 11:45:35 -05:00
|
|
|
variable "nsg_ssh_ip_range" {
|
|
|
|
|
description = "The ip range that can access to the port 22 using the network security group"
|
2024-11-04 19:54:15 -05:00
|
|
|
type = string
|
2024-12-09 11:45:35 -05:00
|
|
|
default = "0.0.0.0/0"
|
2024-11-04 19:54:15 -05:00
|
|
|
}
|
|
|
|
|
|
2024-12-09 11:45:35 -05:00
|
|
|
variable "nsg_http_ip_range" {
|
|
|
|
|
description = "The ip range that can access to the port 80 using the network security group"
|
2024-11-04 19:54:15 -05:00
|
|
|
type = string
|
2024-12-09 11:45:35 -05:00
|
|
|
default = "0.0.0.0/0"
|
2024-11-04 19:54:15 -05:00
|
|
|
}
|
|
|
|
|
|
2024-12-09 11:45:35 -05:00
|
|
|
variable "nsg_https_ip_range" {
|
|
|
|
|
description = "The ip range that can access to the port 443 using the network security group"
|
2024-11-04 19:54:15 -05:00
|
|
|
type = string
|
2024-12-09 11:45:35 -05:00
|
|
|
default = "0.0.0.0/0"
|
2024-11-04 19:54:15 -05:00
|
|
|
}
|
|
|
|
|
|
2024-12-09 11:45:35 -05:00
|
|
|
variable "network_interface_name" {
|
|
|
|
|
description = "The name of the network interface"
|
2024-11-04 19:54:15 -05:00
|
|
|
type = string
|
2024-12-09 11:45:35 -05:00
|
|
|
default = "evaluetonsavoirNetworkInterface"
|
2024-11-04 19:54:15 -05:00
|
|
|
}
|
|
|
|
|
|
2024-12-09 11:45:35 -05:00
|
|
|
variable "dns" {
|
|
|
|
|
description = "The dns of the public ip"
|
2024-11-04 19:54:15 -05:00
|
|
|
type = string
|
2024-12-09 11:45:35 -05:00
|
|
|
default = "evaluetonsavoir"
|
2024-11-04 19:54:15 -05:00
|
|
|
}
|
|
|
|
|
|
2024-12-09 11:45:35 -05:00
|
|
|
variable "vm_name" {
|
|
|
|
|
description = "The name of the virtual machine"
|
2024-11-04 19:54:15 -05:00
|
|
|
type = string
|
2024-12-09 11:45:35 -05:00
|
|
|
default = "evaluetonsavoir"
|
2024-11-04 19:54:15 -05:00
|
|
|
}
|
|
|
|
|
|
2024-12-09 11:45:35 -05:00
|
|
|
variable "vm_size" {
|
|
|
|
|
description = "The size of the virtual machine"
|
2024-11-04 19:54:15 -05:00
|
|
|
type = string
|
2024-12-09 11:45:35 -05:00
|
|
|
default = "Standard_B2s"
|
2024-11-04 19:54:15 -05:00
|
|
|
}
|
|
|
|
|
|
2024-12-09 11:45:35 -05:00
|
|
|
variable "vm_user" {
|
|
|
|
|
description = "The username of the virtual machine"
|
2024-11-04 19:54:15 -05:00
|
|
|
type = string
|
|
|
|
|
}
|
|
|
|
|
|
2024-12-09 11:45:35 -05:00
|
|
|
variable "vm_password" {
|
|
|
|
|
description = "The password of the virtual machine"
|
2024-11-04 19:54:15 -05:00
|
|
|
type = string
|
|
|
|
|
}
|
|
|
|
|
|
2024-12-09 11:45:35 -05:00
|
|
|
variable "vm_os_disk_name" {
|
|
|
|
|
description = "The name of the os disk of the virtual machine"
|
|
|
|
|
type = string
|
|
|
|
|
default = "evaluetonsavoirOsDisk"
|
2024-11-04 19:54:15 -05:00
|
|
|
}
|
|
|
|
|
|
2024-12-09 11:45:35 -05:00
|
|
|
variable "vm_os_disk_type" {
|
|
|
|
|
description = "The type of the os disk of the virtual machine"
|
2024-11-04 19:54:15 -05:00
|
|
|
type = string
|
2024-12-09 11:45:35 -05:00
|
|
|
default = "Standard_LRS"
|
2024-11-04 19:54:15 -05:00
|
|
|
}
|
|
|
|
|
|
2024-12-09 11:45:35 -05:00
|
|
|
variable "vm_image_publisher" {
|
|
|
|
|
description = "The publisher of the image of the virtual machine"
|
2024-11-04 19:54:15 -05:00
|
|
|
type = string
|
2024-12-09 11:45:35 -05:00
|
|
|
default = "Canonical"
|
2024-11-04 19:54:15 -05:00
|
|
|
}
|
|
|
|
|
|
2024-12-09 11:45:35 -05:00
|
|
|
variable "vm_image_offer" {
|
|
|
|
|
description = "The id of the image of the virtual machine"
|
2024-11-04 19:54:15 -05:00
|
|
|
type = string
|
2024-12-09 11:45:35 -05:00
|
|
|
default = "0001-com-ubuntu-server-jammy"
|
2024-11-04 19:54:15 -05:00
|
|
|
}
|
|
|
|
|
|
2024-12-09 11:45:35 -05:00
|
|
|
variable "vm_image_plan" {
|
|
|
|
|
description = "The plan of the image of the virtual machine"
|
2024-11-04 19:54:15 -05:00
|
|
|
type = string
|
2024-12-09 11:45:35 -05:00
|
|
|
default = "22_04-lts"
|
2024-11-04 19:54:15 -05:00
|
|
|
}
|
|
|
|
|
|
2024-12-09 11:45:35 -05:00
|
|
|
variable "vm_image_version" {
|
|
|
|
|
description = "The version of the image of the virtual machine"
|
2024-11-04 19:54:15 -05:00
|
|
|
type = string
|
2024-12-09 11:45:35 -05:00
|
|
|
default = "latest"
|
2024-11-04 19:54:15 -05:00
|
|
|
}
|
|
|
|
|
|
2024-12-09 11:45:35 -05:00
|
|
|
variable "docker_compose_url" {
|
|
|
|
|
description = "The url from where the docker compose file is downloaded"
|
2024-11-04 19:54:15 -05:00
|
|
|
type = string
|
2024-12-09 11:45:35 -05:00
|
|
|
default = "https://raw.githubusercontent.com/ets-cfuhrman-pfe/EvalueTonSavoir/refs/heads/main/opentofu/docker-compose.yaml"
|
2024-11-04 19:54:15 -05:00
|
|
|
}
|
|
|
|
|
|
2024-12-09 11:45:35 -05:00
|
|
|
variable "quizroom_image" {
|
|
|
|
|
description = "The image of the quiz room"
|
2024-11-04 19:54:15 -05:00
|
|
|
type = string
|
2024-12-09 11:45:35 -05:00
|
|
|
default = "ghrc.io/fuhrmanator/evaluetonsavoir-quizroom:latest"
|
|
|
|
|
}
|