Skip to content

Conversation

@EspenAlbert
Copy link
Collaborator

@EspenAlbert EspenAlbert commented Aug 25, 2025

Description

Adds provider_meta support to the provider
Follow up PR for data sources

Link to any related issue(s): CLOUDP-340210

Example usage

Terraform code main.tf

terraform {
  required_version = ">=1.11"
  required_providers {
    mongodbatlas = {
      source  = "mongodb/mongodbatlas"
      version = "~>1.39"
    }
  }
  provider_meta "mongodbatlas" {
    module_name = "root-module" # variables may not be used here. Can always be sent.
  }
}

provider "mongodbatlas" {}

variable "org_id" {
  type    = string
  default = "65def6ce0f722a1507105aa5"
}

resource "mongodbatlas_project" "this" {
  org_id = var.org_id
  name   = "analytics_test"
}

module "project_module" {
  source = "./modules/project"
  org_id = var.org_id
}


resource "mongodbatlas_custom_db_role" "create_role" {
  project_id = mongodbatlas_project.this.id
  role_name  = "my_custom_role"

  actions {
    action = "UPDATE"
    resources {
      database_name = "myDb"
    }
  }
}

Terraform code modules/project/main.tf

terraform {
  required_version = ">=1.11"
  required_providers {
    mongodbatlas = {
      source  = "mongodb/mongodbatlas"
      version = "~>1.39"
    }
  }
  provider_meta "mongodbatlas" {
    # script_location = "my-internal-module"
    module_name = "cluster-lz"
    module_version = "0.1.1"
  }
}

variable "org_id" {
  type = string
}

resource "mongodbatlas_project" "this" {
  org_id = var.org_id
  name   = "analytics_test_in_module"
}

Logs example terraform plan (see Name/project and Name/custom_db_role)

2025-08-26T10:35:34.483+0100 [DEBUG] provider.terraform-provider-mongodbatlas: User-Agent: terraform-provider-mongodbatlas/1.40.0-13-gb4a633345 Terraform/1.11.0-alpha20250107 AdvancedClusterPreview/true ModuleName/root-module Name/project Operation/read
2025-08-26T10:35:34.483+0100 [DEBUG] provider.terraform-provider-mongodbatlas: User-Agent: terraform-provider-mongodbatlas/1.40.0-13-gb4a633345 Terraform/1.11.0-alpha20250107 AdvancedClusterPreview/true ModuleName/cluster-lz ModuleVersion/0.1.1 Name/project Operation/read
2025-08-26T10:35:35.491+0100 [DEBUG] provider.terraform-provider-mongodbatlas: User-Agent: terraform-provider-mongodbatlas/1.40.0-13-gb4a633345 Terraform/1.11.0-alpha20250107 AdvancedClusterPreview/true ModuleName/root-module Name/project Operation/read
2025-08-26T10:35:35.581+0100 [DEBUG] provider.terraform-provider-mongodbatlas: User-Agent: terraform-provider-mongodbatlas/1.40.0-13-gb4a633345 Terraform/1.11.0-alpha20250107 AdvancedClusterPreview/true ModuleName/cluster-lz ModuleVersion/0.1.1 Name/project Operation/read
2025-08-26T10:35:35.840+0100 [DEBUG] provider.terraform-provider-mongodbatlas: User-Agent: terraform-provider-mongodbatlas/1.40.0-13-gb4a633345 Terraform/1.11.0-alpha20250107 AdvancedClusterPreview/true ModuleName/root-module Name/project Operation/read
2025-08-26T10:35:35.919+0100 [DEBUG] provider.terraform-provider-mongodbatlas: User-Agent: terraform-provider-mongodbatlas/1.40.0-13-gb4a633345 Terraform/1.11.0-alpha20250107 AdvancedClusterPreview/true ModuleName/cluster-lz ModuleVersion/0.1.1 Name/project Operation/read
2025-08-26T10:35:36.341+0100 [DEBUG] provider.terraform-provider-mongodbatlas: User-Agent: terraform-provider-mongodbatlas/1.40.0-13-gb4a633345 Terraform/1.11.0-alpha20250107 AdvancedClusterPreview/true ModuleName/root-module Name/project Operation/read
2025-08-26T10:35:36.427+0100 [DEBUG] provider.terraform-provider-mongodbatlas: User-Agent: terraform-provider-mongodbatlas/1.40.0-13-gb4a633345 Terraform/1.11.0-alpha20250107 AdvancedClusterPreview/true ModuleName/cluster-lz ModuleVersion/0.1.1 Name/project Operation/read
2025-08-26T10:35:36.711+0100 [DEBUG] provider.terraform-provider-mongodbatlas: User-Agent: terraform-provider-mongodbatlas/1.40.0-13-gb4a633345 Terraform/1.11.0-alpha20250107 AdvancedClusterPreview/true ModuleName/root-module Name/project Operation/read
2025-08-26T10:35:36.786+0100 [DEBUG] provider.terraform-provider-mongodbatlas: User-Agent: terraform-provider-mongodbatlas/1.40.0-13-gb4a633345 Terraform/1.11.0-alpha20250107 AdvancedClusterPreview/true ModuleName/cluster-lz ModuleVersion/0.1.1 Name/project Operation/read
2025-08-26T10:35:37.073+0100 [DEBUG] provider.terraform-provider-mongodbatlas: User-Agent: terraform-provider-mongodbatlas/1.40.0-13-gb4a633345 Terraform/1.11.0-alpha20250107 AdvancedClusterPreview/true ModuleName/root-module Name/project Operation/read
2025-08-26T10:35:37.143+0100 [DEBUG] provider.terraform-provider-mongodbatlas: User-Agent: terraform-provider-mongodbatlas/1.40.0-13-gb4a633345 Terraform/1.11.0-alpha20250107 AdvancedClusterPreview/true ModuleName/cluster-lz ModuleVersion/0.1.1 Name/project Operation/read
2025-08-26T10:35:37.449+0100 [DEBUG] provider.terraform-provider-mongodbatlas: User-Agent: terraform-provider-mongodbatlas/1.40.0-13-gb4a633345 Terraform/1.11.0-alpha20250107 AdvancedClusterPreview/false ModuleName/root-module Name/custom_db_role Operation/read

