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
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.
- Create a file called
render.yamlat the root of your repo. You can start with our sample YAML and modify it to match your services.
- Click on YAML in the top nav in the dashboard.
- Click the New From YAML button.
- Select the repo and branch containing your
- 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.
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.
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.
If you have existing resources on Render and would like to start managing them with
add them to the file.
You do not need to delete an existing service before adding it to
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
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.