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

Enhance - all machine learning resource - bump API to v2022-05-01 #18279

Merged
merged 21 commits into from
Sep 27, 2022

Conversation

xuzhang3
Copy link
Contributor

@xuzhang3 xuzhang3 commented Sep 7, 2022

Fixes: #16177 #16836 #17170
API issue: Azure/azure-rest-api-specs#18601

  1. This PR will bump the machine learning APIs from 2021-07-01 to 2022-05-01.
  2. azurerm_machine_learning_workspace support new config: public_network_access_enabled and v1_legacy_mode
  3. ping @stephybun as you renamed public_access_behind_virtual_network_enabled in azurerm_machine_learning_workspace - rename public_network_access_enabled #16288 and mark this property to be deprecate in v4 . There is a API breaking change after v2021-10-01(@deeikele to clarify if I'm wrong), allowPublicAccessWhenBehindVnet will be replaced by publicNetworkAccess. In this PR public_access_behind_virtual_network_enabled will be deprecated and replaced by public_network_access_enabled, also I removed the version judugment and put public_network_access_enabled in the general config.

=== RUN   TestAccComputeCluster_basic
=== PAUSE TestAccComputeCluster_basic
=== RUN   TestAccComputeCluster_complete
=== PAUSE TestAccComputeCluster_complete
=== RUN   TestAccComputeCluster_recreateVmSize
=== PAUSE TestAccComputeCluster_recreateVmSize
=== RUN   TestAccComputeCluster_requiresImport
=== PAUSE TestAccComputeCluster_requiresImport
=== RUN   TestAccComputeCluster_identity
--- PASS: TestAccComputeCluster_identity (1779.83s)
=== CONT  TestAccComputeCluster_basic
=== CONT  TestAccComputeCluster_recreateVmSize
=== CONT  TestAccComputeCluster_requiresImport
=== CONT  TestAccComputeCluster_complete
--- PASS: TestAccComputeCluster_complete (548.21s)
--- PASS: TestAccComputeCluster_basic (606.31s)
--- PASS: TestAccComputeCluster_requiresImport (635.06s)
--- PASS: TestAccComputeCluster_recreateVmSize (1064.32s)
PASS
ok      github.com/hashicorp/terraform-provider-azurerm/internal/services/machinelearning       2903.394s

=== RUN   TestAccComputeInstance_basic
=== PAUSE TestAccComputeInstance_basic
=== RUN   TestAccComputeInstance_complete
=== PAUSE TestAccComputeInstance_complete
=== RUN   TestAccComputeInstance_requiresImport
=== PAUSE TestAccComputeInstance_requiresImport
=== RUN   TestAccComputeInstance_identity
--- PASS: TestAccComputeInstance_identity (3617.08s)
=== CONT  TestAccComputeInstance_basic
=== CONT  TestAccComputeInstance_requiresImport
=== CONT  TestAccComputeInstance_complete
--- PASS: TestAccComputeInstance_complete (1219.26s)
--- PASS: TestAccComputeInstance_requiresImport (1311.09s)
--- PASS: TestAccComputeInstance_basic (1350.10s)
PASS
ok      github.com/hashicorp/terraform-provider-azurerm/internal/services/machinelearning       5009.971s

=== RUN   TestAccInferenceCluster_basic
=== PAUSE TestAccInferenceCluster_basic
=== RUN   TestAccInferenceCluster_privateBasic
=== PAUSE TestAccInferenceCluster_privateBasic
=== RUN   TestAccInferenceCluster_requiresImport
=== PAUSE TestAccInferenceCluster_requiresImport
=== RUN   TestAccInferenceCluster_completeCustomSSL
=== PAUSE TestAccInferenceCluster_completeCustomSSL
=== RUN   TestAccInferenceCluster_completeMicrosoftSSL
=== PAUSE TestAccInferenceCluster_completeMicrosoftSSL
=== RUN   TestAccInferenceCluster_completeProduction
=== PAUSE TestAccInferenceCluster_completeProduction
=== RUN   TestAccInferenceCluster_identity
--- PASS: TestAccInferenceCluster_identity (2359.46s)
=== CONT  TestAccInferenceCluster_basic
=== CONT  TestAccInferenceCluster_completeCustomSSL
=== CONT  TestAccInferenceCluster_requiresImport
=== CONT  TestAccInferenceCluster_completeProduction
=== CONT  TestAccInferenceCluster_privateBasic
=== CONT  TestAccInferenceCluster_completeMicrosoftSSL
--- PASS: TestAccInferenceCluster_basic (1041.43s)
--- PASS: TestAccInferenceCluster_requiresImport (1072.91s)
--- PASS: TestAccInferenceCluster_completeCustomSSL (1111.42s)
--- PASS: TestAccInferenceCluster_completeProduction (1151.63s)
--- PASS: TestAccInferenceCluster_completeMicrosoftSSL (1455.10s)
=== CONT  TestAccInferenceCluster_privateBasic
--- PASS: TestAccInferenceCluster_privateBasic (2034.70s)
PASS
ok      github.com/hashicorp/terraform-provider-azurerm/internal/services/machinelearning       4456.433s

