initial file creation
This commit is contained in:
@ -0,0 +1,16 @@
|
||||
deploy_location = "west europe"
|
||||
rg_name = "avd-resources-rg"
|
||||
prefix = "avdtf"
|
||||
local_admin_username = "localadm"
|
||||
local_admin_password = "ChangeMe123$"
|
||||
vnet_range = ["10.1.0.0/16"]
|
||||
subnet_range = ["10.1.0.0/24"]
|
||||
netapp_address = ["10.1.1.0/24"]
|
||||
dns_servers = ["10.0.0.4", "168.63.129.16"]
|
||||
aad_group_name = "AVDUserGroup"
|
||||
ad_vnet = "<VNet for domain controller>"
|
||||
ad_rg = "<resource group for AD>"
|
||||
avd_users = [
|
||||
"user1@<domain>.com",
|
||||
"user2@<domain>.com"
|
||||
]
|
@ -0,0 +1,67 @@
|
||||
resource "azurerm_subnet" "netapp_subnet" {
|
||||
name = var.netapp_subnet_name
|
||||
resource_group_name = var.rg_name
|
||||
virtual_network_name = azurerm_virtual_network.vnet.name
|
||||
address_prefixes = var.netapp_address
|
||||
|
||||
delegation {
|
||||
name = "NetAppdelegation"
|
||||
|
||||
service_delegation {
|
||||
name = "Microsoft.Netapp/volumes"
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
resource "azurerm_netapp_account" "netapp_acct" {
|
||||
name = var.netapp_acct_name
|
||||
resource_group_name = var.rg_name
|
||||
location = var.deploy_location
|
||||
|
||||
active_directory {
|
||||
username = var.domain_user_upn
|
||||
password = var.domain_password
|
||||
smb_server_name = var.netapp_smb_name
|
||||
dns_servers = var.dns_servers
|
||||
domain = var.domain_name
|
||||
organizational_unit = var.ou_path
|
||||
}
|
||||
|
||||
depends_on = [
|
||||
azurerm_resource_group.rg
|
||||
]
|
||||
}
|
||||
|
||||
resource "azurerm_netapp_pool" "netapp_pool" {
|
||||
name = var.netapp_pool_name
|
||||
location = var.deploy_location
|
||||
resource_group_name = var.rg_name
|
||||
account_name = var.netapp_acct_name
|
||||
service_level = "Standard"
|
||||
size_in_tb = 4
|
||||
|
||||
depends_on = [
|
||||
azurerm_resource_group.rg, azurerm_netapp_account.netapp_acct
|
||||
]
|
||||
}
|
||||
|
||||
resource "azurerm_netapp_volume" "NetApp_Vol" {
|
||||
lifecycle {
|
||||
prevent_destroy = true
|
||||
}
|
||||
|
||||
name = var.netapp_volume_name
|
||||
location = var.deploy_location
|
||||
resource_group_name = var.rg_name
|
||||
account_name = var.netapp_acct_name
|
||||
pool_name = var.netapp_pool_name
|
||||
volume_path = var.netapp_volume_path
|
||||
service_level = "Standard"
|
||||
subnet_id = azurerm_subnet.netapp_subnet.id
|
||||
protocols = ["CIFS"]
|
||||
storage_quota_in_gb = 100
|
||||
|
||||
depends_on = [
|
||||
azurerm_netapp_pool.netapp_pool
|
||||
]
|
||||
}
|
122
quickstart/101-azure-virtual-desktop/options/netapp/variables.tf
Normal file
122
quickstart/101-azure-virtual-desktop/options/netapp/variables.tf
Normal file
@ -0,0 +1,122 @@
|
||||
variable "rg_name" {
|
||||
type = string
|
||||
default = "AVD-TF"
|
||||
description = "Name of the Resource group in which to deploy these resources"
|
||||
}
|
||||
|
||||
variable "deploy_location" {
|
||||
type = string
|
||||
description = "The Azure Region in which all resources in this example should be created."
|
||||
}
|
||||
|
||||
variable "workspace" {
|
||||
description = "Name of the Azure Virtual Desktop workspace"
|
||||
default = "AVD TF Workspace"
|
||||
}
|
||||
|
||||
variable "hostpool" {
|
||||
description = "Name of the Azure Virtual Desktop host pool"
|
||||
default = "AVD-TF-HP"
|
||||
}
|
||||
|
||||
variable "ad_vnet" {
|
||||
type = string
|
||||
description = "Name of domain controller vnet"
|
||||
}
|
||||
|
||||
variable "dns_servers" {
|
||||
description = "Custom DNS configuration"
|
||||
}
|
||||
|
||||
variable "vnet_range" {
|
||||
description = "Address range for deployment VNet"
|
||||
}
|
||||
variable "subnet_range" {
|
||||
description = "Address range for session host subnet"
|
||||
}
|
||||
|
||||
variable "ad_rg" {
|
||||
type = string
|
||||
description = "The resource group for AD VM"
|
||||
}
|
||||
|
||||
variable "avd_users" {
|
||||
description = "AVD users"
|
||||
default = []
|
||||
}
|
||||
|
||||
variable "aad_group_name" {
|
||||
description = "Azure Active Directory Group for AVD users"
|
||||
}
|
||||
|
||||
variable "rdsh_count" {
|
||||
description = "Number of AVD machines to deploy"
|
||||
default = 2
|
||||
}
|
||||
|
||||
variable "prefix" {
|
||||
description = "Prefix of the name of the AVD machine(s)"
|
||||
}
|
||||
|
||||
variable "domain_name" {
|
||||
type = string
|
||||
description = "Name of the domain to join"
|
||||
}
|
||||
|
||||
variable "domain_user_upn" {
|
||||
type = string
|
||||
description = "Username for domain join (do not include domain name as this is appended)"
|
||||
}
|
||||
|
||||
variable "domain_password" {
|
||||
type = string
|
||||
description = "Password of the user to authenticate with the domain"
|
||||
}
|
||||
|
||||
variable "vm_size" {
|
||||
description = "Size of the machine to deploy"
|
||||
default = "Standard_DS2_v2"
|
||||
}
|
||||
|
||||
variable "ou_path" {
|
||||
default = ""
|
||||
}
|
||||
|
||||
variable "local_admin_username" {
|
||||
type = string
|
||||
description = "local admin username"
|
||||
}
|
||||
|
||||
variable "local_admin_password" {
|
||||
description = "local admin password"
|
||||
}
|
||||
|
||||
# optional section - only use if deploying ANF
|
||||
|
||||
variable "netapp_acct_name" {
|
||||
default = "AVD_NetApp"
|
||||
}
|
||||
|
||||
variable "netapp_pool_name" {
|
||||
default = "AVD_NetApp_pool"
|
||||
}
|
||||
|
||||
variable "netapp_volume_name" {
|
||||
default = "AVD_NetApp_volume"
|
||||
}
|
||||
|
||||
variable "netapp_smb_name" {
|
||||
default = "AVDNetApp"
|
||||
}
|
||||
|
||||
variable "netapp_volume_path" {
|
||||
default = "AVDNetAppVolume"
|
||||
}
|
||||
|
||||
variable "netapp_subnet_name" {
|
||||
default = "NetAppSubnet"
|
||||
}
|
||||
|
||||
variable "netapp_address" {
|
||||
description = "Address range for NetApp Subnet"
|
||||
}
|
Reference in New Issue
Block a user