{"_id":"@ediri/backstage-scaffolder-backend-pulumi-og","name":"@ediri/backstage-scaffolder-backend-pulumi-og","dist-tags":{"latest":"0.1.0"},"versions":{"0.1.0":{"name":"@ediri/backstage-scaffolder-backend-pulumi-og","version":"0.1.0","main":"src/index.ts","types":"src/index.ts","license":"Apache-2.0","publishConfig":{"access":"public","main":"dist/index.esm.js","types":"dist/index.d.ts"},"backstage":{"role":"backend-plugin-module"},"scripts":{"start":"backstage-cli package start","build":"backstage-cli package build","lint":"backstage-cli package lint","test":"backstage-cli package test","clean":"backstage-cli package clean","prepack":"backstage-cli package prepack","postpack":"backstage-cli package postpack"},"dependencies":{"@backstage/errors":"^1.2.1","@backstage/integration":"^1.5.1","@backstage/plugin-scaffolder-node":"^0.1.5","@backstage/types":"^1.1.0","@backstage/plugin-scaffolder-backend":"^1.15.1","@pulumi/pulumi":"^3.77.1","@types/node":"*","zod":"^3.21.4"},"devDependencies":{"@backstage/backend-common":"^0.19.0","@backstage/cli":"^0.22.13","typescript":"~5.0.0"},"gitHead":"d88a8f6cc800ac16a5c74ebbbf1833bbcd522356","description":"### Getting Started","_id":"@ediri/backstage-scaffolder-backend-pulumi-og@0.1.0","_nodeVersion":"18.17.1","_npmVersion":"9.6.7","dist":{"integrity":"sha512-Qkr9nDHUreDmtcdFoAl5NhUzkaxAik0PVpX8SgYiNTW/ZGRnqQy6+sALuQ/ayCYLXDpdVa7R/NftndffW/u2ag==","shasum":"d52fbb532e6a7f5c3d789893e5ed52915564a1bf","tarball":"https://registry.npmjs.org/@ediri/backstage-scaffolder-backend-pulumi-og/-/backstage-scaffolder-backend-pulumi-og-0.1.0.tgz","fileCount":5,"unpackedSize":36907,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQDSpZE4qloGM1su4eEmyRj3prW5GMzUK1c9JZHiAxn4HAIhAI9bzHiuR7xUQqqARB9YeKz/TxaKzs4ckEFmDUXH8IU7"}]},"_npmUser":{"name":"ediri","email":"engin.diri@ediri.de"},"directories":{},"maintainers":[{"name":"ediri","email":"engin.diri@ediri.de"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/backstage-scaffolder-backend-pulumi-og_0.1.0_1695831708588_0.5978756344286871"},"_hasShrinkwrap":false}},"time":{"created":"2023-09-27T16:21:48.481Z","0.1.0":"2023-09-27T16:21:48.797Z","modified":"2023-09-27T16:21:49.053Z"},"maintainers":[{"name":"ediri","email":"engin.diri@ediri.de"}],"description":"### Getting Started","license":"Apache-2.0","readme":"## Pulumi Scaffolder Backend Module\n\n### Getting Started\n\nYou need to configure the action in your backend:\n\n### From your Backstage root directory\n\n```bash\n# From your Backstage root directory\nyarn add --cwd packages/backend @pulumi/backstage-scaffolder-backend-pulumi\n```\n\nConfigure the action (you can check\nthe [docs](https://backstage.io/docs/features/software-templates/writing-custom-actions#registering-custom-actions) to\nsee all options):\n\n```typescript\n// packages/backend/src/plugins/scaffolder.ts\nimport {\n    pulumiNewAction,\n    pulumiUpAction\n} from '@pulumi/backstage-scaffolder-backend-pulumi';\n\nconst actions = [\n    pulumiNewAction(),\n    pulumiUpAction(),\n    ...createBuiltinActions({\n        integrations,\n        catalogClient,\n        config: env.config,\n        reader: env.reader,\n    })\n]\n\nreturn await createRouter({\n    actions,\n    logger: env.logger,\n    config: env.config,\n    database: env.database,\n    reader: env.reader,\n    catalogClient,\n    identity: env.identity,\n    permissions: env.permissions,\n});\n```\n\n### PULUMI_ACCESS_TOKEN\n\nYou need to set the `PULUMI_ACCESS_TOKEN` environment variable to be able to use the Pulumi action.\n\n### Pulumi New Action\n\nThe Pulumi New Action is a custom action that allows you to create a new Pulumi project from a template.\n\n`pulumi:new`\n\n| Input        | Description                                                                        | Type          | Required |\n|--------------|------------------------------------------------------------------------------------|---------------|----------|\n| stack        | The Pulumi stack to use                                                            | string        | Yes      |\n| organization | The Pulumi organization to use for the Pulumi commands                             | string        | Yes      |\n| name         | The Pulumi project name to use                                                     | string        | Yes      |\n| template     | The Pulumi template to use, this can be a built-in template or a URL to a template | string        | Yes      |\n| description  | The Pulumi project description to use                                              | string        | Yes      |\n| config       | The Pulumi project config to use                                                   | object        | No       |\n| secretConfig | The Pulumi project secret config to use                                            | object        | No       |\n| args         | The Pulumi command arguments to run                                                | array(string) | No       |\n| folder       | The folder to run Pulumi in                                                        | string        | Yes      |\n\n```yaml\napiVersion: scaffolder.backstage.io/v1beta3\nkind: Template\nmetadata:\n  name: kubernetes-template\n  title: Kubernetes Cluster\n  description: |\n    A template for creating a new Kubernetes Cluster.\n  tags:\n    - pulumi\n    - kubernetes\nspec:\n  steps:\n    - id: pulumi-new-component\n      name: Cookie cut the component Pulumi project\n      action: pulumi:new\n      input:\n        name: \"${{ parameters.component_id }}-infrastructure\"\n        description: ${{ parameters.description | dump }}\n        organization: ediri\n        stack: ${{ parameters.stack }}\n        template: \"https://github.com/my-silly-organisation/microservice-civo/tree/main/infrastructure-${{ parameters.cloud }}-${{ parameters.language }}\"\n        config:\n          \"node:node_count\": \"${{ parameters.nodeCount }}\"\n        folder: .\n```\n\n### Pulumi Up Action\n\nThe Pulumi Up Action is a custom action that allows you to run the `pulumi up` command.\n\n`pulumi:up`\n\n| Input                      | Description                                                         | Type          | Required |\n|----------------------------|---------------------------------------------------------------------|---------------|----------|\n| stack                      | The Pulumi stack to use                                             | string        | Yes      |\n| organization               | The Pulumi organization to use for the Pulumi commands              | string        | Yes      |\n| name                       | The Pulumi project name to use                                      | string        | Yes      |\n| deployment                 | This flag indicates that Pulumi Deployment will be used             | boolean       | Yes      |\n| config                     | The Pulumi project config to use                                    | object        | No       |\n| secretConfig               | The Pulumi project secret config to use                             | object        | No       |\n| outputs                    | The Pulumi project outputs to return                                | array(string) | No       |\n| repoUrl                    | The Pulumi project repo URL to use, when using Pulumi Deployment    | string        | No       |\n| repoBranch                 | The Pulumi project repo branch to use, when using Pulumi Deployment | string        | No       |\n| repoProjectPath            | The Pulumi project repo path to use, when using Pulumi Deployment   | string        | No       |\n| providerCredentialsFromEnv | The Pulumi project provider credentials to use                      | array(string) | No       |\n\nThe action offers also Pulumi deployment support, to use it you need to set the `deployment` input to `true`. If you did\nnot set any `config` or `secretConfig`, during the `pulumi:new` action, you need to set them here. If you have any\nprovider related credentials, you need to set the `providerCredentialsFromEnv` input.\n\n```yaml\napiVersion: scaffolder.backstage.io/v1beta3\nkind: Template\nmetadata:\n  name: kubernetes-template\n  title: Kubernetes Cluster\n  description: |\n    A template for creating a new Kubernetes Cluster.\n  tags:\n    - pulumi\n    - kubernetes\nspec:\n  steps:\n    - id: pulumi-deploy-infrastructure\n      name: Deploy the infrastructure using Pulumi CLI\n      action: pulumi:up\n      input:\n        deployment: false\n        name: \"${{ parameters.component_id }}-infrastructure\"\n        repoUrl: \"https://github.com/${{ (parameters.repoUrl | parseRepoUrl)['owner'] }}/${{ (parameters.repoUrl | parseRepoUrl)['repo'] }}\"\n        repoProjectPath: .\n        organization: ediri\n        outputs:\n          - kubeconfig\n          - ClusterId\n        stack: ${{ parameters.stack }}\n```\n","readmeFilename":"README.md"}