fixed according to comments

This commit is contained in:
github-actions[bot] 2024-05-17 20:13:17 +00:00 committed by lonegunmanb
parent 6d7c599850
commit 9df50ca6b2
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

@ -1,28 +1,29 @@
// Names and Try are used for naming conventions in hub.tf and depende
variable "names" {
type = string
description="This variable is used to name the hub, project, and dependent resources."
default = "tftemplate"
}
variable "location" {
type = string
description = "This is the location for all resources"
default = "East US 2"
}
variable "sku" {
type = string
description = "The sku name of the Azure Analysis Services server to create. Choose from: B1, B2, D1, S0, S1, S2, S3, S4, S8, S9. Some skus are region specific. See https://docs.microsoft.com/en-us/azure/analysis-services/analysis-services-overview#availability-by-region"
default = "S0"
}
//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."
}
variable "encryption_status" {
description = "Indicates whether or not the encryption is enabled for the workspace."
default = "Enabled"
}
// Names and Try are used for naming conventions in hub.tf and depende
variable "names" {
type = string
description="This variable is used to name the hub, project, and dependent resources."
default = "tftemplate"
}
variable "location" {
type = string
description = "This is the location for all resources"
default = "East US 2"
}
variable "sku" {
type = string
description = "The sku name of the Azure Analysis Services server to create. Choose from: B1, B2, D1, S0, S1, S2, S3, S4, S8, S9. Some skus are region specific. See https://docs.microsoft.com/en-us/azure/analysis-services/analysis-services-overview#availability-by-region"
default = "S0"
}
/*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."
}
variable "encryption_status" {
description = "Indicates whether or not the encryption is enabled for the workspace."
default = "Enabled"
}
*/