=== RUN   TestAccSynapseSpark_basic
=== PAUSE TestAccSynapseSpark_basic
=== RUN   TestAccSynapseSpark_complete
=== PAUSE TestAccSynapseSpark_complete
=== RUN   TestAccSynapseSpark_requiresImport
=== PAUSE TestAccSynapseSpark_requiresImport
=== RUN   TestAccSynapseSpark_identity
--- PASS: TestAccSynapseSpark_identity (1942.22s)
=== CONT  TestAccSynapseSpark_basic
=== CONT  TestAccSynapseSpark_requiresImport
=== CONT  TestAccSynapseSpark_complete
--- PASS: TestAccSynapseSpark_complete (989.46s)
--- PASS: TestAccSynapseSpark_basic (1193.97s)
--- PASS: TestAccSynapseSpark_requiresImport (1290.35s)
PASS
ok      github.com/hashicorp/terraform-provider-azurerm/internal/services/machinelearning       3254.661s

=== RUN   TestAccMachineLearningWorkspaceDataSource_basic
=== PAUSE TestAccMachineLearningWorkspaceDataSource_basic
=== CONT  TestAccMachineLearningWorkspaceDataSource_basic
--- PASS: TestAccMachineLearningWorkspaceDataSource_basic (1905.25s)
PASS
ok      github.com/hashicorp/terraform-provider-azurerm/internal/services/machinelearning       1919.248s

=== RUN   TestAccMachineLearningWorkspace_basic
=== PAUSE TestAccMachineLearningWorkspace_basic
=== RUN   TestAccMachineLearningWorkspace_requiresImport
=== RUN   TestAccMachineLearningWorkspace_basicUpdate
=== PAUSE TestAccMachineLearningWorkspace_basicUpdate
=== RUN   TestAccMachineLearningWorkspace_complete
=== PAUSE TestAccMachineLearningWorkspace_complete
=== RUN   TestAccMachineLearningWorkspace_completeUpdate
=== RUN   TestAccMachineLearningWorkspace_userAssignedIdentity
=== PAUSE TestAccMachineLearningWorkspace_userAssignedIdentity
=== RUN   TestAccMachineLearningWorkspace_systemAssignedUserAssignedIdentity
=== PAUSE TestAccMachineLearningWorkspace_systemAssignedUserAssignedIdentity
=== RUN   TestAccMachineLearningWorkspace_identityUpdate
=== PAUSE TestAccMachineLearningWorkspace_identityUpdate
=== RUN   TestAccMachineLearningWorkspace_identityTypeUpdate
=== PAUSE TestAccMachineLearningWorkspace_identityTypeUpdate
=== RUN   TestAccMachineLearningWorkspace_userAssignedAndCustomManagedKey
=== PAUSE TestAccMachineLearningWorkspace_userAssignedAndCustomManagedKey
=== RUN   TestAccMachineLearningWorkspace_systemAssignedAndCustomManagedKey
=== PAUSE TestAccMachineLearningWorkspace_systemAssignedAndCustomManagedKey
=== CONT  TestAccMachineLearningWorkspace_basic
=== CONT  TestAccMachineLearningWorkspace_systemAssignedAndCustomManagedKey
=== CONT  TestAccMachineLearningWorkspace_userAssignedIdentity
=== CONT  TestAccMachineLearningWorkspace_complete
=== CONT  TestAccMachineLearningWorkspace_basicUpdate
=== CONT  TestAccMachineLearningWorkspace_completeUpdate
=== CONT  TestAccMachineLearningWorkspace_userAssignedAndCustomManagedKey
=== CONT  TestAccMachineLearningWorkspace_identityTypeUpdate
--- PASS: TestAccMachineLearningWorkspace_basic (517.36s)
=== CONT  TestAccMachineLearningWorkspace_requiresImport
--- PASS: TestAccMachineLearningWorkspace_userAssignedIdentity (566.79s)
=== CONT  TestAccMachineLearningWorkspace_identityUpdate
--- PASS: TestAccMachineLearningWorkspace_basicUpdate (696.34s)
=== CONT  TestAccMachineLearningWorkspace_systemAssignedUserAssignedIdentity
--- PASS: TestAccMachineLearningWorkspace_requiresImport (513.10s)
--- PASS: TestAccMachineLearningWorkspace_systemAssignedUserAssignedIdentity (445.93s)
--- PASS: TestAccMachineLearningWorkspace_identityTypeUpdate (1155.64s)
--- PASS: TestAccMachineLearningWorkspace_systemAssignedAndCustomManagedKey (2259.08s)
--- PASS: TestAccMachineLearningWorkspace_userAssignedAndCustomManagedKey (2285.39s)
--- PASS: TestAccMachineLearningWorkspace_completeUpdate (3162.84s)
PASS
ok    github.com/hashicorp/terraform-provider-azurerm/internal/services/machinelearning       3191.396s


