langgenius / langgenius/dify

Proposal: Extending `openapi` group to support IaC (Infrastructure as Code) integration

Open
#42,075 2 comments 1 reaction 0 assignees View on GitHub
💪 enhancement
Dominant language
TypeScript
Stars
156k
Forks
24.6k
Avg merge
22h 9m
Merged PRs (30d)
610

Description

### Self Checks

- [x] I have read the [Contributing Guide](https://github.com/langgenius/dify/blob/main/CONTRIBUTING.md) and [Language Policy](https://github.com/langgenius/dify/issues/1542).
- [x] I have searched for existing issues [search for existing issues](https://github.com/langgenius/dify/issues), including closed ones.
- [x] I confirm that I am using English to submit this report, otherwise it will be closed.
- [x] Please do not modify this template :) and fill in all the required fields.

### 1. Is this request related to a challenge you're experiencing? Tell me about your story.

## Problem
Multiple customers have requested the ability to migrate Dify workspaces between environments.

While Dify currently supports exporting and importing application DSLs, this covers individual apps rather than an entire workspace. Workspace migration also needs to account for plugins, credentials, datasets, and other dependencies.

## Proposed approach
Support managing Dify workspaces through Infrastructure as Code (IaC), enabling teams to define workspace configuration in a code repository and deploy it consistently across environments.

This approach would offer several benefits:

- Single source of truth: Version-controlled workspace configuration that can be reviewed and audited.
- Dependency resolution: Manage dependencies between applications and other workspace resources.
- Secret management: Integrate with secret-management systems to supply environment-specific credentials without committing them to source control.
- Declarative, reproducible deployments: Define the desired workspace state and apply it consistently across development, staging, and production.

## Prior work
A [working Terraform provider prototype](https://github.com/wylswz/dify-terraform-provider) was implemented before OpenAPI support was available. It relied on authentication workarounds, but demonstrated the feasibility of this approach.

This prototype could serve as a starting point for exploring an officially supported, API-backed solution for workspace migration and multi-environment management.

### 2. Additional context or comments

_No response_

### 3. Can you help us with this feature?

- [ ] I am interested in contributing to this feature.

Contributor guide

Open the contributing guide

Research direction

Start by reviewing Dify's existing OpenAPI support and the linked dify-terraform-provider prototype. Define the scope for an officially supported API-backed workspace migration approach, including applications, plugins, credentials, datasets, dependencies, and secret handling. Done should mean the feature's design and implementation boundaries are agreed for reproducible multi-environment workspace management.

Written by the indexing model from the issue text.

Assessment

Tech stack
openapi, terraform
Domain
backend-api-design, cloud, devops
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Active
Clarity
Needs clarification
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.