The module azure_rm_virtualmachine has fields for plan information. Module azure_rm_virtualmachinescaleset needs to have them and forward them when creating a VM with an image that requires plan info to be specified. The CIS hardened images from the Azure Marketplace is a prime example.

disk_size_gb=data_disk['disk_size_gb'],
                                managed_disk=self.compute_models.VirtualMachineScaleSetManagedDiskParameters(
                                    storage_account_type=data_disk.get('managed_disk_type', None)
                                ),
                            ))
                        vmss_resource.virtual_machine_profile.storage_profile.data_disks = data_disks
                    if image_reference is not None:
                        vmss_resource.virtual_machine_profile.storage_profile.image_reference = image_reference
                    self.log("Update virtual machine with parameters:")
                    self.create_or_update_vmss(vmss_resource)
                self.results['ansible_facts']['azure_vmss'] = self.serialize_vmss(self.get_vmss())
            elif self.state == 'absent':
                
                self.log("Delete virtual machine scale set {0}".format(self.name))
                self.results['ansible_facts']['azure_vmss'] = None
                self.delete_vmss(vmss)
        
        del self.results['actions']
        return self.results
    def get_vmss(self):
        '''
        Get the VMSS
        :return: VirtualMachineScaleSet object
        '''
        try:
            vmss = self.compute_client.virtual_machine_scale_sets.get(self.resource_group, self.name)
            return vmss
        except CloudError as exc:
            self.fail("Error getting virtual machine scale set {0} - {1}".format(self.name, str(exc)))
    def get_virtual_network(self, name):