New sample (converted from Bicep via OpenAI)

This commit is contained in:
Tom Archer
2023-03-18 13:34:12 -07:00
parent 35b3afaf63
commit 566ede9f1e
5 changed files with 82 additions and 0 deletions

View File

@ -0,0 +1,24 @@
resource "random_pet" "rg_name" {
prefix = var.resource_group_name_prefix
}
resource "azurerm_resource_group" "rg" {
name = random_pet.rg_name.id
location = var.resource_group_location
}
resource "random_string" "azurerm_cognitive_account_name" {
length = 13
lower = true
numeric = false
special = false
upper = false
}
resource "azurerm_cognitive_account" "cognitive_service" {
name = "CognitiveService-${random_string.azurerm_cognitive_account_name.result}"
location = azurerm_resource_group.rg.location
resource_group_name = azurerm_resource_group.rg.name
sku_name = var.sku
kind = "CognitiveServices"
}