Add code for AMLFS resource

This commit is contained in:
Paul Jewell
2023-10-12 15:09:09 -04:00
parent 629a403870
commit 21c4654b2d
5 changed files with 133 additions and 651 deletions

View File

@ -1,32 +1,37 @@
resource "azurerm_resource_group" "example" {
name = "my-terraform-AMLFS-test"
location = "East US"
name = "${random_pet.prefix.id}-rg"
location = var.rg_location
}
resource "azurerm_virtual_network" "example" {
name = "my-terraform-AMLFS-vnet"
address_space = ["10.90.0.0/16"]
location = azurerm_resource_group.example.location
name = "${random_pet.prefix.id}-vnet"
resource_group_name = azurerm_resource_group.example.name
address_space = ["10.0.0.0/16"]
location = azurerm_resource_group.example.location
}
resource "azurerm_subnet" "example" {
name = "my-terraform-AMLFS-subnet"
name = "${random_pet.prefix.id}-subnet"
resource_group_name = azurerm_resource_group.example.name
virtual_network_name = azurerm_virtual_network.example.name
address_prefixes = ["10.90.2.0/24"]
address_prefixes = ["10.0.2.0/24"]
}
resource "azurerm_managed_lustre_file_system" "example" {
name = "my-terraform-AMLFS-cluster"
name = "${random_pet.prefix.id}"
resource_group_name = azurerm_resource_group.example.name
location = azurerm_resource_group.example.location
sku_name = "AMLFS-Durable-Premium-40"
sku_name = var.amlfs_sku_name
subnet_id = azurerm_subnet.example.id
storage_capacity_in_tb = 48
storage_capacity_in_tb = var.amlfs_storage_capacity_in_tb
zones = ["1"]
maintenance_window {
day_of_week = "Saturday"
time_of_day_in_utc = "02:00"
day_of_week = var.amlfs_maintenance_day_of_week
time_of_day_in_utc = var.amlfs_maintenance_time_of_day
}
}
resource "random_pet" "prefix" {
prefix = var.prefix
length = 1
}