question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Command `func templates list` returns invalid templates

See original GitHub issue

The templates returned from func templates list are not valid as input for func new’s --template parameter.

func templates list --language dotnet returns (amongst others) the template ‘Azure Service Bus Topic trigger’.

Using the output in func new --template 'Azure Service Bus Topic trigger' will result in an error Unknown template 'AzureServiceBusTopictrigger' (Parameter 'templateName').

Instead Service Bus Topic trigger needs to be used.

Version 4.0.3971

Issue Analytics

  • State:open
  • Created 2 years ago
  • Reactions:8
  • Comments:5

github_iconTop GitHub Comments

1reaction
mcolliercommented, Mar 23, 2023

The list of templates returned by func templates list --language C# does not match the template list shown after executing func new --language C#. Why would these lists be different?

> func new --language C#
Select a number for template:
1. QueueTrigger
2. HttpTrigger
3. BlobTrigger
4. TimerTrigger
5. KafkaTrigger
6. KafkaOutput
7. DurableFunctionsOrchestration
8. SendGrid
9. EventHubTrigger
10. ServiceBusQueueTrigger
11. ServiceBusTopicTrigger
12. EventGridTrigger
13. CosmosDBTrigger
14. IotHubTrigger
Choose option: 
> func templates list --language C#
C# Templates:
  Azure Blob Storage trigger
  Azure Cosmos DB trigger
  Durable Functions activity
  Durable Functions HTTP starter
  Durable Functions orchestrator
  Azure Event Grid trigger
  Azure Event Hub trigger
  HTTP trigger
  IoT Hub (Event Hub)
  Azure Queue Storage trigger
  RabbitMQ trigger
  SendGrid
  Azure Service Bus Queue trigger
  Azure Service Bus Topic trigger
  SignalR negotiate HTTP trigger
  Timer trigger
0reactions
ali-zfrcommented, Oct 31, 2022

Issue exists Core Tools Version: 4.0.4829 Commit hash: N/A (64-bit) Function Runtime Version: 4.11.2.19273

image

Read more comments on GitHub >

github_iconTop Results From Across the Web

Resolve template validation or template format errors in ...
This returns the following error: "Template validation error: Invalid template property or properties [Bucket]." This error is caused because the CloudFormation ...
Read more >
Invalid cast error in function template which return values ...
If I try to compile my template the compiler throws the following error: error: cannot initialize return object of type 'int' with an...
Read more >
Azure Functions Core Tools reference
Use the func templates list command to see the complete list of available templates for each supported language. To learn more, see Create...
Read more >
Resource functions for ARM templates - Azure
Describes the functions to use in an Azure Resource Manager template (ARM template) to retrieve values about resources.
Read more >
templatefile - Functions - Configuration Language | Terraform
This function just allows longer template sequences to be factored out into a separate file for readability. The "vars" argument must be an...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found