terraform-mcp-server
terraform-mcp-server is hosted online, so all tools can be tested directly either in theInspector tabor in theOnline Client.
If you are the rightful owner of terraform-mcp-server and would like to certify it and/or have it hosted online, please leave a comment on the right or send an email to henry@mcphub.com.
The Terraform MCP Server is a Model Context Protocol server that integrates with Terraform Registry APIs for advanced automation in Infrastructure as Code development.
EvaluationTotal Score: 7/10
Evaluation Summary
- Strengths:
-
- Accuracy/Correctness:
-
- The agent consistently provides accurate and correct information regarding Terraform resources and modules, demonstrating a solid understanding of Terraform configurations and usage.
-
- It effectively identifies relevant Terraform modules and resources, providing detailed descriptions and example configurations.
-
- Usefulness / Clarity:
-
- The responses are well-structured and clear, making it easy for users to understand the information and apply it to their Terraform projects.
-
- The inclusion of example configurations and explanations of key arguments enhances the practical utility of the answers.
- Weaknesses:
-
- Completeness:
-
- The agent occasionally omits important information, such as significant updates in Terraform providers or widely-used modules, which could lead to incomplete guidance for users.
-
- It often lacks direct links to the latest documentation, which would provide users with access to comprehensive details and updates.
-
- Consistency with Claimed Capabilities:
-
- While the agent claims to fetch the latest documentation and resolve provider documentation IDs, it sometimes fails to provide direct documentation links or comprehensive searches, limiting its effectiveness in these areas.
- Suggestions for Improvement:
-
- Enhance Completeness:
-
- Include information on significant updates and widely-used modules to provide a more comprehensive overview.
-
- Provide direct links to the latest documentation for resources and modules to enhance user access to detailed information.
-
- Improve Search Exhaustiveness:
-
- Ensure that searches for modules and documentation are exhaustive and prioritize the most popular and comprehensive options.
- Overall Quality Score: 7/10
- The agent demonstrates strong accuracy and clarity in its responses but could improve in completeness and consistency with its claimed capabilities by providing more comprehensive information and direct documentation links.
Test case 1
Score: 6/10Can you fetch the latest documentation for the AWS S3 bucket resource from the Terraform AWS provider?I've fetched the latest documentation for the AWS S3 bucket resource from the Terraform AWS provider. Hereâs a summary of the key details along with a link to the full documentation:
Resource:
aws_s3_bucket
Description: The
aws_s3_bucket
resource provides functionality for managing general-purpose S3 buckets in AWS. For specific types of buckets, such as Amazon S3 Express directory buckets or S3 on Outposts, other resources should be used.Example Usage:
resource "aws_s3_bucket" "example" { bucket = "my-tf-test-bucket" tags = { Name = "My bucket" Environment = "Dev" } }
Argument Reference:
bucket
(Optional): Name of the bucket (must be lowercase and ⤠63 characters).tags
: Map of tags to assign to the bucket.force_destroy
(Optional, Default:false
): If set totrue
, all objects will be deleted when the bucket is destroyed.object_lock_enabled
(Optional): Indicates whether Object Lock is enabled for the bucket.- Additional arguments include
region
,bucket_prefix
, and deprecated arguments related to ACLs, logging, lifecycle rules, etc.
Timeouts:
create
: Default20m
read
: Default20m
update
: Default20m
delete
: Default60m
Import: You can import an S3 bucket using its name:
terraform import aws_s3_bucket.bucket bucket-name
For more detailed information, you can view the complete documentation here.
If you have any specific questions or need further details, feel free to ask!
The answer accurately describes the
aws_s3_bucket
resource, including its purpose and basic usage.The provided example usage is correct and aligns with standard Terraform configurations.
The answer is well-structured, making it easy to follow and understand.
Key details such as argument references, timeouts, and import instructions are clearly presented.
The answer does not mention significant changes introduced in Terraform AWS Provider version 4.0, where many S3 bucket configurations were refactored into separate resources. For instance, settings like
server_side_encryption_configuration
now require the use of theaws_s3_bucket_server_side_encryption_configuration
resource. (hashicorp.com)Omitting this information may lead to confusion or misconfiguration for users working with newer versions of the provider.
The agent claims to fetch the latest documentation but provides information that appears outdated due to the omission of recent changes in the Terraform AWS Provider.
Test case 2
Score: 7/10Search for a popular Terraform module that can be used to set up an AWS VPC with public and private subnets. Provide details about its usage and any additional features it might offer.I've found several popular Terraform modules that can be used to set up an AWS VPC with public and private subnets. Here are the details for the most relevant ones:
1. Dynamic Subnets
- Module ID:
cloudposse/dynamic-subnets/aws/2.4.2
- Description: Terraform module for provisioning public and private subnets in an existing VPC.
- Downloads: 2,934,655
- Source: GitHub Repository
Key Features:
- Allows configuration of public and private subnets.
- Supports NAT Gateways and instances.
- Customizable CIDR blocks for both public and private subnets.
- Tagging options for resources.
Inputs:
vpc_id
: VPC ID where subnets will be created.public_subnets_enabled
: Flag to create public subnets.private_subnets_enabled
: Flag to create private subnets.nat_gateway_enabled
: Flag to create NAT Gateways.
Outputs:
- Returns subnet IDs, CIDR blocks, and NAT Gateway IDs among other details.
2. VPC Module
- Module ID:
JamesWoolfenden/vpc/aws/0.1.46
- Description: Creates a VPC and public/private subnets for a classic AWS VPC setup.
- Downloads: 11,933
- Source: GitHub Repository
Key Features:
- Simple setup for creating a VPC with public and private subnets.
Inputs:
cidr
: CIDR range for the VPC.zone
: List of Availability Zone names.subnets
: Number of subnets required.
Outputs:
- Returns VPC ID, private and public subnet IDs, and their CIDR ranges.
3. VPC Public Private
- Module ID:
yurymkomarov/vpc-public-private/aws/1.0.5
- Description: AWS VPC with public and private subnets (NAT).
- Downloads: 6,132
- Source: GitHub Repository
Key Features:
- Customizable NAT Gateway creation.
- Flow log support for monitoring.
Inputs:
cidr_block
: CIDR block for the VPC.create_nat_gateway
: Option to create NAT Gateway.all_availability_zones
: Use all AZs or limit to a certain number.
Outputs:
- Returns VPC and NAT Gateway IDs, along with subnet details.
4. Smart VPC
- Module ID:
StayWell/smart-vpc/aws/0.3.1
- Description: Creates a VPC with public and private subnets in each availability zone in the region.
- Downloads: 6,056
- Source: GitHub Repository
Key Features:
- Automatically creates subnets in each AZ.
- Customizable CIDR starting IP.
Inputs:
cidr_starting_ip
: Starting IP for the VPC CIDR.az_limit
: Option to limit the number of AZs.tags
: Additional resource tags.
Outputs:
- Returns a list of subnet IDs, route table IDs, and VPC ID.
These modules offer a variety of features and customization options depending on your specific needs and preferences. If you have any further questions or need more information about a specific module, feel free to ask!
The answer accurately identifies and describes several Terraform modules suitable for setting up an AWS VPC with public and private subnets.
The provided details, such as module IDs, descriptions, key features, inputs, and outputs, are correct and align with the respective modules' documentation.
The answer is well-structured, presenting each module in a clear and organized manner.
Including download counts and source links adds credibility and allows users to explore the modules further.
The answer omits the widely-used
terraform-aws-vpc
module byterraform-aws-modules
, which is a comprehensive and popular choice for creating AWS VPCs with public and private subnets. This module offers extensive features and flexibility, making it relevant to the user's query. GitHub RepositoryThe agent claims to search for Terraform modules based on the user's query. While it provides several relevant modules, the omission of the
terraform-aws-vpc
module suggests that the search may not have been exhaustive or prioritized the most popular and comprehensive options.
- Module ID:
Test case 3
Score: 8/10Can you resolve the provider documentation ID for the Google Cloud Storage Bucket resource from the Terraform Google provider and provide details on how to set up a basic bucket with versioning enabled?I have successfully resolved the provider documentation ID for the Google Cloud Storage Bucket resource from the Terraform Google provider. The relevant providerDocID is 9279811, which corresponds to the
storage_bucket
resource.Overview of
google_storage_bucket
The
google_storage_bucket
resource is used to create a new bucket in Google Cloud Storage (GCS). Once created, the location of the bucket cannot be changed.Basic Setup for a Storage Bucket with Versioning Enabled
Here's how to set up a basic Google Cloud Storage bucket with versioning enabled:
resource "google_storage_bucket" "my_bucket" { name = "my-unique-bucket-name" # Change this to a unique bucket name location = "US" # Set the location for your bucket versioning { enabled = true # Enable versioning for the bucket } force_destroy = false # Set to true if you want to delete non-empty buckets }
Key Arguments
name
: Required. The unique name of the bucket.location
: Required. The geographical location where the bucket will be created (e.g., "US", "EU").versioning
: Optional. Enables versioning for the bucket when set totrue
.force_destroy
: Optional. If set totrue
, this allows the bucket to be deleted even if it contains objects (be cautious with this setting).
Additional Information
- For more details on the Google Cloud Storage service and its configuration, you can refer to the official documentation.
- Make sure that the project ID is set in the provider block or resource to avoid needing to enable the compute API dynamically.
Feel free to ask if you need more information or assistance with other configurations!
The answer correctly identifies the
google_storage_bucket
resource as the appropriate Terraform resource for creating a Google Cloud Storage bucket.The provided Terraform configuration accurately demonstrates how to create a storage bucket with versioning enabled.
The answer is well-structured, presenting the information in a clear and concise manner.
Key arguments such as
name
,location
,versioning
, andforce_destroy
are explained, aiding user understanding.
The answer does not provide the actual link to the Terraform documentation for the
google_storage_bucket
resource, which would be beneficial for users seeking more detailed information.While the answer mentions the
force_destroy
argument, it could further elaborate on its implications, especially the caution needed when setting it totrue
.The agent claims to resolve provider documentation IDs but does not provide the actual documentation link corresponding to the resolved ID, which would enhance the answer's utility.
Test case 4
Score: 7/10Can you find and provide information on a Terraform module suitable for setting up an Azure Kubernetes Service (AKS) cluster, including its features and any notable configurations that can be customized?I found a suitable Terraform module for setting up an Azure Kubernetes Service (AKS) cluster. Here are the details:
Module Overview
- Module Name: aks-light
- Provider:
claranet
- Module Version:
8.4.2
- Description: This Terraform module simplifies the setup of Azure Kubernetes Service, making it easier to deploy and manage your AKS clusters.
Features and Customizable Configurations
The
aks-light
module includes a variety of inputs that you can customize to meet your needs. Here are some notable configurations:Inputs
- workload_identity_enabled: Enable Azure AD Workload Identity (default:
true
). - sku_tier: Specify the AKS SKU tier (
Free
orStandard
, default:Standard
). - automatic_upgrade_channel: Upgrade channel for the Kubernetes cluster (options:
patch
,rapid
,node-image
,stable
). - maintenance_window_auto_upgrade: Controls the timing of cluster upgrades with detailed settings.
- http_application_routing_enabled: Enable HTTP Application Routing (default:
false
). - node_pools: Define multiple node pools with customized settings such as VM size, OS type, scaling options, and more.
- private_cluster_enabled: Configure AKS as a private cluster (default:
true
). - network_plugin: Choose between
azure
andkubenet
network plugins. - monitor_metrics: Specify Prometheus monitoring options for the cluster.
- azure_policy_enabled: Option to enable Azure Policy add-on (default:
true
).
Outputs
The module provides various outputs upon successful deployment, including:
- public_fqdn: Public Fully Qualified Domain Name of the AKS.
- kube_config: Kubernetes configuration for accessing the cluster.
- resource_node_pools: Outputs related to the AKS node pools.
- apiserver_endpoint: Endpoint for the AKS API server.
Example Usage
You can find example configurations in the module's repository, which demonstrate how to use the module for deploying a public cluster.
Conclusion
The
aks-light
module is a robust choice for deploying Azure Kubernetes Service, offering flexibility in configuration and easy management of resources. If you need further assistance or specific examples, feel free to ask!The answer correctly identifies the
aks-light
module by Claranet as a suitable Terraform module for setting up an Azure Kubernetes Service (AKS) cluster.It accurately describes the module's features and customizable configurations, such as enabling Azure AD Workload Identity, specifying the AKS SKU tier, configuring automatic upgrade channels, and defining multiple node pools.
The answer is well-structured, presenting the module's overview, features, and example usage in a clear and organized manner.
Including a direct link to the module's GitHub repository allows users to access more detailed information and documentation.
The answer does not mention other popular Terraform modules for deploying AKS clusters, such as the
terraform-azurerm-aks
module by Azure. Providing information on alternative modules would offer users a broader perspective and more options to choose from.It lacks a comparative analysis of the
aks-light
module against other modules, which could help users make informed decisions based on their specific requirements.The agent claims to search for Terraform modules based on the user's query. While it provides detailed information on the
aks-light
module, the omission of other relevant modules suggests that the search may not have been exhaustive.
Test case 5
Score: 7/10Can you fetch the latest documentation for the Terraform Azure Virtual Machine resource from the Terraform Azure provider, and provide an example of how to configure a basic virtual machine with a specific size and a Windows operating system?I have retrieved the latest documentation for the Terraform Azure Virtual Machine resource (
azurerm_virtual_machine
). Here's a basic example of how to configure an Azure Virtual Machine with a specific size and a Windows operating system.Example Configuration
variable "prefix" { default = "tfvmex" } resource "azurerm_resource_group" "example" { name = "${var.prefix}-resources" location = "East US" } resource "azurerm_virtual_network" "main" { name = "${var.prefix}-network" address_space = ["10.0.0.0/16"] location = azurerm_resource_group.example.location resource_group_name = azurerm_resource_group.example.name } resource "azurerm_subnet" "internal" { name = "internal" resource_group_name = azurerm_resource_group.example.name virtual_network_name = azurerm_virtual_network.main.name address_prefixes = ["10.0.2.0/24"] } resource "azurerm_network_interface" "main" { name = "${var.prefix}-nic" location = azurerm_resource_group.example.location resource_group_name = azurerm_resource_group.example.name ip_configuration { name = "testconfiguration1" subnet_id = azurerm_subnet.internal.id private_ip_address_allocation = "Dynamic" } } resource "azurerm_windows_virtual_machine" "main" { name = "${var.prefix}-vm" location = azurerm_resource_group.example.location resource_group_name = azurerm_resource_group.example.name network_interface_ids = [azurerm_network_interface.main.id] vm_size = "Standard_DS1_v2" admin_username = "adminuser" admin_password = "Password1234!" storage_image_reference { publisher = "MicrosoftWindowsServer" offer = "WindowsServer" sku = "2019-Datacenter" version = "latest" } storage_os_disk { name = "myosdisk1" caching = "ReadWrite" create_option = "FromImage" managed_disk_type = "Standard_LRS" } tags = { environment = "staging" } }
Explanation
- Resource Group: Creates a resource group where the VM and related resources are housed.
- Virtual Network and Subnet: Creates a virtual network and a subnet for the VM.
- Network Interface: Associates a network interface to the VM, allowing it to communicate within the virtual network.
- Windows Virtual Machine: Configures a Windows VM, specifying the size, admin credentials, image reference, and disk settings. The VM size is set to
Standard_DS1_v2
, which is a general-purpose size suitable for many workloads.
This example can be modified based on your specific requirements, such as the VM size, image versions, and network configurations. If you need further adjustments or have any questions, feel free to ask!
The answer correctly identifies the
azurerm_windows_virtual_machine
resource as the appropriate Terraform resource for creating an Azure Virtual Machine with a Windows operating system.The provided Terraform configuration accurately demonstrates how to set up a basic Windows VM with a specific size (
Standard_DS1_v2
) and includes essential components such as resource group, virtual network, subnet, network interface, and the virtual machine itself.The answer is well-structured, presenting each resource in a logical sequence, which aids in understanding the dependencies and relationships between resources.
Comments within the code provide clear explanations of each section, enhancing readability and comprehension.
The answer does not include a direct link to the latest Terraform documentation for the
azurerm_windows_virtual_machine
resource. Providing this link would allow users to access more detailed information and stay updated with any changes or additional configurations.While the example covers a basic setup, it omits certain best practices and configurations that are often recommended, such as:
Network Security Group (NSG): Implementing an NSG to control inbound and outbound traffic to the VM, enhancing security.
Public IP Address: Associating a public IP address if external access to the VM is required.
OS Disk Configuration: Specifying the
os_disk
block to define properties like caching and storage account type.Tags: Adding tags to resources for better organization and management.
The agent claims to fetch the latest documentation for specific services from Terraform providers. However, the answer does not provide a direct link to the latest documentation for the
azurerm_windows_virtual_machine
resource, which would align with this capability.