I’ve been playing around with the Azure Terraform provider, and due to some extenuating circumstances, I need to add a custom resource. Is there an easy way to to add a new resource to an existing provider?
I’ve seen this SO question, which exactly what I’m trying to do, but the answers are not terribly helpful.
Things I have tried:
- Trying to extend the existing schema/provider function from my provider and use that. I couldn’t get it to work, and it’s not a maintainable solution (I’d bet we will have more corner cases, and I’d prefer to keep the resources separate if possible).
local-exec- this isn’t an option because of how my company does network security. We currently don’t have the private link established on-prem => cloud, and even if we did, SSH is explicitly disallowed.
- Playing around with the provider function to see if there was more trickery there that could be done. It’s not clear to me that I can grab the original provider’s credentials.
So, is this possible? If not, what are my options?
The next thing I’m considering trying is making an extremely stripped-down fork of the original provider and setting up an aliased provider with the same credentials. While this would work, it’s also not a great solution.