I might need to see the whole file, but in case that's not feasible for you:
Try working backwards from the deployment and cluster templates. For example, you might have this in the "cloudera-manager" / deployment template section (I say "might" because you've made modifications, which is fine).
cloudera-manager {
instance: ${instances.edge} {
...
This means that the instance template used for CM inherits from the "instances.edge" object with some overrides in the block that I've elided here with "...". So, you'd go back to the "instances" section, "edge" subsection. Anything there is available here. Does the "instances.edge" subsection include values for "useCustomManagedImage" and "customImagePlan"? That section in our older sample Azure files looked like this.
instances {
....
edge {
image: ${?common-instanceTemplate.base.image}
type: ${?common-instanceTemplate.base.type}
computeResourceGroup: ${?common-instanceTemplate.edge.computeResourceGroup}
networkSecurityGroupResourceGroup: ${?common-instanceTemplate.base.networkSecurityGroupResourceGroup}
networkSecurityGroup: ${?common-instanceTemplate.base.networkSecurityGroup}
virtualNetworkResourceGroup: ${?common-instanceTemplate.base.virtualNetworkResourceGroup}
virtualNetwork: ${?common-instanceTemplate.base.virtualNetwork}
subnetName: ${?common-instanceTemplate.base.subnetName}
instanceNamePrefix: ${?common-instanceTemplate.edge.instanceNamePrefix}
hostFqdnSuffix: ${?common-instanceTemplate.base.hostFqdnSuffix}
availabilitySet: ${?common-instanceTemplate.edge.availabilitySet}
publicIP: ${?common-instanceTemplate.edge.publicIP}
storageAccountType: ${?common-instanceTemplate.edge.storageAccountType}
dataDiskCount: ${?common-instanceTemplate.edge.dataDiskCount}
dataDiskSize: ${?common-instanceTemplate.edge.dataDiskSize}
managedDisks: ${?common-instanceTemplate.edge.managedDisks}
tags: ${?common-instanceTemplate.base.tags}
bootstrapScripts: [ ${?bootstrap-script.os-generic} ]
}
You can see that this lacks "useCustomManagedImage" and "customImagePlan". You'd need to add those two properties here for the deployment template to get their values. You can either add them literally, or refer to the values in "common-instanceTemplate.base" or "common-instanceTemplate.edge" or anywhere else they are actually defined. Or you can just put them right into the deployment template, in the "instance" subsection under the "cloudera-manager" section, and not worry about how the inheritance should be working. You can hopefully see how the multiple layers of indirection doesn't help with a clear configuration.