const app = new cdk.App();
const clusterProvider = new blueprints.GenericClusterProvider({
mastersRole: blueprints.getResource(context => { // will generate a unique name for resource.
return new iam.Role(context.scope, 'AdminRole', { assumedBy: new AccountRootPrincipal()});
}),
... other props
});
Creates a proxy to an anonymous resource. This function allows passing the provider function as input.
It enables creating ad-hoc references outside of the Stack construct and using them with the blueprint. Designed for cases when resource is defined once and needed in a single place.