Logs example terraform apply

2025-08-26T10:39:40.560+0100 [DEBUG] provider.terraform-provider-mongodbatlas: User-Agent: terraform-provider-mongodbatlas/1.40.0-13-gb4a633345 Terraform/1.11.0-alpha20250107 AdvancedClusterPreview/true ModuleName/root-module Name/project Operation/read
2025-08-26T10:39:40.560+0100 [DEBUG] provider.terraform-provider-mongodbatlas: User-Agent: terraform-provider-mongodbatlas/1.40.0-13-gb4a633345 Terraform/1.11.0-alpha20250107 AdvancedClusterPreview/true ModuleName/cluster-lz ModuleVersion/0.1.1 Name/project Operation/read
2025-08-26T10:39:41.266+0100 [DEBUG] provider.terraform-provider-mongodbatlas: User-Agent: terraform-provider-mongodbatlas/1.40.0-13-gb4a633345 Terraform/1.11.0-alpha20250107 AdvancedClusterPreview/true ModuleName/root-module Name/project Operation/read
2025-08-26T10:39:41.372+0100 [DEBUG] provider.terraform-provider-mongodbatlas: User-Agent: terraform-provider-mongodbatlas/1.40.0-13-gb4a633345 Terraform/1.11.0-alpha20250107 AdvancedClusterPreview/true ModuleName/cluster-lz ModuleVersion/0.1.1 Name/project Operation/read
2025-08-26T10:39:41.659+0100 [DEBUG] provider.terraform-provider-mongodbatlas: User-Agent: terraform-provider-mongodbatlas/1.40.0-13-gb4a633345 Terraform/1.11.0-alpha20250107 AdvancedClusterPreview/true ModuleName/root-module Name/project Operation/read
2025-08-26T10:39:41.717+0100 [DEBUG] provider.terraform-provider-mongodbatlas: User-Agent: terraform-provider-mongodbatlas/1.40.0-13-gb4a633345 Terraform/1.11.0-alpha20250107 AdvancedClusterPreview/true ModuleName/cluster-lz ModuleVersion/0.1.1 Name/project Operation/read
2025-08-26T10:39:42.191+0100 [DEBUG] provider.terraform-provider-mongodbatlas: User-Agent: terraform-provider-mongodbatlas/1.40.0-13-gb4a633345 Terraform/1.11.0-alpha20250107 AdvancedClusterPreview/true ModuleName/root-module Name/project Operation/read
2025-08-26T10:39:42.244+0100 [DEBUG] provider.terraform-provider-mongodbatlas: User-Agent: terraform-provider-mongodbatlas/1.40.0-13-gb4a633345 Terraform/1.11.0-alpha20250107 AdvancedClusterPreview/true ModuleName/cluster-lz ModuleVersion/0.1.1 Name/project Operation/read
2025-08-26T10:39:42.563+0100 [DEBUG] provider.terraform-provider-mongodbatlas: User-Agent: terraform-provider-mongodbatlas/1.40.0-13-gb4a633345 Terraform/1.11.0-alpha20250107 AdvancedClusterPreview/true ModuleName/root-module Name/project Operation/read
2025-08-26T10:39:42.598+0100 [DEBUG] provider.terraform-provider-mongodbatlas: User-Agent: terraform-provider-mongodbatlas/1.40.0-13-gb4a633345 Terraform/1.11.0-alpha20250107 AdvancedClusterPreview/true ModuleName/cluster-lz ModuleVersion/0.1.1 Name/project Operation/read
2025-08-26T10:39:42.911+0100 [DEBUG] provider.terraform-provider-mongodbatlas: User-Agent: terraform-provider-mongodbatlas/1.40.0-13-gb4a633345 Terraform/1.11.0-alpha20250107 AdvancedClusterPreview/true ModuleName/root-module Name/project Operation/read
2025-08-26T10:39:42.954+0100 [DEBUG] provider.terraform-provider-mongodbatlas: User-Agent: terraform-provider-mongodbatlas/1.40.0-13-gb4a633345 Terraform/1.11.0-alpha20250107 AdvancedClusterPreview/true ModuleName/cluster-lz ModuleVersion/0.1.1 Name/project Operation/read
2025-08-26T10:39:43.280+0100 [DEBUG] provider.terraform-provider-mongodbatlas: User-Agent: terraform-provider-mongodbatlas/1.40.0-13-gb4a633345 Terraform/1.11.0-alpha20250107 AdvancedClusterPreview/false ModuleName/root-module Name/custom_db_role Operation/read
2025-08-26T10:39:49.229+0100 [DEBUG] provider.terraform-provider-mongodbatlas: User-Agent: terraform-provider-mongodbatlas/1.40.0-13-gb4a633345 Terraform/1.11.0-alpha20250107 AdvancedClusterPreview/true ModuleName/cluster-lz ModuleVersion/0.1.1 Name/project Operation/update
2025-08-26T10:39:49.229+0100 [DEBUG] provider.terraform-provider-mongodbatlas: User-Agent: terraform-provider-mongodbatlas/1.40.0-13-gb4a633345 Terraform/1.11.0-alpha20250107 AdvancedClusterPreview/true ModuleName/root-module Name/project Operation/update
2025-08-26T10:39:50.409+0100 [DEBUG] provider.terraform-provider-mongodbatlas: User-Agent: terraform-provider-mongodbatlas/1.40.0-13-gb4a633345 Terraform/1.11.0-alpha20250107 AdvancedClusterPreview/true ModuleName/cluster-lz ModuleVersion/0.1.1 Name/project Operation/update
2025-08-26T10:39:50.447+0100 [DEBUG] provider.terraform-provider-mongodbatlas: User-Agent: terraform-provider-mongodbatlas/1.40.0-13-gb4a633345 Terraform/1.11.0-alpha20250107 AdvancedClusterPreview/true ModuleName/root-module Name/project Operation/update
2025-08-26T10:39:50.774+0100 [DEBUG] provider.terraform-provider-mongodbatlas: User-Agent: terraform-provider-mongodbatlas/1.40.0-13-gb4a633345 Terraform/1.11.0-alpha20250107 AdvancedClusterPreview/true ModuleName/cluster-lz ModuleVersion/0.1.1 Name/project Operation/update
2025-08-26T10:39:50.797+0100 [DEBUG] provider.terraform-provider-mongodbatlas: User-Agent: terraform-provider-mongodbatlas/1.40.0-13-gb4a633345 Terraform/1.11.0-alpha20250107 AdvancedClusterPreview/true ModuleName/root-module Name/project Operation/update
2025-08-26T10:39:51.167+0100 [DEBUG] provider.terraform-provider-mongodbatlas: User-Agent: terraform-provider-mongodbatlas/1.40.0-13-gb4a633345 Terraform/1.11.0-alpha20250107 AdvancedClusterPreview/true ModuleName/root-module Name/project Operation/update
2025-08-26T10:39:51.285+0100 [DEBUG] provider.terraform-provider-mongodbatlas: User-Agent: terraform-provider-mongodbatlas/1.40.0-13-gb4a633345 Terraform/1.11.0-alpha20250107 AdvancedClusterPreview/true ModuleName/cluster-lz ModuleVersion/0.1.1 Name/project Operation/update
2025-08-26T10:39:51.545+0100 [DEBUG] provider.terraform-provider-mongodbatlas: User-Agent: terraform-provider-mongodbatlas/1.40.0-13-gb4a633345 Terraform/1.11.0-alpha20250107 AdvancedClusterPreview/true ModuleName/root-module Name/project Operation/update
2025-08-26T10:39:51.654+0100 [DEBUG] provider.terraform-provider-mongodbatlas: User-Agent: terraform-provider-mongodbatlas/1.40.0-13-gb4a633345 Terraform/1.11.0-alpha20250107 AdvancedClusterPreview/true ModuleName/cluster-lz ModuleVersion/0.1.1 Name/project Operation/update
2025-08-26T10:39:51.917+0100 [DEBUG] provider.terraform-provider-mongodbatlas: User-Agent: terraform-provider-mongodbatlas/1.40.0-13-gb4a633345 Terraform/1.11.0-alpha20250107 AdvancedClusterPreview/true ModuleName/root-module Name/project Operation/update
2025-08-26T10:39:52.026+0100 [DEBUG] provider.terraform-provider-mongodbatlas: User-Agent: terraform-provider-mongodbatlas/1.40.0-13-gb4a633345 Terraform/1.11.0-alpha20250107 AdvancedClusterPreview/true ModuleName/cluster-lz ModuleVersion/0.1.1 Name/project Operation/update
2025-08-26T10:39:52.441+0100 [DEBUG] provider.terraform-provider-mongodbatlas: User-Agent: terraform-provider-mongodbatlas/1.40.0-13-gb4a633345 Terraform/1.11.0-alpha20250107 AdvancedClusterPreview/true ModuleName/root-module Name/project Operation/update
2025-08-26T10:39:52.534+0100 [DEBUG] provider.terraform-provider-mongodbatlas: User-Agent: terraform-provider-mongodbatlas/1.40.0-13-gb4a633345 Terraform/1.11.0-alpha20250107 AdvancedClusterPreview/true ModuleName/cluster-lz ModuleVersion/0.1.1 Name/project Operation/update
2025-08-26T10:39:52.805+0100 [DEBUG] provider.terraform-provider-mongodbatlas: User-Agent: terraform-provider-mongodbatlas/1.40.0-13-gb4a633345 Terraform/1.11.0-alpha20250107 AdvancedClusterPreview/true ModuleName/root-module Name/project Operation/update
2025-08-26T10:39:52.889+0100 [DEBUG] provider.terraform-provider-mongodbatlas: User-Agent: terraform-provider-mongodbatlas/1.40.0-13-gb4a633345 Terraform/1.11.0-alpha20250107 AdvancedClusterPreview/true ModuleName/cluster-lz ModuleVersion/0.1.1 Name/project Operation/update
2025-08-26T10:39:53.167+0100 [DEBUG] provider.terraform-provider-mongodbatlas: User-Agent: terraform-provider-mongodbatlas/1.40.0-13-gb4a633345 Terraform/1.11.0-alpha20250107 AdvancedClusterPreview/true ModuleName/root-module Name/project Operation/update
2025-08-26T10:39:53.334+0100 [DEBUG] provider.terraform-provider-mongodbatlas: User-Agent: terraform-provider-mongodbatlas/1.40.0-13-gb4a633345 Terraform/1.11.0-alpha20250107 AdvancedClusterPreview/true ModuleName/cluster-lz ModuleVersion/0.1.1 Name/project Operation/update

