microsoft / oe-engine

ACC template generation engine
MIT License
11 stars 14 forks source link

Regression when using custom VHD option #46

Closed ionutbalutoiu closed 5 years ago

ionutbalutoiu commented 5 years ago

After https://github.com/microsoft/oe-engine/commit/368bd09cdb3d9a12e6eea3e90ed605e51ca9e286 got merged into master, the following error is thrown when using a custom image VHD option:

INFO[0000] Generating assets into _output...            
FATA[0000] error generating template oe-engine-template.json: template: resources.t:52:25: executing "resources.t" at <.>: wrong type for value; expected *api.VMProfile; got *api.Properties 

This is the oe-engine JSON used:

{
  "properties": {
    "vmProfiles": [
      {
        "name": "<VM_NAME>",
        "osType": "Linux",
        "vmSize": "Standard_DC2s",
        "ports": [22],
        "isVanilla": true,
        "hasDNSName": true
      }
    ],
    "vnetProfile": {
      "vnetResourceGroup": "<VNET_RG>",
      "vnetName": "<VNET_NAME>",
      "subnetName": "default"
    },
    "linuxProfile": {
      "adminUsername": "azureuser",
      "sshPublicKeys": [
        {
          "keyData": "<SSH_KEY>"
        }
      ],
      "osImage": {
        "url": "<VHD_URL>"
      }
    },
    "diagnosticsProfile": {
      "enabled": false
    }
  }
}

If master is reverted just before https://github.com/microsoft/oe-engine/commit/368bd09cdb3d9a12e6eea3e90ed605e51ca9e286, everything is just fine.

The regression is isolated only if a custom image VHD is provides via the osImage.url option.