Open ehrnst opened 1 year ago
any news on that?
Tried to make it work in a little bit legacy way and seems that this works but with some hacks like disabling new auth service
azure-resources-backend.ts
import { createRouter } from '@vippsno/plugin-azure-resources-backend';
import { createBackendPlugin } from '@backstage/backend-plugin-api';
import { coreServices } from '@backstage/backend-plugin-api';
import {
loggerToWinstonLogger,
} from '@backstage/backend-common';
export default createBackendPlugin({
pluginId: 'azure-resources',
register(env) {
env.registerInit({
deps: {
config: coreServices.rootConfig,
logger: coreServices.logger,
httpRouter: coreServices.httpRouter
},
async init({ config, logger, httpRouter }) {
const winstonLogger = loggerToWinstonLogger(logger);
httpRouter.use(await createRouter({ config, logger: winstonLogger }));
httpRouter.addAuthPolicy({
path: '/',
allow: 'unauthenticated',
});
},
});
},
});
index.ts
backend.add(import('./plugins/azure-resources-backend'));
I have created new backend version. please check if this could help https://github.com/davormilutinovic/backstage-azure-resources-backend. It is working for me. Don't have time to create out of original repo both old and new versions but it should not be a huge effort. I have also updated new front end plugin version to go with this one https://github.com/davormilutinovic/backstage-azure-resource-frontend.
Backstage core is doing a design change to its backend, which will mean a refactor of this plugin at some point.
https://backstage.io/docs/backend-system/building-plugins-and-modules/migrating/
https://backstage.io/docs/backend-system/building-plugins-and-modules/migrating/