Hey,
I have built a product in Marketplace that calls an external API for some processing, using External Transforms. I setup a network egress policy to make the external call possible, and that works fine.
The challenge is that the domain that the external API is hosted on isn’t static. Instead, I want it to be configured when deploying my Marketplace product.
Since the network egress policy is an input in Marketplace, I am already able to map the right domain when deploying my product. However, I could not find a way to retrieve the domain associated with the egress policy in my External Transforms code. Is this possible? Or is there an alternative to make the domain configurable in my product?
A little hacky, but could you add a credential that you use only to store the URL? That would also appear as an input when deploying via Marketplace and you can just do something like url = creds.get("urlKey")
.
I assume this will be a short-lived workaround given the advent of source-based external transforms. As of the time of this comment, it appears that Marketplace does not support code respositories using source-based external transforms (at least not on our stack). However, I have to assume that’s somewhere on someone’s to-do list. When Marketplace does support source-based external transforms, then this will be as simple as source.get_https_connection().url
.
You’re right that all of this will be simplified once Marketplace supports source-based external transforms, but in the meantime this is a great workaround. Thanks!