StediDOCS
GuidesAPI Reference
This product is in Developer Preview

Formation

Getting started

Formation is Stedi's infrastructure as code product for automated provisioning and management of platform configuration. With Formation you define the desired platform configuration in text based template files that can be stored in source control and deployed through Formation. This allows you to use modern software development practices, including version control, CI/CD, and automated testing when making changes to your Stedi account.

The unit of deployment when using Formation is a Formation template. Every template describes a set of resources. The result of a successful deployment of a Formation template is a resource set. When an existing resource set is updated with a new version of a Formation template, Formation will perform the necessary operations needed against the changed resources, depending on the required change. This includes creating, modifying, and deleting underlying resources.

A customer can have multiple resource sets that all represent different parts of the account configuration.

Formation template

A Formation template is a JSON file containing a required Resources element and an optional Parameters element.

The Resources element contains one or more key-value pairs describing individual resource elements. Every resource element has a Type attribute that specifies what type of resource needs to be configured. The Properties attribute specifies the desired resource configuration. The following example describes a function that returns the text hello world.

{
  "Resources": {
    "MyFunction": {
      "Type": "Stedi::Function",
      "Properties": {
        "Name": "my-function",
        "Code": "module.exports = (input: any) => \"hello world\";"
      }
    }
  }
}

Using Formation through Terminal

To create a resource set, navigate to "Resource sets" in the main menu. Select "Create resource set" and provide a name and template for your resource set.

creating a new resource set

After having successfully created a resource set you will be able to find it in the list of resource sets.

resource set create completed

When you click on the resource set you will be able to see the resources that were deployed.

resource set details

Resources (e.g. functions) that are managed by Formation will have a "Managed by Formation" badge that will take you to the resource set that is used to manage the resource.

managed by formation

Supported Formation resource types

Refer to Resource Types for more details.

Service limits

Formation currently allows up to:

  • 300 active resource sets per organization
  • 300 resources per resource sets
  • 1 concurrent deployment per organization
  • API requests are limited to 20 per second and 10,000 per day