fixed according to comments

This commit is contained in:
github-actions[bot] 2024-05-17 20:13:17 +00:00
parent c4bdeb74c0
commit af2f3b7866
5 changed files with 41 additions and 36 deletions

View File

@ -1,6 +1,6 @@
resource "azurerm_resource_group" "default" {
name = "azapi-template-rg-${var.names}"
name = "rg-${var.names}"
location = var.location
}
@ -24,7 +24,7 @@ resource "azurerm_key_vault" "default" {
// AzAPI AIServices
resource "azapi_resource" "AIServicesResource"{
type = "Microsoft.CognitiveServices/accounts@2024-04-01-preview"
type = "Microsoft.CognitiveServices/accounts@2023-10-01-preview"
name = "${var.names}AIServicesResource"
location = azurerm_resource_group.default.location
parent_id = azurerm_resource_group.default.id
@ -45,7 +45,6 @@ resource "azapi_resource" "AIServicesResource"{
}
})
schema_validation_enabled = false
response_export_values = ["*"]
}

View File

@ -1,5 +1,5 @@
resource "azapi_resource" "hub" {
type = "Microsoft.MachineLearningServices/workspaces@2024-04-01"
type = "Microsoft.MachineLearningServices/workspaces@2024-04-01-preview"
name = "my-ai-hub"
location = azurerm_resource_group.default.location
parent_id = azurerm_resource_group.default.id
@ -20,7 +20,7 @@ resource "azapi_resource" "hub" {
containerRegistry = azurerm_container_registry.default.id
*/
//Optional: To enable Customer Managed Keys, the corresponding
/*Optional: To enable Customer Managed Keys, the corresponding
encryption = {
status = var.encryption_status
keyVaultProperties = {
@ -28,9 +28,9 @@ resource "azapi_resource" "hub" {
keyIdentifier = var.cmk_keyvault_key_uri
}
}
*/
}
kind = "hub"
})
schema_validation_enabled = false
}

View File

@ -1,5 +1,11 @@
terraform {
required_version = ">= 1.0"
required_providers {
azurerm = {
source = "hashicorp/azurerm"
version = ">= 3.0, < 4.0"
}
azapi = {
source = "azure/azapi"
}

View File

@ -1,5 +1,5 @@
resource "azapi_resource" "project" {
type = "Microsoft.MachineLearningServices/workspaces@2024-04-01"
type = "Microsoft.MachineLearningServices/workspaces@2024-04-01-preview"
name = "my-ai-project"
location = azurerm_resource_group.default.location
parent_id = azurerm_resource_group.default.id
@ -16,5 +16,4 @@ resource "azapi_resource" "project" {
}
kind = "project"
})
schema_validation_enabled = false
}

View File

@ -17,7 +17,7 @@ variable "sku" {
default = "S0"
}
//Optional: For Customer Managed Keys, uncomment this part AND the corresponding section in hub.tf
/*Optional: For Customer Managed Keys, uncomment this part AND the corresponding section in hub.tf
variable "cmk_keyvault_key_uri" {
description = "Key vault uri to access the encryption key."
}
@ -26,3 +26,4 @@ variable "encryption_status" {
description = "Indicates whether or not the encryption is enabled for the workspace."
default = "Enabled"
}
*/