Harmonix Platform Metadata

Action ID: harmonix:get-platform-metadata
NPM Package:

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

Description

Retrieve data about the Harmonix on AWS platform

Input Schema

No input schema defined for this action.

Output Schema

PropertyTypeDescriptionRequired
platformRegionstring-

Usage Examples

Set the Harmonix platform region in templated service config

Fetch the platform region and pass it into a template so generated files default to the correct AWS region. Use this when your service config or infrastructure files need the Harmonix region.

Copy
steps:
  - id: getPlatform
    action: harmonix:get-platform-metadata
    input: {}

  - id: fetchBase
    action: fetch:template
    input:
      url: ./skeletons/service
      targetPath: .
      values:
        component_id: ${{ parameters.component_id }}
        owner: ${{ parameters.owner }}
        aws:
          region: ${{ steps.getPlatform.output.platformRegion }}

Select a region-specific template based on Harmonix platform region

Determine the platform region and use it to pick a region-specific template directory. This is useful when you maintain different skeletons per AWS region and want to generate the appropriate variant via fetch:template.

Copy
steps:
  - id: readPlatform
    action: harmonix:get-platform-metadata
    input: {}

  - id: fetchRegionTemplate
    action: fetch:template
    input:
      url: ./skeletons/aws/${{ steps.readPlatform.output.platformRegion }}/service
      targetPath: .
      values:
        name: ${{ parameters.component_id }}
        owner: ${{ parameters.owner }}
        region: ${{ steps.readPlatform.output.platformRegion }}