NotAllowedError when importing components into Backstage

While importing components into Backstage, you may encounter a NotAllowedError telling you that "Entity [...] is not of an allowed kind for that location". Here's how to fix it.

While importing components into Backstage, you may encounter a NotAllowedError telling you that Entity [...] is not of an allowed kind for that location, like shown below.

Entity template:default/component-name at url:<url>, originated at url:<url>, is not of an allowed kind for that location

...all you have to do is to make sure the component kind (for example Template, Component or API) you're trying to add exists in the catalog.rules.allow array in your app-config.yaml. For example, if you're trying to add a Template, make sure it's in the array, for example like this

catalog:
  rules:
    - allow: [Component, Group, User, Resource, Location, Template]