Skip to content

Commit

Permalink
rename field
Browse files Browse the repository at this point in the history
  • Loading branch information
ms-henglu committed Aug 13, 2021
1 parent 835b9a2 commit 0e861c2
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 14 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -75,15 +75,7 @@ func resourceComputeInstance() *pluginsdk.Resource {
}, false),
},

"description": {
Type: pluginsdk.TypeString,
Optional: true,
ForceNew: true,
},

"identity": SystemAssignedUserAssigned{}.Schema(),

"personal_compute_instance_setting": {Type: pluginsdk.TypeList,
"assign_to_user": {Type: pluginsdk.TypeList,
Optional: true,
ForceNew: true,
MaxItems: 1,
Expand All @@ -102,6 +94,14 @@ func resourceComputeInstance() *pluginsdk.Resource {
},
},

"description": {
Type: pluginsdk.TypeString,
Optional: true,
ForceNew: true,
},

"identity": SystemAssignedUserAssigned{}.Schema(),

"ssh_access": {
Type: pluginsdk.TypeList,
Optional: true,
Expand Down Expand Up @@ -179,7 +179,7 @@ func resourceComputeInstanceCreate(d *pluginsdk.ResourceData, meta interface{})
Subnet: subnet,
SSHSettings: expandComputeSSHSetting(d.Get("ssh_access").([]interface{})),
ComputeInstanceAuthorizationType: machinelearningservices.ComputeInstanceAuthorizationType(d.Get("authorization_type").(string)),
PersonalComputeInstanceSettings: expandComputePersonalComputeInstanceSetting(d.Get("personal_compute_instance_setting").([]interface{})),
PersonalComputeInstanceSettings: expandComputePersonalComputeInstanceSetting(d.Get("assign_to_user").([]interface{})),
},
ComputeLocation: utils.String(d.Get("location").(string)),
Description: utils.String(d.Get("description").(string)),
Expand Down Expand Up @@ -246,7 +246,7 @@ func resourceComputeInstanceRead(d *pluginsdk.ResourceData, meta interface{}) er
}
d.Set("authorization_type", props.Properties.ComputeInstanceAuthorizationType)
d.Set("ssh_access", flattenComputeSSHSetting(props.Properties.SSHSettings))
d.Set("personal_compute_instance_setting", flattenComputePersonalComputeInstanceSetting(props.Properties.PersonalComputeInstanceSettings))
d.Set("assign_to_user", flattenComputePersonalComputeInstanceSetting(props.Properties.PersonalComputeInstanceSettings))
}
} else {
return fmt.Errorf("compute resource %s is not a ComputeInstance Compute", id)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -101,12 +101,12 @@ The following arguments are supported:

* `authorization_type` - (Optional) The Compute Instance Authorization type. Possible values include: `personal`. Changing this forces a new Machine Learning Compute Instance to be created.

* `assign_to_user` - (Optional) A `assign_to_user` block as defined below. A user explicitly assigned to a personal compute instance. Changing this forces a new Machine Learning Compute Instance to be created.

* `description` - (Optional) The description of the Machine Learning Compute Instance. Changing this forces a new Machine Learning Compute Instance to be created.

* `identity` - (Optional) A `identity` block as defined below. Changing this forces a new Machine Learning Compute Instance to be created.

* `personal_compute_instance_setting` - (Optional) A `personal_compute_instance_setting` block as defined below. A user explicitly assigned to a personal compute instance. Changing this forces a new Machine Learning Compute Instance to be created.

* `ssh_access` - (Optional) A `ssh_access` block as defined below. Specifies policy and settings for SSH access. Changing this forces a new Machine Learning Compute Instance to be created.

* `subnet_resource_id` - (Optional) Virtual network subnet resource ID the compute nodes belong to. Changing this forces a new Machine Learning Compute Instance to be created.
Expand All @@ -123,7 +123,7 @@ A `identity` block supports the following:

---

A `personal_compute_instance_setting` block supports the following:
A `assign_to_user` block supports the following:

* `object_id` - (Optional) User’s AAD Object Id.

Expand Down

0 comments on commit 0e861c2

Please sign in to comment.