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.

"imageReference": {
                        "offer": "CoreOS",
                        "publisher": "CoreOS",
                        "sku": "Stable",
                        "version": "899.17.0"
                    },
                    "osDisk": {
                        "caching": "ReadWrite",
                        "createOption": "fromImage",
                        "managedDisk": {
                            "storageAccountType": "Standard_LRS"
                        }
                    }
                }
            }
        },
        "sku": {
            "capacity": 2,
            "name": "Standard_DS1_v2",
            "tier": "Standard"
        },
        "tags": null,
        "type": "Microsoft.Compute/virtualMachineScaleSets"
    }
'''  
import random
import re
import base64
try:
    from msrestazure.azure_exceptions import CloudError