dm-processor-cf

Gets an output from cloudformation and returns the value

Usage no npm install needed!

<script type="module">
  import dmProcessorCf from 'https://cdn.skypack.dev/dm-processor-cf';
</script>

README

Welcome to dm-processor-cf 👋

Build Status NPM Package Maintainability Documentation Downloads/week lerna

A Data Migration processor to load values from CloudFormation stack outputs.

Configuration

Parameters

The CloudFormation processor accepts the following parameters as part of its configuration:

Name Type Required Description
region string Yes The AWS Region where this table exists
stack string Yes The name of the stack to get values from
output string Maybe Name of the output that should be loaded. Required if logicalId is not provided
logicalId string Maybe Logical ID of a resource in the stack. The processor will return the Physical ID. Required if output is not provided
profile string No Name of the AWS profile to use

Sample Configuration

module.exports = {
  defaultStage: "prod",
  migrationDirectory: "migrations",
  stages: {
    prod: {
      defaultParams: {
        region: "us-east-1",
      },
      drivers: {
        users: {
          driver: require("dm-driver-dynamodb"),
          params: {
            TableName: {
              // Use this processor to get values from CloudFormation
              processor: require("dm-processor-cf"),
              params: {
                stack: "some-stack-name",
                output: "SomeOutputName",
              },
            },
          },
        },
      },
    },
  },
};