Type of change:

  • Bug fix (non-breaking change which fixes an issue). Please, add the "bug" label to the PR.
  • New feature (non-breaking change which adds functionality). Please, add the "enhancement" label to the PR. A migration guide must be created or updated if the new feature will go in a major version.
  • Breaking change (fix or feature that would cause existing functionality to not work as expected). Please, add the "breaking change" label to the PR. A migration guide must be created or updated.
  • This change requires a documentation update
  • Documentation fix/enhancement

Required Checklist:

  • I have signed the MongoDB CLA
  • I have read the contributing guides
  • I have checked that this change does not generate any credentials and that they are NOT accidentally logged anywhere.
  • I have added tests that prove my fix is effective or that my feature works per HashiCorp requirements
  • I have added any necessary documentation (if appropriate)
  • I have run make fmt and formatted my code
  • If changes include deprecations or removals I have added appropriate changelog entries.
  • If changes include removal or addition of 3rd party GitHub actions, I updated our internal document. Reach out to the APIx Integration slack channel to get access to the internal document.

Further comments

@EspenAlbert EspenAlbert mentioned this pull request Aug 27, 2025
13 tasks
@EspenAlbert EspenAlbert marked this pull request as ready for review August 27, 2025 09:29
Copilot AI review requested due to automatic review settings August 27, 2025 09:29
@EspenAlbert EspenAlbert requested a review from a team as a code owner August 27, 2025 09:29
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This PR adds provider_meta support to enable module-level metadata tracking in the MongoDB Atlas Terraform provider. The feature allows terraform configurations to specify module names, versions, and additional User-Agent data that gets included in HTTP requests for analytics purposes.

  • Implements provider_meta schema support for both framework and SDK v2 providers
  • Adds User-Agent enhancement system to capture and transmit module metadata in HTTP headers
  • Creates wrapper resources that inject analytics data into terraform operations

