# Render Blueprints (IaC) — Manage your Render infrastructure with a single YAML file.

> For the complete documentation index, see [llms.txt](https://render.com/llms.txt).

*Blueprints* are Render's infrastructure-as-code (IaC) model for defining, deploying, and managing multiple resources with a single YAML file:

```mermaid
flowchart LR
  blueprint{{"<code>render.yaml</code>"}}
  subgraph services [" "]
    web(Web service);
    db[(DB)];
    envgroup[["Environment<br/>group"]];
  end
  blueprint --> services;
  class blueprint success;
```

```yaml
# This is a basic example Blueprint for a Django web service and
# the Render Postgres database it connects to.
services:
  - type: web # A Python web service named django-app running on a free instance
    plan: free
    name: django-app
    runtime: python
    repo: https://github.com/render-examples/django.git
    buildCommand: './build.sh'
    startCommand: 'python -m gunicorn mysite.asgi:application -k uvicorn.workers.UvicornWorker'
    envVars:
      - key: DATABASE_URL # Sets DATABASE_URL to the connection string of the django-app-db database
        fromDatabase:
          name: django-app-db
          property: connectionString

databases:
  - name: django-app-db # A Render Postgres database named django-app-db running on a free instance
    plan: free
```

A Blueprint acts as the single source of truth for configuring an interconnected set of services, databases, and environment groups. Whenever you update a Blueprint, Render automatically redeploys any affected services to apply the new configuration (you can also [disable this](<https://render.com/docs/infrastructure-as-code.md#disabling-automatic-sync>)).

Blueprints help you manage your infrastructure as it grows and changes over time.

## Setup

You can create a new Blueprint using your preferred method:

**Tab: Dashboard**

#### 1. Create your Blueprint file

1. Create a YAML file in your repo.
   - By default, Render looks for `render.yaml` at your repo's root, but you can use any file path.

2. In your new file, define the resources you want Render to manage. See the [Blueprint reference](<https://render.com/docs/blueprint-spec.md>) for all available fields.

   - To try out Blueprints, paste the example at the [top of this page](<https://render.com/docs/infrastructure-as-code.md>).

3. Commit and push the file to your Git provider.

#### 2. Connect and deploy your Blueprint

1. In the [Render Dashboard](https://dashboard.render.com), click *New > Blueprint*:

   [image: Creating a new Blueprint in the Render Dashboard]

2. Click *Connect* next to the repo that contains your Blueprint.

3. In the form that appears, specify a name for your Blueprint and which branch of your repo to link.

   - Each push to the linked branch that modifies your Blueprint file triggers a deploy of any added or modified resources.

4. If needed, specify a custom file path to your Blueprint's YAML file in the *Blueprint Path* field.

   - By default, Render creates a Blueprint using the `render.yaml` file at your repository's root.

5. Review the list of the changes that Render will apply based on the linked Blueprint:

   [image: List of new resources from a Blueprint]

   If your Blueprint file contains errors, the page instead displays details about those errors.

6. If everything looks correct, click *Deploy Blueprint*.

You're all set! Render starts deploying your Blueprint's resources:

[image: Blueprint provisioning progress in the Render Dashboard]

**Tab: CLI**

> *Creating Blueprints via the Render CLI is in early access.*
>
> The `render ea blueprints` commands are continuing to evolve and might introduce breaking changes.

#### 1. Install the CLI

> Requires Render CLI version 2.35.0 or later.

Use any of the following methods to install the Render CLI or upgrade to the latest version:

**Subtab: Homebrew**

##### Homebrew installation

Run the following commands:

```shell
brew update
brew install render
```

**Subtab: WinGet**

##### WinGet installation

Run the following command:

```shell
winget install render.cli
```

**Subtab: curl**

##### Installing with `curl`

Run the following command:

```shell
curl -fsSL https://raw.githubusercontent.com/render-oss/cli/refs/heads/main/bin/install.sh | sh
```

**Subtab: Direct download**

##### Direct download

1. Open the CLI's [GitHub releases page](https://github.com/render-oss/cli/releases/).
2. Download the executable that corresponds to your system's architecture.

If you use an architecture besides those provided, you can build from source instead.

**Subtab: Build from source**

##### Building from source

> We recommend building from source only if no other installation method works for your system.

1. [Install the Go programming language](https://golang.org/doc/install) if you haven't already.

2. Clone and build the CLI project with the following commands:

   ```shell
   git clone git@github.com:render-oss/cli.git
   cd cli
   go build -o render
   ```

After installation completes, open a new terminal tab and run `render` with no arguments to confirm.

#### 2. Create your Blueprint file

1. Create a YAML file in your repo.
   - By default, Render looks for `render.yaml` at your repo's root, but you can use any file path.

2. In your new file, define the resources you want Render to manage. See the [Blueprint reference](<https://render.com/docs/blueprint-spec.md>) for all available fields.

   - To try out Blueprints, paste the example at the [top of this page](<https://render.com/docs/infrastructure-as-code.md>).

3. Commit and push the file to your Git provider.

#### 3. Create your Blueprint

From your repo's local directory, run `render ea blueprints create` to create your Blueprint and its first plan.

By default, the `render ea blueprints create` command:

- Uses your local repo's `origin` remote and current branch
- Reads `render.yaml` at your repo root

The output lists the new Blueprint's configuration and ID (starts with `exs-`):

```shell
render ea blueprints create

Blueprint <BLUEPRINT_NAME> (exs-xxxxxxxxxxxxxxxxxxxx)
Source: <GIT_REPO_URL>
Branch: <CURRENT_BRANCH>
Path: render.yaml
Sync: exe-xxxxxxxxxxxxxxxxxxxx

... Planned changes ...

Next:
  render ea blueprints approve exs-xxxxxxxxxxxxxxxxxxxx
```

You can also pass any of the following options to configure how Render creates your Blueprint:

------

##### `--name`

A name for your Blueprint. Defaults to the repo name.

##### `--repo`

The Git repo URL (HTTPS or SSH). Defaults to your local `origin` remote.

##### `--branch`

The branch to read your Blueprint from.

Defaults to your current branch, or to the repo's default branch if you set `--repo`.

##### `--path`

The path to your Blueprint file, relative to the repo root. Defaults to `render.yaml`.

##### `--auto-sync`

Whether Render syncs your Blueprint on each push after you approve the first plan. Defaults to `true`.

##### `--existing-resources`

How to handle resources that [already exist](<https://render.com/docs/infrastructure-as-code.md#adding-an-existing-resource>):

- The default, `create_new`, adds a suffix to new resource names and leaves existing resources untouched.
- Alternatively, `adopt` takes over matching resources and updates them to match your Blueprint.

------

If planning fails, fix and push your changes, then plan again with your Blueprint's ID:

```shell
render ea blueprints plan exs-xxxxxxxxxxxxxxxxxxxx
```

#### 4. Approve the plan

You can review your Blueprint's plan with `render ea blueprints plan` to see the resources it will create:

```shell
render ea blueprints plan exs-xxxxxxxxxxxxxxxxxxxx
```

If your Blueprint defines secret environment variables (such as an API key), [provide those values](<https://render.com/docs/infrastructure-as-code.md#providing-secret-values>) before approving your plan.

When you're ready, approve the plan with `render ea blueprints approve`:

```shell
render ea blueprints approve exs-xxxxxxxxxxxxxxxxxxxx

Sync exe-xxxxxxxxxxxxxxxxxxxx
Commit: <COMMIT_HASH>
State: pending

Approved

Track in Dashboard: https://dashboard.render.com/blueprint/exs-xxxxxxxxxxxxxxxxxxxx/sync/exe-xxxxxxxxxxxxxxxxxxxx
```

Render starts deploying your Blueprint's resources. You can track their progress at the Dashboard URL in the output.

##### Providing secret values

To keep secrets out of your Blueprint file, define them as environment variables with [`sync: false`](<https://render.com/docs/blueprint-spec.md#prompting-for-secret-values>), then provide their values when you approve your plan.

When you run `render ea blueprints create`, the CLI generates a file that lists each variable that you must manually provide a value for. To provide values:

1. Open `~/.render/state/manual-env-vars/<BLUEPRINT_ID>.json` and fill in a value for each environment variable.
   - Each new plan replaces this file and clears your values, so fill them in right before you approve.

2. Run `render ea blueprints approve` with your Blueprint's ID.
   - The CLI reads your values, starts deploying your Blueprint's resources, and then deletes the secrets file.
   - To use a different file (in the same JSON format), pass its path with `--manual-env-vars-file`:

     ```shell
     render ea blueprints approve exs-xxxxxxxxxxxxxxxxxxxx --manual-env-vars-file ./env-values.json
     ```

     The CLI doesn't delete files you provide. Delete the file after you approve, and don't commit it to source control.

> *Render accepts values for `sync: false` variables only when it first creates a service.*
>
> To add secrets to a service your Blueprint _already manages_, [set them manually](<https://render.com/docs/configure-environment-variables.md#setting-environment-variables>).

**Tab: Coding Agent**

> *Creating Blueprints via the Render MCP server is in early access.*
>
> The MCP server's Blueprint tools are continuing to evolve and might introduce breaking changes.

#### 1. Connect the MCP server

[Connect the Render MCP server](<https://render.com/docs/mcp-server.md#1-connect-to-the-mcp-server>) to your coding agent (such as Claude Code, Codex, or Cursor).

#### 2. Create your Blueprint file

If your repo doesn't have a Blueprint file yet, prompt your agent to write one:

> Write a Blueprint file to deploy this app.

Your agent creates a `render.yaml` file in your project's root. Review the file, then commit and push it to your Git provider.

#### 3. Create your Blueprint

Prompt your agent to create a Blueprint using the file you just pushed:

> Create a Blueprint using the render.yaml file on the current branch of [REPO_NAME].

Your agent creates your Blueprint and its first plan, then summarizes the resources it will create.

To set your Blueprint's name, branch, file path, [auto-sync](<https://render.com/docs/infrastructure-as-code.md#disabling-automatic-sync>) behavior, or whether to [adopt existing resources](<https://render.com/docs/infrastructure-as-code.md#adding-an-existing-resource>), describe it in your prompt.

If planning fails, fix and push your changes, then ask your agent to plan again.

#### 4. Approve the plan

*If your Blueprint contains secrets* (such as an API key), your agent typically defines them as environment variables with [`sync: false`](<https://render.com/docs/blueprint-spec.md#prompting-for-secret-values>) so you can provide their values manually.

> *Don't share secrets with your agent.*
>
> Any values you share appear in plaintext in your agent's context.

Instead, approve your plan in the [Render Dashboard](https://dashboard.render.com) and [set your environment variables](<https://render.com/docs/configure-environment-variables.md#setting-environment-variables>) on each service's *Environment* page.

*If your Blueprint doesn't contain secrets*, prompt your agent to approve the plan:

> Approve the plan for my Blueprint.

Render starts deploying your Blueprint's resources. You can track their progress at the Dashboard URL your agent shares.

## Generating a Blueprint from existing services

You can generate a `render.yaml` file using any combination of your existing Render services. This is useful if you want to start managing those exact resources with a Blueprint, or if you want to [replicate those resources](<https://render.com/docs/infrastructure-as-code.md#replicating-a-blueprint>).

In the [Render Dashboard](https://dashboard.render.com), select any number of your services, then click *Generate Blueprint* at the bottom of the page:

[image: UI for generating a Blueprint in the Render Dashboard]

This opens a page where you can download or copy the generated `render.yaml` file. The page provides additional instructions for creating a Blueprint from that file.

*The generated `render.yaml` file does _not_ include environment variable values.* This is a security precaution. Instead, the generated file sets [`sync: false`](<https://render.com/docs/blueprint-spec.md#prompting-for-secret-values>) for all environment variables, like so:

```yaml
envVars:
  - key: SECRET_KEY
    sync: false
```

If you use this `render.yaml` file to create a Blueprint with _new_ services (instead of your existing ones), you'll need to provide values for these environment variables. For details, see [Setting environment variables](<https://render.com/docs/blueprint-spec.md#setting-environment-variables>).

## Replicating a Blueprint

You can create multiple Blueprints from a single YAML file. Each Blueprint creates and manages a completely independent set of resources.

The Blueprint creation flow displays a notice if your new Blueprint matches existing resources in your workspace:

[image: Notification that Blueprint matches existing resources]

As shown in the screenshot above, Render appends a suffix to the name of each new resource to prevent collisions with your existing resources.

Click *Deploy Blueprint* to create the new resources as usual.

## Managing Blueprint resources

> *Do not manage a resource with more than one Blueprint.*
>
> If multiple Blueprints apply different configuration to the same resource, its behavior becomes unpredictable.
>
> Blueprint-managed resources show an icon in the Render Dashboard:
>
> 
>
> [image: Blueprint-managed resource icon in the Render Dashboard]
>
> 

### Adding an existing resource

You can add an existing Render resource to your Blueprint. To do so, add the resource's details to your Blueprint file as you would for a new resource. See all supported fields and values for each service type in the [Blueprint specification reference](<https://render.com/docs/blueprint-spec.md>).

*Make sure to include all configuration options that are currently set for the resource in the Render Dashboard.* For most services, this includes the service's `name`, `type`, `plan`, `buildCommand`, `startCommand`, and so on. If you omit some of these options, your Blueprint will use a default value that almost definitely differs from your service's existing configuration.

When you next sync your Blueprint, Render applies the new configuration to the existing resource. The resource retains any existing environment variable values that aren't overwritten by the Blueprint.

### Modifying a resource outside of its Blueprint

You _can_ still make changes to a Blueprint-managed resource via other mechanisms (the Render Dashboard, the Render CLI, and so on). _However_, if any such changes conflict with Blueprint-defined configuration, the next Blueprint sync _overwrites_ them.

> *If you delete a Blueprint-managed resource, Render recreates it the next time you sync your Blueprint!*
>
> See [Deleting resources](<https://render.com/docs/infrastructure-as-code.md#deleting-resources>).

### Deleting resources

*With one exception, removing a definition from a Blueprint file does not delete the corresponding resource.* Existing resources remain intact. This is a safeguard against accidental deletions (for example, if you revert your Blueprint to a commit from before the addition of a critical resource).

> *Exception: Render Postgres [read replicas](<https://render.com/docs/postgresql-read-replicas.md>) _can_ be deleted by Blueprint changes:*
>
> - Removing or renaming a replica in a database's [`readReplicas`](<https://render.com/docs/blueprint-spec.md#readreplicas>) list deletes the replica.
> - Setting `readReplicas: []` deletes _all_ of a database's read replicas.
> - Omitting the `readReplicas` field entirely _preserves_ any existing replicas.

*Manually deleting a resource does not remove it from your Blueprint.* The next time you sync your Blueprint, Render detects that a defined resource is missing and _recreates_ it.

*To properly delete a Blueprint-managed resource:*

1. Update your Blueprint file to remove the relevant resource definition and sync your changes.
2. Delete the now-unmanaged resource via any supported mechanism (the Render Dashboard, the Render CLI, and so on).

## Disabling automatic sync

By default, Render automatically updates affected resources every time you push Blueprint changes to your linked branch.

To instead control exactly when you sync a particular Blueprint, set *Auto Sync* to *No* on your Blueprint's Settings page:

[image: render.yaml settings screen]

You can then manually trigger a sync by clicking *Manual sync* on your Blueprint's page.

## Supported fields and values

See the complete [Blueprint specification reference](<https://render.com/docs/blueprint-spec.md>).

---

##### Appendix: Glossary definitions

###### environment group

A collection of environment variables and/or secret files that you can link to any number of different services.

Helpful for distributing configuration across a [multi-service architecture](<https://render.com/docs/multi-service-architecture.md>) using a single source of truth.

Related article: https://render.com/docs/configure-environment-variables.md#environment-groups

###### Git provider

Render integrates with:

- GitHub
- GitLab
- Bitbucket
- Cursor Origin (beta)

Related article: https://render.com/docs/git-provider.md

###### environment variable

Config values you can apply to a service to customize its behavior at build and runtime, such as `NODE_VERSION` or `OPENAI_API_KEY`.

Render sets some environment variables for your service by [default](<https://render.com/docs/environment-variables.md>).

Related article: https://render.com/docs/configure-environment-variables.md