Commit Graph

7 Commits

Author SHA1 Message Date
Antoine Rouaze a105de19c0 [azurerm] Add os_type and image_uri in azurerm_virtual_machine (#6553)
Fix #6372

Partial fix of #6526
2016-05-09 18:51:19 +01:00
Paul Stack d3939db0a1 provider/azurerm: Adding support for `tags` to `azurerm_virtual_machine` (#6556)
provider/azurerm: Adding support for `tags` to `azurerm_virtual_machine`
2016-05-09 18:14:02 +01:00
stack72 8dc47ac799 provider/azurerm: Error creating `azurerm_virtual_machine` data_disk
The `storage_data_disk` was trying to use vhd_url rather than vhd_uri.
This was causing an error on creating a new data_disk as part of a VM

Also added validation as data_disks can only be 1 - 1023 GB in size
2016-05-09 00:48:01 +01:00
stack72 712fc83a20 provider/azurerm: Fix an issue with `azurerm_virtual_machine` ssh_keys
ssh_keys were throwing an error similar to this:

```
* azurerm_virtual_machine.test: [DEBUG] Error setting Virtual Machine
* Storage OS Profile Linux Configuration: &errors.errorString{s:"Invalid
* address to set: []string{\"os_profile_linux_config\", \"0\",
* \"ssh_keys\"}"}
```

This was because of nesting of Set within a Set in the schema. By
changing this to a List within a Set, the schema works as expected. This
means we can now set SSH Keys on VMs. This has been tested using a
remote-exec and a connection block with the ssh key

```
azurerm_virtual_machine.test: Still creating... (2m10s elapsed)
azurerm_virtual_machine.test (remote-exec): Connected!
azurerm_virtual_machine.test (remote-exec): CONNECTED!
```
2016-05-08 22:51:51 +01:00
stack72 2e174ca3d4 provider/azurerm: Update `azurerm_virtual_machine` failed on
adminPassword

The Azure API never returns the AdminPAssword (as is correct) from the
Read API call. Therefore on Create, we do not set the AdminPassword of
the vm as part of the state. The Same func is used for Create & Update,
therefore when we changed anything on the VM, we were getting the
following error:

```
statusCode:Conflict
serviceRequestId:f498a6c8-6e7a-420f-9788-400f18078921
statusMessage:{"error":{"code":"PropertyChangeNotAllowed","target":"adminPassword","message":"Changing property 'adminPassword' is not allowed."}}
```

To fix this, we need to excldue the AdminPassword from the Update func
if it is empty
2016-05-06 23:44:03 +01:00
stack72 4db3242c53 provider/azurerm: Scaffolding the AzureRM Virtual Machine Test framework 2016-03-17 15:08:59 +00:00
stack72 cb109043f2 Scaffold the Azure RM Virtual Machine resource 2016-03-17 15:08:59 +00:00