-
Notifications
You must be signed in to change notification settings - Fork 208
chore: Adds provider_meta schema #3619
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
chore: Adds provider_meta schema #3619
Conversation
There was a problem hiding this 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 metadata schema configuration to support module tracking and user agent customization in the MongoDB Atlas Terraform provider. The changes enable the provider to collect optional metadata about modules using it and allow for custom user agent headers.
- Adds provider meta schema definitions for both SDK v2 and Framework providers
- Defines constants for module name, version, and user agent metadata fields
- Implements MetaSchema method for the Framework provider
Reviewed Changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated 1 comment.
File | Description |
---|---|
internal/provider/provider_sdk2.go | Adds ProviderMetaSchema configuration with optional fields for module tracking and user agent |
internal/provider/provider.go | Defines metadata constants and implements MetaSchema method for Framework provider |
Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.
Attributes: map[string]metaschema.Attribute{ | ||
ProviderMetaModuleName: metaschema.StringAttribute{ | ||
Description: ProviderMetaModuleNameDesc, | ||
Optional: true, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
don't we want to have this required if provider_meta is used? similar for version
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't think so.
Not guaranteed the provider_meta will always be used inside modules in the future
Description
Adds provider_meta schema
Link to any related issue(s): CLOUDP-340210
See related full implementation here: #3618
Type of change:
Required Checklist:
Further comments