refactor: migrate external_wiki to framework

Relates to issue #6712 (closed)

Changes

This MR completes the migration of gitlab_integration_external_wiki resource from Terraform SDK to Terraform Plugin Framework.

New Framework Implementation

Created Files:

  • internal/provider/resource_gitlab_project_integration_external_wiki.go - Framework-based resource implementation
  • internal/provider/resource_gitlab_project_integration_external_wiki_test.go - Comprehensive test suite

Removed Files:

  • internal/provider/sdk/resource_gitlab_project_integration_external_wiki.go - Legacy SDK implementation
  • internal/provider/sdk/resource_gitlab_project_integration_external_wiki_test.go - Legacy SDK tests

Key Features

Dual Resource Names:

  • gitlab_project_integration_external_wiki (new, recommended)
  • gitlab_integration_external_wiki (deprecated, will be removed in v19.0)

Resource Attributes:

  • id (Computed): Project ID
  • project (Required, ForceNew): Project ID or path
  • external_wiki_url (Required): External wiki URL with HTTP/HTTPS validation
  • title (Computed): Integration title
  • created_at (Computed): ISO8601 timestamp
  • updated_at (Computed): ISO8601 timestamp
  • slug (Computed): URL-safe integration name
  • active (Computed): Integration status

Test Coverage:

  • Basic CRUD operations with import verification
  • Deprecated resource name compatibility test
  • Migration test from SDK (v18.8.1) to Framework
  • Destroy verification

Implementation Details

  • All CRUD operations follow Framework patterns
  • Proper error handling with 404 detection
  • Import functionality via ImportStatePassthroughID
  • Helper method modelToStateModel() for API response mapping
  • Deprecation message for old resource name

API Methods Used

  • client.Services.SetExternalWikiService() - Create/Update
  • client.Services.GetExternalWikiService() - Read
  • client.Services.DeleteExternalWikiService() - Delete
Edited by Duo Developer

Merge request reports

Loading