diff --git a/.github/labeler.yml b/.github/labeler.yml index 4bbdeca759..6de3a00e89 100644 --- a/.github/labeler.yml +++ b/.github/labeler.yml @@ -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: diff --git a/CODEOWNERS b/CODEOWNERS index e28badc88b..9ae6bc3b7b 100644 --- a/CODEOWNERS +++ b/CODEOWNERS @@ -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 diff --git a/__fixtures__/productConfig.mjs b/__fixtures__/productConfig.mjs index 563fb09da2..efbed80f36 100644 --- a/__fixtures__/productConfig.mjs +++ b/__fixtures__/productConfig.mjs @@ -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'], diff --git a/content/terraform-docs-common/data/cloud-docs-nav-data.json b/content/terraform-docs-common/data/cloud-docs-nav-data.json index 21ef6f71a8..95f8a1de19 100644 --- a/content/terraform-docs-common/data/cloud-docs-nav-data.json +++ b/content/terraform-docs-common/data/cloud-docs-nav-data.json @@ -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" diff --git a/content/terraform-docs-common/data/docs-nav-data.json b/content/terraform-docs-common/data/docs-nav-data.json index 1d719af56f..327201ed64 100644 --- a/content/terraform-docs-common/data/docs-nav-data.json +++ b/content/terraform-docs-common/data/docs-nav-data.json @@ -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" } ] diff --git a/content/terraform-docs-common/docs/docs/tools/index.mdx b/content/terraform-docs-common/docs/docs/tools.mdx similarity index 97% rename from content/terraform-docs-common/docs/docs/tools/index.mdx rename to content/terraform-docs-common/docs/docs/tools.mdx index a291f67b3c..b1203a152e 100644 --- a/content/terraform-docs-common/docs/docs/tools/index.mdx +++ b/content/terraform-docs-common/docs/docs/tools.mdx @@ -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 diff --git a/content/terraform-docs-common/redirects.jsonc b/content/terraform-docs-common/redirects.jsonc index fc4d875d90..69de209b77 100644 --- a/content/terraform-docs-common/redirects.jsonc +++ b/content/terraform-docs-common/redirects.jsonc @@ -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", @@ -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", diff --git a/content/terraform-mcp-server/v0.3.x/data/mcp-server-nav-data.json b/content/terraform-mcp-server/v0.3.x/data/mcp-server-nav-data.json new file mode 100644 index 0000000000..b0154d567d --- /dev/null +++ b/content/terraform-mcp-server/v0.3.x/data/mcp-server-nav-data.json @@ -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" + } +] diff --git a/content/terraform-docs-common/docs/docs/tools/mcp-server/deploy.mdx b/content/terraform-mcp-server/v0.3.x/docs/mcp-server/deploy.mdx similarity index 99% rename from content/terraform-docs-common/docs/docs/tools/mcp-server/deploy.mdx rename to content/terraform-mcp-server/v0.3.x/docs/mcp-server/deploy.mdx index 99dda4d252..20da4f717c 100644 --- a/content/terraform-docs-common/docs/docs/tools/mcp-server/deploy.mdx +++ b/content/terraform-mcp-server/v0.3.x/docs/mcp-server/deploy.mdx @@ -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: diff --git a/content/terraform-docs-common/docs/docs/tools/mcp-server/index.mdx b/content/terraform-mcp-server/v0.3.x/docs/mcp-server/index.mdx similarity index 99% rename from content/terraform-docs-common/docs/docs/tools/mcp-server/index.mdx rename to content/terraform-mcp-server/v0.3.x/docs/mcp-server/index.mdx index cd392cdaed..f102cd5a8b 100644 --- a/content/terraform-docs-common/docs/docs/tools/mcp-server/index.mdx +++ b/content/terraform-mcp-server/v0.3.x/docs/mcp-server/index.mdx @@ -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. diff --git a/content/terraform-docs-common/docs/docs/tools/mcp-server/prompt.mdx b/content/terraform-mcp-server/v0.3.x/docs/mcp-server/prompt.mdx similarity index 99% rename from content/terraform-docs-common/docs/docs/tools/mcp-server/prompt.mdx rename to content/terraform-mcp-server/v0.3.x/docs/mcp-server/prompt.mdx index 6ef15c9de4..fb7d5453d1 100644 --- a/content/terraform-docs-common/docs/docs/tools/mcp-server/prompt.mdx +++ b/content/terraform-mcp-server/v0.3.x/docs/mcp-server/prompt.mdx @@ -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. diff --git a/content/terraform-docs-common/docs/docs/tools/mcp-server/reference.mdx b/content/terraform-mcp-server/v0.3.x/docs/mcp-server/reference.mdx similarity index 100% rename from content/terraform-docs-common/docs/docs/tools/mcp-server/reference.mdx rename to content/terraform-mcp-server/v0.3.x/docs/mcp-server/reference.mdx diff --git a/content/terraform-docs-common/docs/docs/tools/mcp-server/security.mdx b/content/terraform-mcp-server/v0.3.x/docs/mcp-server/security.mdx similarity index 100% rename from content/terraform-docs-common/docs/docs/tools/mcp-server/security.mdx rename to content/terraform-mcp-server/v0.3.x/docs/mcp-server/security.mdx diff --git a/productConfig.mjs b/productConfig.mjs index d3f2549070..c3f41d479e 100644 --- a/productConfig.mjs +++ b/productConfig.mjs @@ -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'], diff --git a/scripts/prebuild/prebuild-arm-linux-binary.gz b/scripts/prebuild/prebuild-arm-linux-binary.gz index 8c2f739639..d7eb072614 100755 Binary files a/scripts/prebuild/prebuild-arm-linux-binary.gz and b/scripts/prebuild/prebuild-arm-linux-binary.gz differ diff --git a/scripts/prebuild/prebuild-arm-mac-binary.gz b/scripts/prebuild/prebuild-arm-mac-binary.gz index bb7bc95adc..b92154ebde 100755 Binary files a/scripts/prebuild/prebuild-arm-mac-binary.gz and b/scripts/prebuild/prebuild-arm-mac-binary.gz differ diff --git a/scripts/prebuild/prebuild-x64-linux-binary.gz b/scripts/prebuild/prebuild-x64-linux-binary.gz index 722dd174a7..cb90ab77db 100755 Binary files a/scripts/prebuild/prebuild-x64-linux-binary.gz and b/scripts/prebuild/prebuild-x64-linux-binary.gz differ