terraform-mcp-server

terraform-mcp-server

4.5

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.

Evaluation
Total Score: 7/10

Evaluation Summary

  • Strengths:
    1. 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.
    1. 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:
    1. 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.
    1. 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/10
    Can 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 to true, 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: Default 20m
    • read: Default 20m
    • update: Default 20m
    • delete: Default 60m

    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!

  • Test case 2
    Score: 7/10
    Search 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!

  • Test case 3
    Score: 8/10
    Can 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 to true.
    • force_destroy: Optional. If set to true, 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!

  • Test case 4
    Score: 7/10
    Can 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 or Standard, 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 and kubenet 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!

  • Test case 5
    Score: 7/10
    Can 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!