Infrastructure as Code


You can use your Render dashboard to create and manage services, but if you have a lot of services or your services require a lot of options, it can be helpful to define your Render infrastructure (services, databases and environment groups) as code in a render.yaml file.

You can add this file to source control to track changes to your infrastructure over time. Render also automatically updates your infrastructure when you push changes to render.yaml, so your Render resources always remain in sync with the values defined in your code.

Getting Started

  1. Create a file called render.yaml at the root of your repo. You can start with our sample YAML and modify it to match your services.
  2. Click on YAML in the top nav in the dashboard.
  3. Click the New From YAML button.
  4. Select the repo and branch containing your render.yaml file.
  5. Once selected, you’ll see a list of the changes that will be applied based on the contents of render.yaml. If there’s an issue with the file you’ll see an error message. If everything looks good, click on Apply Changes to create the resources defined in your file.

render.yaml sync screen

You’re all set! Future updates to your render.yaml will be synced automatically and we’ll notify you if there are any issues with the syncs.

No Automatic Deletions

When you remove resources from render.yaml, they are not deleted in Render. This prevents accidental deletions (for example, if a commit is reverted to a version missing a resource).

You can always delete a resource from your dashboard. If you need to recreate the resource, simply add it back to render.yaml and push the changes to your repo.

Adding Existing Resources

If you have existing resources on Render and would like to start managing them with render.yaml, simply add them to the file.

You do not need to delete an existing service before adding it to render.yaml.

Modifying Resources Outside YAML

You can still update or delete resources from the dashboard, but if they’re managed by YAML, your changes will be overwritten by future syncs. Resources will never be deleted, but they may be updated to match the values in render.yaml.

Turning Off Automatic Sync

If you need more control of when render.yaml resources are created or updated, you can turn off automatic syncs on the YAML Settings tab. You can then trigger a manual sync by clicking on the Manual Sync button and apply the displayed changes.

render.yaml settings screen