Dev onboarding: Environment setup
This example automates the creation of a GitHub repository, infrastructure provisioning with Terraform, and generates a PR for setting up an RDS instance.
Step 1: Register the Scaffolder templates
This Workflow uses two Scaffolder templates:
Follow the instructions to register the Scaffolder templates in Cortex.
Step 2: Start creating the Workflow
Follow the steps in the documentation to create a Workflow and configure its basic settings.
Step 3: Add blocks to the Workflow
The instructions on this page describe how to create this Workflow in the Cortex UI, but it is also possible to copy the Workflow YAML and add it to your workspace via the Cortex CLI. This allows you to quickly set up the example configuration then iterate on it for your own use case. Expand the tile below to learn more.
Expand the tiles below to learn about each block in this Workflow and how to configure them in the Cortex UI:
Step 4: Run the Workflow
When you run the Workflow, the following events happen:
The Data transformation block runs, which produces a repository name for the user based on your specified naming convention.
The Scaffolder runs, creating a new repository. The repo's name is based on the output of the previous block.
The GitHub "Trigger a workflow" block runs, which provisions Terraform infrastructure.
The second Scaffolder block runs, which opens a Pull Request to set up an RDS instance.
The Slack block runs, which sends a Slack message to the user to let them know that their test environment is ready.
Last updated
Was this helpful?