Retrieve AWS Environment Providers

Action ID: harmonix:get-env-providers
NPM Package:

@aws/plugin-scaffolder-backend-aws-apps-for-backstage

Description

Retrieves AWS Environment Provider data

Input Schema

PropertyTypeDescriptionRequired
environmentRefstring-

Output Schema

PropertyTypeDescriptionRequired
envRefstring-
envNamestring-
envProvidersarray-
envShortNamestring-
envDeployManualApprovalboolean-

Usage Examples

Generate CI workflow files using environment provider data

Use this when you want to create CI/CD workflows tailored to a selected AWS environment. The step fetches provider metadata and passes it into a templated workflow, then publishes and registers the new component.

Copy
steps:
  - id: fetch-base
    action: [fetch:template](/backstage/plugins/fetch-template/)
    input:
      url: ./skeleton
      targetPath: .
      values:
        name: ${{ parameters.name }}

  - id: get-env-providers
    action: harmonix:get-env-providers
    input:
      environmentRef: ${{ parameters.environmentRef }}

  - id: render-ci-workflows
    action: [fetch:template](/backstage/plugins/fetch-template/)
    input:
      url: ./templates/ci
      targetPath: ./.github/workflows
      values:
        environmentName: ${{ steps.get-env-providers.output.envName }}
        environmentShort: ${{ steps.get-env-providers.output.envShortName }}
        environmentRef: ${{ steps.get-env-providers.output.envRef }}
        envRequiresManualApproval: ${{ steps.get-env-providers.output.envDeployManualApproval }}
        providers: ${{ steps.get-env-providers.output.envProviders }}

  - id: publish
    action: [publish:github](/backstage/plugins/publish-github/)
    input:
      repoUrl: github.com?owner=acme&repo=${{ parameters.name }}

  - id: register
    action: [catalog:register](/backstage/plugins/catalog-register/)
    input:
      repoContentsUrl: ${{ steps.publish.output.repoContentsUrl }}
      catalogInfoPath: /catalog-info.yaml

Drive Terraform config and add approval gate based on environment settings

Use this when you need to generate infra files with the correct AWS providers and optionally add a manual approval workflow if the environment requires it.

Copy
steps:
  - id: fetch-base
    action: [fetch:template](/backstage/plugins/fetch-template/)
    input:
      url: ./service-template
      targetPath: .
      values:
        name: ${{ parameters.name }}

  - id: get-env
    action: harmonix:get-env-providers
    input:
      environmentRef: ${{ parameters.environmentRef }}

  - id: render-terraform
    action: [fetch:template](/backstage/plugins/fetch-template/)
    input:
      url: ./templates/terraform
      targetPath: ./infra
      values:
        envRef: ${{ steps.get-env.output.envRef }}
        envShort: ${{ steps.get-env.output.envShortName }}
        providers: ${{ steps.get-env.output.envProviders }}

  - id: add-approval-gate
    if: ${{ steps.get-env.output.envDeployManualApproval }}
    action: [fetch:template](/backstage/plugins/fetch-template/)
    input:
      url: ./templates/approval-gate
      targetPath: ./.github/workflows
      values:
        environmentName: ${{ steps.get-env.output.envName }}

  - id: publish
    action: [publish:github](/backstage/plugins/publish-github/)
    input:
      repoUrl: github.com?owner=acme&repo=${{ parameters.name }}

  - id: register
    action: [catalog:register](/backstage/plugins/catalog-register/)
    input:
      repoContentsUrl: ${{ steps.publish.output.repoContentsUrl }}
      catalogInfoPath: /catalog-info.yaml