Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update azurerm_machine_learning_workspace - deprecate the enterprise sku because it has been deprecated by Azure #11063

Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,15 @@ import (
"github.com/terraform-providers/terraform-provider-azurerm/azurerm/utils"
)

// TODO -- remove this type when issue https://github.com/Azure/azure-rest-api-specs/issues/13546 is resolved
type WorkspaceSku string

const (
Basic WorkspaceSku = "Basic"
// TODO -- remove Enterprise in 3.0 which has been deprecated here: https://docs.microsoft.com/en-us/azure/machine-learning/concept-workspace#what-happened-to-enterprise-edition
Enterprise WorkspaceSku = "Enterprise"
)

func resourceMachineLearningWorkspace() *schema.Resource {
return &schema.Resource{
Create: resourceMachineLearningWorkspaceCreate,
Expand Down Expand Up @@ -138,8 +147,9 @@ func resourceMachineLearningWorkspace() *schema.Resource {
Optional: true,
Default: "Basic",
ValidateFunc: validation.StringInSlice([]string{
"Basic",
"Enterprise",
string(Basic),
// TODO -- remove Enterprise in 3.0 which has been deprecated here: https://docs.microsoft.com/en-us/azure/machine-learning/concept-workspace#what-happened-to-enterprise-edition
string(Enterprise),
}, true),
},

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -220,7 +220,7 @@ resource "azurerm_machine_learning_workspace" "test" {
key_vault_id = azurerm_key_vault.test.id
storage_account_id = azurerm_storage_account.test.id
container_registry_id = azurerm_container_registry.test.id
sku_name = "Enterprise"
sku_name = "Basic"
high_business_impact = true

identity {
Expand Down Expand Up @@ -258,7 +258,7 @@ resource "azurerm_machine_learning_workspace" "test" {
key_vault_id = azurerm_key_vault.test.id
storage_account_id = azurerm_storage_account.test.id
container_registry_id = azurerm_container_registry.test.id
sku_name = "Enterprise"
sku_name = "Basic"
high_business_impact = true

identity {
Expand Down Expand Up @@ -320,6 +320,8 @@ resource "azurerm_key_vault" "test" {
tenant_id = data.azurerm_client_config.current.tenant_id

sku_name = "standard"

purge_protection_enabled = true
}

resource "azurerm_storage_account" "test" {
Expand Down
4 changes: 3 additions & 1 deletion website/docs/r/machine_learning_workspace.html.markdown
Original file line number Diff line number Diff line change
Expand Up @@ -74,6 +74,8 @@ The following arguments are supported:

* `key_vault_id` - (Required) The ID of key vault associated with this Machine Learning Workspace. Changing this forces a new resource to be created.

-> NOTE: Azure Machine Learning Workspace will turn on purge protection on the key vault if it is not enabled.

* `storage_account_id` - (Required) The ID of the Storage Account associated with this Machine Learning Workspace. Changing this forces a new resource to be created.

-> **NOTE:** The `account_tier` cannot be `Premium` in order to associate the Storage Account to this Machine Learning Workspace.
Expand All @@ -92,7 +94,7 @@ The following arguments are supported:

* `high_business_impact` - (Optional) Flag to signal High Business Impact (HBI) data in the workspace and reduce diagnostic data collected by the service

* `sku_name` - (Optional) SKU/edition of the Machine Learning Workspace, possible values are `Basic` for a basic workspace or `Enterprise` for a feature rich workspace. Defaults to `Basic`.
* `sku_name` - (Optional) SKU/edition of the Machine Learning Workspace, possible values are `Basic`. Defaults to `Basic`.

* `tags` - (Optional) A mapping of tags to assign to the resource. Changing this forces a new resource to be created.

Expand Down