-
Notifications
You must be signed in to change notification settings - Fork 4.7k
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
azurerm_machine_learning_compute_cluster
- subnet_resource_id
does not have to be specified when node_public_ip_enabled
is false
#28673
Conversation
…t have to be specified when node_public_ip_enabled is false
@@ -155,8 +155,10 @@ func resourceComputeCluster() *pluginsdk.Resource { | |||
}, | |||
|
|||
"subnet_resource_id": { | |||
Type: pluginsdk.TypeString, | |||
Type: pluginsdk.TypeString, | |||
// O + C as you don't have to specify it for Azure to assign one to the cluster |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
// O + C as you don't have to specify it for Azure to assign one to the cluster | |
// NOTE: O+C as you don't have to specify it for Azure to assign one to the cluster |
workspaceInManagedVnet := false | ||
|
||
if workspaceModel.Properties != nil && | ||
workspaceModel.Properties.ManagedNetwork != nil && | ||
workspaceModel.Properties.ManagedNetwork.Status != nil && | ||
workspaceModel.Properties.ManagedNetwork.Status.Status != nil { | ||
workspaceInManagedVnet = *workspaceModel.Properties.ManagedNetwork.Status.Status == workspaces.ManagedNetworkStatusActive | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Are you able to confirm that this check isn't still required? Do we have an acceptance test for this?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I believe my acceptance test covered this check not being needed because nodePublicIPEnabled was false, the subnetResourceID was not specified and the workspace was not in a managed vnet and that test passes
--- PASS: TestAccComputeCluster_subnetResourceId (670.21s)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks @mbfrahry! One last comment regarding the docs, but once that's been updated this will be good to go!
} | ||
|
||
if !nodePublicIPEnabled && subnetResourceID == "" && !workspaceInManagedVnet { | ||
return fmt.Errorf("`subnet_resource_id` must be set if `node_public_ip_enabled` is set to `false` or the workspace is not in a managed network") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Last comment, the docs mention this validation for the node_public_ip_enabled
property, we should remove it.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good shout and done! Thanks @stephybun
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks @mbfrahry LGTM 🦄
* CHANGELOG.md for v4.18.0 * Update CHANGELOG.md for #28308 * Update for #28447 * Update for #28532 * Update for #28537 * Update CHANGELOG.md for #28674 * Update for #28363 * Update for #28536 * Update for #28416 * Update CHANGELOG.md #28700 * Update for #28673 * Update for #28308 Co-authored-by: Wodans Son <[email protected]> * Update for #27533 * prep for release --------- Co-authored-by: stephybun <[email protected]> Co-authored-by: sreallymatt <[email protected]> Co-authored-by: Wodans Son <[email protected]>
…s not have to be specified when `node_public_ip_enabled` is `false` (hashicorp#28673) * azurerm_machine_learning_compute_cluster - subnet_resource_id does not have to be specified when node_public_ip_enabled is false * Address review * Fix O+C message * address doc fix
* CHANGELOG.md for v4.18.0 * Update CHANGELOG.md for hashicorp#28308 * Update for hashicorp#28447 * Update for hashicorp#28532 * Update for hashicorp#28537 * Update CHANGELOG.md for hashicorp#28674 * Update for hashicorp#28363 * Update for hashicorp#28536 * Update for hashicorp#28416 * Update CHANGELOG.md hashicorp#28700 * Update for hashicorp#28673 * Update for hashicorp#28308 Co-authored-by: Wodans Son <[email protected]> * Update for hashicorp#27533 * prep for release --------- Co-authored-by: stephybun <[email protected]> Co-authored-by: sreallymatt <[email protected]> Co-authored-by: Wodans Son <[email protected]>
Community Note
Description
This PR makes it possible so that
subnet_resource_id
does not have to be specified whennode_public_ip_enabled
isfalse
.PR Checklist
For example: “
resource_name_here
- description of change e.g. adding propertynew_property_name_here
”Changes to existing Resource / Data Source
Testing
Change Log
Below please provide what should go into the changelog (if anything) conforming to the Changelog Format documented here.
azurerm_machine_learning_compute_cluster
-subnet_resource_id
does not have to be specified whennode_public_ip_enabled
isfalse
[GH-00000]This is a (please select all that apply):
Related Issue(s)
Fixes #27506
Note
If this PR changes meaningfully during the course of review please update the title and description as required.