Hey There o/ I'm trying to use Pulumi to create a ...
# azure
f
Hey There o/ I'm trying to use Pulumi to create a FrontDoor. The issue we are having is that we cannot get the ID's for healthprobe or loadbalancer to be accepted. Here's what we tried: • Referring to the Output<string> ID of the created items • Using the simple
name
assigned to the items • Building the full ID (as seen in the current snippet) These are the vein of error we see:
Copy code
@ Updating....
azure-native:network:FrontDoor frontdoor-mycocom-production creating error: Code="BadRequest" Message="Invalid child resource reference /subscriptions/{RedactedSubscriptionGuid}/resourceGroups/frontdoor-b2c-rsg-production/providers/Microsoft.Network/frontDoors/mycocom-production/loadBalancingSettings/DefaultLoadBalancer detected for property Frontdoor.BackendPools[0].LoadBalancingSettings.Id; 
Invalid child resource reference /subscriptions/{RedactedSubscriptionGuid}/resourceGroups/frontdoor-b2c-rsg-production/providers/Microsoft.Network/frontDoors/mycocom-production/healthProbeSettings/DefaultHealthCheck detected for property Frontdoor.BackendPools[0].HealthProbeSettings.Id; 
Invalid child resource reference /subscriptions/{RedactedSubscriptionGuid}/resourceGroups/frontdoor-b2c-rsg-production/providers/Microsoft.Network/frontDoors/mycocom-production/loadBalancingSettings/DefaultLoadBalancer detected for property Frontdoor.BackendPools[1].LoadBalancingSettings.Id; 
Invalid child resource reference /subscriptions/{RedactedSubscriptionGuid}/resourceGroups/frontdoor-b2c-rsg-production/providers/Microsoft.Network/frontDoors/mycocom-production/healthProbeSettings/DefaultHealthCheck detected for property Frontdoor.BackendPools[1].HealthProbeSettings.Id; 
Invalid child resource reference /subscriptions/{RedactedSubscriptionGuid}/resourceGroups/frontdoor-b2c-rsg-production/providers/Microsoft.Network/frontDoors/mycocom-production/frontendEndpoints/fe-myco-cdn-myco-com detected for property Frontdoor.RoutingRules[0].FrontendEndpoints[0].Id"
Has anyone successfully created a FD with multiple front ends with Pulumi? What are we missing?
n
I need to do this in a pipeline later this month. Did you get it figured out?
f
Nope. We are considering parking this. Build up the FD manually and never think of it again
r
@few-processor-89505 I made these two helpers to generate the IDs, looks like the format is the same, for the default load balancing settings I used the name "default" and right now I just passed "disabled" as the name argument for the health check id and that's working right now.
Copy code
private Output<string> GetLoadBalancingSettingId(string fdName, string settingsName)
        => Output.Format($"/subscriptions/{_args.SubscriptionId}/resourceGroups/{_args.ResourceGroupName}/providers/Microsoft.Network/frontdoors/{fdName}/loadBalancingSettings/{settingsName}");

    private Output<string> GetHealthProbeSettingId(string fdName, string settingsName)
    => Output.Format($"/subscriptions/{_args.SubscriptionId}/resourceGroups/{_args.ResourceGroupName}/providers/Microsoft.Network/frontdoors/{fdName}/healthProbeSettings/{settingsName}");
(sorry only just realised that this is a month old - could have sworn it was still August 😄 )