Reviewed Changes

Copilot reviewed 11 out of 11 changed files in this pull request and generated 1 comment.

Show a summary per file
File Description
internal/provider/provider.go Adds MetaSchema method and wraps resources with analytics functionality
internal/provider/provider_sdk2.go Implements ProviderMetaSchema for SDK v2 and wraps resources
internal/config/user_agent.go Core User-Agent metadata handling and context management
internal/config/user_agent_test.go Comprehensive test coverage for User-Agent functionality
internal/config/transport.go HTTP transport wrapper for User-Agent header modification
internal/config/resource_base.go Framework resource wrapper with analytics integration
internal/config/resource_base_sdkv2.go SDK v2 resource wrapper with analytics integration
internal/config/resource_base_test.go Tests ensuring resource interface preservation
internal/config/transport_test.go Minor formatting cleanup
internal/config/client.go Updates HTTP client transport chain configuration
internal/testutil/unit/provider_mock.go Simplifies mock provider by using embedding

Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.

@github-actions
Copy link
Contributor

github-actions bot commented Sep 2, 2025

This PR has gone 7 days without any activity and meets the project’s definition of "stale". This will be auto-closed if there is no new activity over the next 7 days. If the issue is still relevant and active, you can simply comment with a "bump" to keep it open, or add the label "not_stale". Thanks for keeping our repository healthy!

