Skip to content

Conversation

@tracisiebel
Copy link

@tracisiebel tracisiebel commented Nov 14, 2025

Summary

Adds support for LaunchDarkly AI Configs to the Terraform provider, including both resource and data source implementations. This required upgrading the API client from v17.1.0 to v17.2.0, which introduced breaking changes that affected existing code.

⚠️ Important Notes:

  • No acceptance tests were added for AI configs - manual testing required
  • AI Configs are currently in beta in the LaunchDarkly API
  • Go version upgraded from 1.22.9 to 1.23.5

Changes

New Resources

  • launchdarkly_ai_config resource with full CRUD operations
  • launchdarkly_ai_config data source
  • Auto-generated documentation for both

API Client Upgrade (v17.1.0 → v17.2.0)

Fixed breaking changes:

  • Environments field changed from map to *map (pointer)
  • IsActive field removed from MetricPost struct

Files Modified

  • launchdarkly/resource_launchdarkly_ai_config.go (new): AI config resource implementation
  • launchdarkly/data_source_launchdarkly_ai_config.go (new): AI config data source
  • launchdarkly/feature_flag_environment_helper.go: Fixed Environments pointer dereference
  • launchdarkly/resource_launchdarkly_metric.go: Removed IsActive field usage
  • launchdarkly/data_source_launchdarkly_feature_flag_environment_test.go: Fixed test for Environments pointer
  • launchdarkly/resource_launchdarkly_feature_flag_environment_test.go: Fixed test for Environments pointer
  • launchdarkly/integration_configs_generated.go: Updated with full integration list from main branch

Human Review Checklist

Critical - No Tests:

  • Manually verify AI config resource creation, read, update, and delete operations
  • Test AI config data source retrieval
  • Verify import functionality works correctly
  • Test maintainer field handling (both member ID and team key)

API Client Upgrade:

  • Verify all Environments field accesses handle the pointer correctly
  • Confirm IsActive field removal doesn't break metric functionality
  • Check if other resources are affected by v17.2.0 changes

AI Configs Specific:

  • Verify if LD-API-Version: beta header is required for AI configs API calls (currently not set)
  • Test maintainer union type handling (MaintainerMember vs AiConfigsMaintainerTeam)
  • Confirm tags, description, and version fields work as expected

Other:

  • Verify Go 1.23.5 upgrade is acceptable and doesn't cause issues
  • Confirm integration_configs_generated.go changes don't break audit log subscriptions or flag triggers

Devin Session: https://app.devin.ai/sessions/4ce205546ce54b55a0c511fed243dc6d
Requested by: @tracisiebel

devin-ai-integration bot and others added 2 commits November 14, 2025 22:58
- Upgrade from v17.1.0 to v17.2.0
- Fix Environments field access (now pointer to map)
- Remove IsActive field from MetricPost (removed in v17.2.0)
- Update generated integration configs and docs

Co-Authored-By: [email protected] <[email protected]>
- Add resource_launchdarkly_ai_config for managing AI configs
- Add data_source_launchdarkly_ai_config for querying AI configs
- Register resources in provider.go
- Support for name, description, tags, maintainer_id, and maintainer_team_key fields
- AI Configs are currently in beta

Co-Authored-By: [email protected] <[email protected]>
@tracisiebel tracisiebel requested review from a team as code owners November 14, 2025 23:04
@devin-ai-integration
Copy link

🤖 Devin AI Engineer

I'll be helping with this pull request! Here's what you should know:

✅ I will automatically:

  • Address comments on this PR. Add '(aside)' to your comment to have me ignore it.
  • Look at CI failures and help fix them

Note: I can only respond to comments from users who have write access to this repository.

⚙️ Control Options:

  • Disable automatic comment and CI monitoring

The API client v17.2.0 changed the Environments field from a map to a pointer to a map. This commit fixes the test files that were directly accessing flag.Environments to properly dereference the pointer.

Co-Authored-By: [email protected] <[email protected]>
@devin-ai-integration devin-ai-integration bot changed the title Add AI configs support to terraform provider feat: add AI configs support to terraform provider Nov 14, 2025
devin-ai-integration bot and others added 2 commits November 14, 2025 23:15
This file needs to be populated with all integration configurations from the
LaunchDarkly manifests API. Copied from main branch since local tokens don't
have the necessary permissions to fetch the full manifest data.

Co-Authored-By: [email protected] <[email protected]>
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.

2 participants