application_insights_id = azurerm_application_insights.test.id
key_vault_id = azurerm_key_vault.test.id
storage_account_id = azurerm_storage_account.test.id
public_network_access_enabled = true

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The type should be enum, not boolean, it's not like binary.
It could be many possible values, such as "Enabled", "Disabled", "EnabledForSpecificNetwork", etc.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Normally if the enum value only have enable/disable, we will convert it to boolean, if the possible values more then two, I will change it back.

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

currently afaik it only supports two values in nearly every resource. if another value is ever add we can always deprecate the property and add non boolean property

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

yes, please.

Copy link

@deeikele deeikele Sep 9, 2022

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Could you please keep this to an enum type for consistency with the Azure APIs?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@katbyte @deeikele and @mingweihe are from MLW service team, they suggest we should keep the enum type consistecy with the AzureAPI and a potential type EnabledForSpecificNetwork will be added in the future.

Copy link

@mingweihe mingweihe Sep 13, 2022

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@katbyte @deeikele and @mingweihe are from MLW service team, they suggest we should keep the enum type consistecy with the AzureAPI and a potential type EnabledForSpecificNetwork will be added in the future.

Exactly, I also synced up with the team, they mentioned even though the swagger's having two values for the properties, the new value will be added later.

I can understand terraform has its own code change policy, while this is really a particular case, keeping a mismatched type there is not suitable for future maintenance.

Meanwhile, I think it's good to follow Azure APIs mostly, enum type with two values auto-changing to boolean policy is interesting, but not that suitable here.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

To amplify Mingwei's response boolean type is not appropriate here. Reference to enum implementation is found in Iot Hub (https://learn.microsoft.com/en-us/azure/iot-hub/iot-hub-public-network-access) selected IP ranges accepted value.

* public_access_behind_virtual_network_enabled deprecate switch
Copy link
Collaborator

@katbyte katbyte left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

as discussed internally LGTM ⚙️

@katbyte katbyte merged commit 2f542bb into hashicorp:main Sep 27, 2022
@github-actions github-actions bot added this to the v3.25.0 milestone Sep 27, 2022
@github-actions
Copy link

This functionality has been released in v3.25.0 of the Terraform Provider. Please see the Terraform documentation on provider versioning or reach out if you need any assistance upgrading.

For further feature requests or bug reports with this functionality, please create a new GitHub issue following the template. Thank you!

@github-actions
Copy link

I'm going to lock this pull request because it has been closed for 30 days ⏳. This helps our maintainers find and focus on the active contributions.
If you have found a problem that seems related to this change, please open a new issue and complete the issue template so we can capture all the details necessary to investigate further.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Oct 30, 2022
@xuzhang3 xuzhang3 deleted the f/mlw_enhance branch August 14, 2024 02:43
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

public_network_access_enabled does not really work for resource azurerm_machine_learning_workspace
4 participants