@github-actions github-actions bot added the stale label Sep 2, 2025
@EspenAlbert EspenAlbert added the not_stale Not stale issue or PR label Sep 2, 2025
@lantoli lantoli removed the stale label Sep 5, 2025
@EspenAlbert EspenAlbert marked this pull request as draft November 3, 2025 10:32
@EspenAlbert EspenAlbert marked this pull request as ready for review November 5, 2025 11:22
type RSCommon struct {
ImplementedResource
Client *MongoDBClient
ResourceName string
Copy link
Member

@lantoli lantoli Nov 7, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

if we have now GetName, do we need uppercase ResourceName or could be private and use GetName when needed? similarly for Client, if we add GetClient (apart from SetClient)

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Want to avoid having to change every single resource 😅

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

fair enough, also it can be done later

Comment on lines +42 to +47
func analyticsResource(iResource ImplementedResource) resource.Resource {
return &RSCommon{
ResourceName: iResource.GetName(),
ImplementedResource: iResource,
}
}
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
func analyticsResource(iResource ImplementedResource) resource.Resource {
return &RSCommon{
ResourceName: iResource.GetName(),
ImplementedResource: iResource,
}
}
func analyticsResource(iResource ImplementedResource) resource.Resource {
return iResource
}

Might be missing something but I believe this function is redundant, ImplementedResource already has resource.ResourceWithImportState interface which is a resource.Resource.

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good catch, but the function is actually necessary! While ImplementedResource does implement resource.Resource, we need to wrap it with RSCommon to intercept CRUD operations.

If we returned iResource directly, the analytics tracking wouldn't work - RSCommon is what adds the provider_meta information to the context before calling the underlying resource methods. Without the wrapper:

  • Create/Read/Update/Delete would execute directly on the resource without adding analytics to context
  • The UserAgentTransport would receive empty context and no analytics would be tracked

Added text in d5452ab

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I see. I am mainly confused because all our resource implementations are already defined with RSCommon (example), so we are going from resource implementation which is RSCommon returned as resource.Resource, which then in AnalyticsResourceFunc gets wrapped in RSCommon again.

Copy link
Collaborator Author

@EspenAlbert EspenAlbert Nov 10, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, it is a bit confusing but I don't know a better way.
The alternative would be to pass the CRUD operations to the RSCommon and then have that wrap those methods. But that requires changing every single resource.
This could work a bit safer if new methods are added

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm trying to see how we could change each resource:

func Resource() resource.Resource {
	return &rs{
		RSCommon: config.RSCommon{
			ResourceName: resourceName,
		},
	}
}

But I'm not sure how to do this in a "clean" way.
What I like about the current implementation is that it keeps the existing resources untouched.
So whenever you add a resource you don't need to worry about the analytics part unless you use a new TPF method that hasn't been wrapped.

We are not initializing deprecated fields, for example Update to avoid the message:
resource mongodbatlas_cloud_backup_snapshot: All fields are ForceNew or Computed w/out Optional, Update is superfluous
Ensure no deprecated fields are used by running `staticcheck ./internal/service/... | grep -v 'd.GetOkExists'` and looking for (SA1019)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Would this be something to take in considerations when upgrading terraform-plugin-sdk?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Don't think it is different than the resources we already have.
But it wouldn't hurt to start running the staticcheck command mentioned in the comment to catch usage of deprecated fields but outside the scope of this PR

- Explain why analyticsResource wrapper is necessary for intercepting CRUD ops
- Document complete UserAgentExtra context flow from provider_meta to HTTP transport
Copy link
Member

@AgustinBettati AgustinBettati left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, we can continue conversation in #3618 (comment) in case there is room for reducing complexity but not a blocker

@EspenAlbert EspenAlbert merged commit 8b565e6 into master Nov 10, 2025
50 checks passed
@EspenAlbert EspenAlbert deleted the CLOUDP-340210_provider_meta_modules branch November 10, 2025 11:04
EspenAlbert added a commit that referenced this pull request Nov 10, 2025
Adds provider_meta support to all data sources (TPF and SDKv2) for module usage tracking via User-Agent headers. Follows the same pattern as resources (PR #3618).

- Created datasource_base.go for data source analytics in TPF
- Added SetClient() method pattern matching resources
- Shared asUserAgentExtraFromProviderMeta() between resources and data sources
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

not_stale Not stale issue or PR

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants