Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 7 additions & 0 deletions .github/labeler.yml
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,13 @@ Terraform Enterprise:
'content/terraform-enterprise/**'
]

Terraform MCP Server:
- any:
- changed-files:
- any-glob-to-any-file: [
'content/terraform-mcp-server/**'
]

Terraform migrate:
- any:
- changed-files:
Expand Down
1 change: 1 addition & 0 deletions CODEOWNERS
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@
/content/terraform-plugin-sdk @hashicorp/terraform-devex @hashicorp/terraform-education
/content/terraform-plugin-testing @hashicorp/terraform-devex @hashicorp/terraform-education
/content/terraform-docs-agents @hashicorp/team-hcpt-agent-engineering
/content/terraform-mcp-server @hashicorp/team-docs-packer-and-terraform
/content/terraform-migrate @hashicorp/team-docs-packer-and-terraform
/content/terraform-cdk @hashicorp/cdktf

Expand Down
10 changes: 10 additions & 0 deletions __fixtures__/productConfig.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -241,6 +241,16 @@ export const PRODUCT_CONFIG = {
versionedDocs: true,
websiteDir: 'website',
},
'terraform-mcp-server': {
assetDir: 'img',
basePaths: ['mcp-server'],
contentDir: 'docs',
dataDir: 'data',
productSlug: 'terraform',
semverCoerce: semver.coerce,
versionedDocs: true,
websiteDir: 'website',
},
'terraform-migrate': {
assetDir: 'img',
basePaths: ['migrate'],
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@
{
"title": "Get started",
"href": "https://learn.hashicorp.com/collections/terraform/cloud-get-started?utm_source=WEBSITE&utm_medium=WEB_IO&utm_offer=ARTICLE_PAGE&utm_content=DOCS"
},
},
{
"title": "Migrate to HCP Terraform",
"path": "migrate"
Expand Down
37 changes: 1 addition & 36 deletions content/terraform-docs-common/data/docs-nav-data.json
Original file line number Diff line number Diff line change
Expand Up @@ -17,42 +17,7 @@
},
{
"title": "Terraform Tools",
"routes": [
{
"title": "Overview",
"path": "tools"
},
{
"title": "Terraform MCP server",
"badge": {
"text": "BETA",
"type": "outlined",
"color": "neutral"
},
"routes": [
{
"title": "Overview",
"path": "tools/mcp-server"
},
{
"title": "Deploy server",
"path": "tools/mcp-server/deploy"
},
{
"title": "Prompt model",
"path": "tools/mcp-server/prompt"
},
{
"title": "Security",
"path": "tools/mcp-server/security"
},
{
"title": "Reference",
"path": "tools/mcp-server/reference"
}
]
}
]
"path": "tools"
},
{ "title": "Glossary", "path": "glossary" }
]
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ Terraform is part of a rich infrastructure and DevOps ecosystem. The tools below
|[Visual Studio Code Extension](https://marketplace.visualstudio.com/items?itemName=HashiCorp.terraform) | HashiCorp | Enable syntax highlighting and other editing features in VS Code using the Terraform Language Server.| |
|[Language Server](https://github.com/hashicorp/terraform-ls) | HashiCorp | Add support for the Terraform configuration language to editors that use the [Language Server Protocol](https://microsoft.github.io/language-server-protocol/), like Sublime Text, vim, emacs, etc.| |
|[console](/terraform/cli/commands/console) | HashiCorp | Evaluate Terraform expressions and explore your Terraform project's state. The console helps you develop and debug your configuration, especially when working with complex state data and Terraform expressions.| [Develop Configuration with the Console](/terraform/tutorials/cli/console) |
| [Terraform MCP server](/terraform/docs/tools/mcp-server) | HashiCorp | Helps you use an AI or LLM to write Terraform configuration by retrieving data directly from the Terraform registry. | |
| [Terraform MCP server](/terraform/mcp-server) | HashiCorp | Helps you use an AI or LLM to write Terraform configuration by retrieving data directly from the Terraform registry. | |


## Manage Infrastructure
Expand Down
12 changes: 11 additions & 1 deletion content/terraform-docs-common/redirects.jsonc
Original file line number Diff line number Diff line change
Expand Up @@ -660,6 +660,17 @@
"destination": "/terraform/migrate/reference/configuration",
"permanent": true
},
// Move MCP server to new versioned space
{
"source": "/terraform/docs/tools/mcp-server",
"destination": "terraform/mcp-server",
"permanent": true
},
{
"source": "/terraform/docs/tools/mcp-server/:slug*",
"destination": "terraform/mcp-server/:slug*",
"permanent": true
},
{
"source": "/terraform/language/stacks/create/config",
"destination": "/terraform/language/stacks/component/config",
Expand Down Expand Up @@ -720,7 +731,6 @@
"destination": "/terraform/language/v:version/block/stack/deploy",
"permanent": true
},

{
"source": "/terraform/language/stacks/reference/tfstacks-cli",
"destination": "/terraform/cli/commands/stacks",
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
[
{
"heading": "Terraform MCP Server"
},
{
"title": "Overview",
"path": ""
},
{
"title": "Deploy",
"path": "deploy"
},
{
"title": "Prompt",
"path": "prompt"
},
{
"title": "Security",
"path": "security"
},
{
"title": "Reference",
"path": "reference"
}
]
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,6 @@ description: |-

The Terraform Model Context Protocol (MCP) server enables AI models to generate Terraform configuration using up-to-date information from the Terraform Registry. This page explains how to install, configure, and integrate the MCP server with your AI client.

@include 'beta.mdx'

## Overview

The Terraform MCP server is a specialized service that provides AI models with access to current Terraform provider documentation and module information. You can deploy the server to the following environments:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,6 @@ description: Learn about the Terraform model context protocol (MCP) server and h

The Terraform Model Context Protocol (MCP) server enhances AI models with real-time access to current Terraform provider documentation, modules, and policies from the [Terraform registry](https://registry.terraform.io). This ensures AI-generated Terraform configurations use accurate, up-to-date information rather than potentially outdated training data.

@include 'beta.mdx'

## What is the Terraform MCP server?

The Model Context Protocol (MCP) is an open standard that enables AI models to securely connect with external tools, applications, and data sources. MCP allows AI models to access information beyond their training data, providing more current and accurate responses.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,6 @@ description: |-

This topic provides example prompts for helping you write Terraform configuration after installing the Terraform model context protocol (MCP) server. Refer to [Deploy the Terraform MCP server](/terraform/docs/tools/mcp-server/deploy) for instructions on how to deploy the server.

@include 'beta.mdx'

## Overview

To trigger the MCP server tools, ask your LLM questions about your provider configuration or general questions about Terraform providers and modules. Note that for your LLM to use the server, your questions must pertain to provider configuration from the registry. The LLM uses other sources, such as content from the internet, to respond to general questions about Terraform configuration or requests to generate code.
Expand Down
11 changes: 11 additions & 0 deletions productConfig.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -248,6 +248,17 @@ export const PRODUCT_CONFIG = {
versionedDocs: true,
websiteDir: 'website',
},
'terraform-mcp-server': {
assetDir: '',
basePaths: ['mcp-server'],
contentDir: 'docs',
dataDir: 'data',
navDataPath: 'mcp-server',
productSlug: 'terraform',
semverCoerce: semver.coerce,
versionedDocs: true,
websiteDir: 'website',
},
'terraform-migrate': {
assetDir: '',
basePaths: ['migrate'],
Expand Down
Binary file modified scripts/prebuild/prebuild-arm-linux-binary.gz
Binary file not shown.
Binary file modified scripts/prebuild/prebuild-arm-mac-binary.gz
Binary file not shown.
Binary file modified scripts/prebuild/prebuild-x64-linux-binary.gz
Binary file not shown.
Loading