https://pulumi.com logo
#azure
Title
# azure
c

cuddly-napkin-89521

12/09/2022, 2:06 PM
Hello Team, If you can assist. I am trying to create function app with azure-native. For Pulumi, I am using type script and for function, python 3.8. I don't know, but function is not taking my paramiters, pulumi is giving me error. as I have created this resources in sandbox, I found informations in Resources JSON windows, and I change/copied needed parameters. Where am I doing wrong ? Error code :
Copy code
Argument of type '{ name: string; resourceGroupName: Output<string>; script_href: string; config_href: string; test_data_href: string; href: string; script_root_path_href: string; language: string; config: { ...; }; }' is not assignable to parameter of type 'WebAppFunctionArgs'.
  Object literal may only specify known properties, but 'script_href' does not exist in type 'WebAppFunctionArgs'. Did you mean to write 'scriptHref'?
my code:
Copy code
const etlFunctionApp = new web.WebAppFunction("fa-horizon-etl-dev-functionapp", {
        name: "fa-horizon-etl-dev-functionapp/data_validation",
        resourceGroupName: etlResourceGroup.name,
        script_href: "<https://func-horizon-dev-etl.azurewebsites.net/admin/vfs/home/site/wwwroot/data_validation/__init__.py>",
        config_href: "<https://func-horizon-dev-etl.azurewebsites.net/admin/vfs/home/site/wwwroot/data_validation/function.json>",
        test_data_href: "<https://func-horizon-dev-etl.azurewebsites.net/admin/vfs/home/data/Functions/sampledata/data_validation.dat>",
        href: "<https://func-horizon-dev-etl.azurewebsites.net/admin/functions/data_validation>",
        script_root_path_href: "<https://func-horizona-dev-etl.azurewebsites.net/admin/vfs/home/site/wwwroot/data_validation/>",
        language: "python",
        config: {
            scriptFile: "__init__.py",
            bindings: [
                {
                    name: "blob",
                    type: "blobTrigger",
                    direction: "in",
                    path: "uploaded-zone/{name}.json",
                    connection: "AzureWebJobsStorage"
                }
            ]
        },
    });
m

millions-journalist-34868

12/09/2022, 11:14 PM
The error indicates what is wrong. You have specified "script_href" as a property but if you check pulumi documentation it's scriptHref. Indeed in ARM it's "script_href" but I guess it has been automatically been transformed to avoid the snake case that is not natural in typescript. By the way, I don't know which IDE you are using, but it should tell you the error right away and suggest you the correct name.
4 Views