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.

changed = True
                    vmss_dict['sku']['capacity'] = self.capacity
                if self.data_disks and \
                   len(self.data_disks) != len(vmss_dict['properties']['virtualMachineProfile']['storageProfile'].get('dataDisks', [])):
                    self.log('CHANGED: virtual machine scale set {0} - Data Disks'.format(self.name))
                    differences.append('Data Disks')
                    changed = True
                if self.upgrade_policy and \
                   self.upgrade_policy != vmss_dict['properties']['upgradePolicy']['mode']:
                    self.log('CHANGED: virtual machine scale set {0} - Upgrade Policy'.format(self.name))
                    differences.append('Upgrade Policy')
                    changed = True
                    vmss_dict['properties']['upgradePolicy']['mode'] = self.upgrade_policy
                if image_reference and \
                   image_reference.as_dict() != vmss_dict['properties']['virtualMachineProfile']['storageProfile']['imageReference']:
                    self.log('CHANGED: virtual machine scale set {0} - Image'.format(self.name))
                    differences.append('Image')
                    changed = True
                    vmss_dict['properties']['virtualMachineProfile']['storageProfile']['imageReference'] = image_reference.as_dict()
                update_tags, vmss_dict['tags'] = self.update_tags(vmss_dict.get('tags', dict()))
                if update_tags:
                    differences.append('Tags')
                    changed = True
                if bool(self.overprovision) != bool(vmss_dict['properties']['overprovision']):
                    differences.append('overprovision')
                    changed = True
                if bool(self.single_placement_group) != bool(vmss_dict['properties']['singlePlacementGroup']):
                    differences.append('single_placement_group')
                    changed = True
                vmss_dict['zones'] = [int(i) for i in vmss_dict['zones']] if 'zones' in vmss_dict and vmss_dict['zones'] else None