Skip to content

Conversation

Copy link

Copilot AI commented Aug 7, 2025

This PR implements comprehensive support for managing Contentful taxonomy concepts through Terraform, addressing the feature request for taxonomy support in the provider.

Overview

Contentful taxonomies allow users to create hierarchical classification systems for organizing and categorizing content. This implementation adds a new contentful_taxonomy_concept resource that provides full CRUD operations for managing taxonomy concepts with support for:

  • Multi-locale content: All text fields support multiple locales (preferred labels, alternative labels, definitions, notes)
  • Hierarchical relationships: Support for broader, narrower, and related concept relationships
  • Metadata management: Notation codes and concept scheme references
  • Standard Terraform operations: Create, read, update, delete, and import functionality

Example Usage

resource "contentful_taxonomy_concept" "technology" {
  space_id         = "your-space-id"
  environment      = "master"
  concept_scheme_id = "your-scheme-id"
  
  pref_label = {
    en = "Technology"
    de = "Technologie"
  }
  
  alt_label = {
    en = ["Tech", "Technical"]
  }
  
  definition = {
    en = "The application of scientific knowledge for practical purposes"
  }
  
  notations = ["TECH", "T001"]
  broader = ["broader-concept-id"]
  narrower = ["specific-tech-concept-id"]
}

Implementation Details

  • OpenAPI Specification: Added complete taxonomy concept endpoints following Contentful's API patterns
  • SDK Generation: Regenerated client SDK with all necessary types and operations
  • Resource Implementation: Full Terraform resource with proper schema validation and error handling
  • Import Support: Resources can be imported using format space_id:environment:concept_id
  • Testing: Comprehensive acceptance tests covering all operations
  • Documentation: Updated README and added example configurations

The implementation follows established patterns in the codebase and integrates seamlessly with the existing provider infrastructure.

Fixes #100.


💡 You can make Copilot smarter by setting up custom instructions, customizing its development environment and configuring Model Context Protocol (MCP) servers. Learn more Copilot coding agent tips in the docs.

Copilot AI changed the title [WIP] New Resource : taxonomies support Add support for Contentful taxonomy concepts resource Aug 7, 2025
Copilot AI requested a review from mvantellingen August 7, 2025 07:52
Copilot finished work on behalf of mvantellingen August 7, 2025 07:52
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

New Resource : taxonomies support

2 participants