-
Notifications
You must be signed in to change notification settings - Fork 168
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: Generate Flex Cluster data source file and schemas #2725
base: CLOUDP-262066-flex-cluster-dev
Are you sure you want to change the base?
Conversation
"project_id": schema.StringAttribute{ | ||
Required: !isPlural, | ||
Computed: isPlural, |
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.
project_id will be required in both plural and singular data source. List operation endpoint needs project_id
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.
Good catch, fixed!
|
||
func (d *ds) Schema(ctx context.Context, req datasource.SchemaRequest, resp *datasource.SchemaResponse) { | ||
// TODO: Schema and model must be defined in data_source_schema.go. Details on scaffolding this file found in contributing/development-best-practices.md under "Scaffolding Schema and Model Definitions" | ||
resp.Schema = DataSourceSchema(ctx) |
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.
you will need to add conversion.UpdateSchemaDescription(&resp.Schema)
after this line to add the Description field to all attributes like in the resource
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.
Noted! Since this PR is focused on implementing the schemas, I'll exclude this from this PR and include it in the data source implementation ticket 👍
Computed: true, | ||
MarkdownDescription: "Unique 24-hexadecimal digit string that identifies the instance.", | ||
}, | ||
"mongo_dbversion": schema.StringAttribute{ |
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.
"mongo_dbversion": schema.StringAttribute{ | |
"mongo_db_version": schema.StringAttribute{ |
for consistency throughout all resources
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.
Fixed! 👍
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.
LGTM overall!
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.
not blocking but curious to get other inputs
Required: true, | ||
MarkdownDescription: "Unique 24-hexadecimal digit string that identifies your project. Use the [/groups](#tag/Projects/operation/listProjects) endpoint to retrieve all projects to which the authenticated user has access.\n\n**NOTE**: Groups and projects are synonymous terms. Your group id is the same as your project id. For existing groups, your group/project id remains the same. The resource and corresponding endpoints use the term groups.", | ||
}, | ||
"flex_clusters": schema.ListNestedAttribute{ |
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.
"flex_clusters": schema.ListNestedAttribute{ | |
"results": schema.ListNestedAttribute{ |
Would prefer to have consistency with other plural data sources in our provider, flex_clusters
might also be redundant under the context of using mongodbatlas_flex_clusters
data source
Description
Generate Flex Cluster data source file and schemas.
File
data_source.go
has been primarily commented out and will be properly implemented in a following ticket.Link to any related issue(s): CLOUDP-278904
Type of change:
Required Checklist:
Further comments