Hi, anyone know if it is possible to set up an eve...
# azure
b
Hi, anyone know if it is possible to set up an event hub api connection in an LogicApp in Pulumi? I’ve set the connectionString in ParameterValues, but I still get an error message in the logic app designer in the portal: Failed to save logic app la-my-logicapp. Some of the connections are not authorized yet. If you just created a workflow from a template, please add the authorized connections to your workflow before saving. Am I maybe missing some ParameterValues?
Copy code
//event hub connection
var eventHubConnection = new AzureNative.Web.Connection("eventHubs", new AzureNative.Web.ConnectionArgs
        {
            ConnectionName = "eventhubs",
            ResourceGroupName = resourceGroup.Name,
            Location = resourceGroup.Location,
            Tags = config.Tags,
            Properties = new AzureNative.Web.Inputs.ApiConnectionDefinitionPropertiesArgs
            {
                Api = new AzureNative.Web.Inputs.ApiReferenceArgs
                {
                    DisplayName = "myEventHub",
                    Id = eventhubsApiId,
                    Name = "eventhubs",
                    Type = "Microsoft.Web/locations/managedApis"
                    
                },
                DisplayName = "eventHubBattery12VEvents",
                ParameterValues =
                {
                    { "connectionString", eventHub.EventHubNameSpaceRootPrimaryConnectionString },
                },

            }
        });
// logic app
var laMyLogicApp = new Logic.Workflow("my-logic-app, new Logic.WorkflowArgs
        {
            Location = resourceGroup.Location,
            ResourceGroupName = resourceGroup.Name,
            Tags = config.Tags,
            
            Parameters =
            {
                { "$connections", new AzureNative.Logic.Inputs.WorkflowParameterArgs
                    {
                        Value = new Dictionary<string, object>
                        {
                            { "eventHubs", new Dictionary<string, object>
                            {
                                { "connectionId", eventHubConnection.Id },
                                { "connectionName", "eventHubs" },
                                { "id", eventhubsApiId }
                            } }
                        }
                    }
                }
            },