The following code seems kind of ugly: ``` ...
# general
c
The following code seems kind of ugly:
Copy code
var searchDns = new PrivateZone("<http://privatelink.search.windows.net|privatelink.search.windows.net>", new PrivateZoneArgs
        {
            PrivateZoneName = "<http://privatelink.search.windows.net|privatelink.search.windows.net>",
            ResourceGroupName = (
                _coreRef.GetOutput("CoreResourceGroupName") 
                    ?? throw new Exception("Core resource group not found"))
                .Apply<string>(rg => Convert.ToString(rg) 
                    ?? string.Empty)
        });
Am I doing something wrong?
_coreRef.GetOutput()
always returns
Output<object?>
but ResourceGroup name is
Input<string>
. Is there an easier way to convert to
Input<string>
from the output of
GetOutput()
?
e
Sadly stack references don't have a well typed interface. They're just fetching a JSON blob underneath, but there's probably scope for us to have GetOutput<T> to do that Convert call for you.
c
sounds good, thanks