This is an expansion to this question by Robert. Originally he did not put "Managed Package" in the title so I feel like most of the answers missed that part.
I am building a managed package that is relying on custom metadata records creation. However upon researching and testing it appears that the only way to create custom metadata programmatically is by using Metadata.Operations.enqueueDeployment()
. Which is unfortunate because that kicks off a deployment.
My first concern with the deployment is that I have a 10 second CPU time(specific to what I am doing) to have this deployment finished. If there's another deployment(s) in progress the creation of my custom metadata might be delayed for a while.
My second concern is that the deployment can scare the consumer of the managed package if they see random deployments occurring in their org.
I was wondering if there's somebody who is advocating for the use of custom metadata in managed packages. Curious if I am missing on something due to lack of experience with managed packages.