> For the complete documentation index, see [llms.txt](https://docs.devolutions.net/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.devolutions.net/rdm/integrations/devops-ci-cd/terraform.md).

# Terraform

Use the Terraform provider for Devolutions Server to manage vaults, folders and entries, and to read server resources from your Terraform configuration.

Terraform integrates with Devolutions Server, a workspace type of Remote Desktop Manager, through the Devolutions Server Terraform provider, which manages your server instance from Terraform configuration files. It does not use a Remote Desktop Manager entry type. The ***Terraform*** document entry of Remote Desktop Manager is not related to this integration: it stores a Terraform configuration file (.tf) and opens it in a text editor.

## Prerequisites

* A Devolutions Server instance, version 2026.x. See [Devolutions Server](https://docs.devolutions.net/server).
* [Terraform](https://developer.hashicorp.com/terraform/install) version 1.0, or version 1.10 to use ephemeral resources.
* A Devolutions Server application identity, or an API key, with the permissions that match your configuration: ***View content*** on the vaults and the ***View***, ***View password*** and ***View sensitive information*** entry permissions to read entries; the ***Add***, ***Edit*** and ***Delete*** entry permissions to manage entries; ***Edit permissions*** for `dvls_entry_permissions`; the ***Add***, ***Edit*** and ***Delete*** permissions under ***Vault management*** for `dvls_vault`; the ***View*** permission under ***Role*** for the `dvls_administrative_role` data source; and the ***Manage*** permission under ***Assignments*** for `dvls_administrative_role_assignment`.
* [Go](https://go.dev/doc/install) version 1.26, only to build the provider from source.

## What you can do

* Authenticate to Devolutions Server with the application ID and application secret of an application identity, or with an API key.
* Manage vaults, folders, credential entries (username and password, secret, API key, SSH key, connection string and Azure service principal), certificate entries, entry permissions and administrative role assignments with resources.
* Read users, user groups, vaults, administrative roles, applications, host and website entries, credential entries and certificate entries with data sources, such as `dvls_entry_website`.
* Read the secret of a credential or certificate entry with an ephemeral resource.

{% hint style="info" %}
The provider is a work in progress. Breaking changes can occur between releases.
{% endhint %}

## Configure Terraform

1. Sign in to the Devolutions Server web interface.
2. Go to Administration – Management – Application identities, click ***Add*** (the + button) to create an application identity, and give it the permissions listed in the prerequisites. Note its ***Application ID*** and ***Application Secret***.
3. Declare the provider in your Terraform configuration:

   ```hcl
   terraform {
     required_providers {
       dvls = {
         source = "devolutions/dvls"
       }
     }
   }

   provider "dvls" {
     base_uri   = "https://your-dvls-instance.com/"
     app_id     = "your-app-id"
     app_secret = "your-app-secret"
   }
   ```
4. Replace the values of `base_uri`, `app_id` and `app_secret` with those of your instance and application identity. To use an API key, set `api_key` instead of `app_id` and `app_secret`.
5. Alternatively, leave the credentials out of the configuration and set the `DVLS_APP_ID` and `DVLS_APP_SECRET` environment variables, or `DVLS_API_KEY`.

## Use Terraform

1. Add a resource or a data source of the provider to your configuration, for example:

   ```hcl
   data "dvls_entry_website" "example" {
     id = "id-of-website-entry"
   }
   ```
2. Run [`terraform init`](https://developer.hashicorp.com/terraform/cli/commands/init) to install the provider.
3. Run [`terraform plan`](https://developer.hashicorp.com/terraform/cli/commands/plan) to preview the result.
4. Run [`terraform apply`](https://developer.hashicorp.com/terraform/cli/commands/apply) to apply the configuration.

For the resources and data sources available, see the [Terraform Registry](https://registry.terraform.io/providers/Devolutions/dvls/latest).

## Integration level

Terraform is an integration level 2 – Moderate support integration. See [Integration levels](https://docs.devolutions.net/resources/integration-levels).

#### See also

* [Application identities](https://docs.devolutions.net/server/web-interface/administration/user-and-security-management/applications-identities)
* [Terraform entry settings](https://docs.devolutions.net/rdm/knowledge-base/knowledge-base-articles/entry-settings/terraform.md)
* [terraform-provider-dvls on GitHub](https://github.com/Devolutions/terraform-provider-dvls)


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation by asking a question.

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://docs.devolutions.net/rdm/integrations/devops-ci-cd/terraform.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
