-
Notifications
You must be signed in to change notification settings - Fork 166
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
doc: Adjust documentation of search_deployment resource and data source #1833
Conversation
@@ -9,6 +9,7 @@ import ( | |||
|
|||
func DataSourceSchema(ctx context.Context) schema.Schema { | |||
return schema.Schema{ | |||
MarkdownDescription: "Provides a Search Deployment data source.", |
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 thought at the end we would generate both MarkdowDescription and Description cc @AgustinBettati
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.
Actually, I added this manually, we could also move this to the template instead. Wondering if there is a way to get the resource description from the open api spec instead. CC @AgustinBettati in case you know how to do this
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.
looking at the Hashicorp doc https://developer.hashicorp.com/terraform/plugin/code-generation/openapi-generator#generator-config it does not seem possible. I will open an issue on their repo. In the meantime I will remove this field from the schema and move the description to the template
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.
Created this issue hashicorp/terraform-plugin-codegen-openapi#123
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.
Yes I agree moving to template will be the best option for now
@@ -1,37 +1,77 @@ | |||
--- | |||
layout: "mongodbatlas" | |||
page_title: "MongoDB Atlas: search deployment" | |||
sidebar_current: "docs-mongodbatlas-datasource-search-deployment" | |||
page_title: "MongoDB Atlas: mongodbatlas_search_deployment" |
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.
were these deleted/added headers wrong? should we change them in all resources / ds?
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 double-checked this with Zuhair and he confirmed that this metadata is no longer used by Hashicorp. Hashicorp used this metadata for screen readers which does not seem to be the case anymore.
|
||
* `instance_size` - (Required) Hardware specification for the search node instance sizes. The [MongoDB Atlas API](https://www.mongodb.com/docs/atlas/reference/api-resources-spec/#tag/Atlas-Search/operation/createAtlasSearchDeployment) describes the valid values. More details can also be found in the [Search Node Documentation](https://www.mongodb.com/docs/atlas/cluster-config/multi-cloud-distribution/#search-tier). |
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.
Interesting: are we losing some valuable information by removing this?
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.
If the description is not good enough, we should update the open API spec of the endpoint. In this case, I will open a follow-up PR to add "More details can also be found in the Search Node Documentation" to the endpoint. Thanks!
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.
FYI created this ticket https://jira.mongodb.org/browse/CLOUDP-222701 to update the open api spec
|
||
### Optional | ||
|
||
- `timeouts` (Attributes) (see [below for nested schema](#nestedatt--timeouts)) |
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.
nit: can you just check that we are not losing some relevant information here with the change of timeouts field compared to how it was before?
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.
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.
Some comments after comparing generated documentation using https://registry.terraform.io/tools/doc-preview
|
||
### Specs | ||
* `instance_size` - (Required) Hardware specification for the search node instance sizes. The [MongoDB Atlas API](https://www.mongodb.com/docs/atlas/reference/api-resources-spec/#tag/Atlas-Search/operation/createAtlasSearchDeployment) describes the valid values. More details can also be found in the [Search Node Documentation](https://www.mongodb.com/docs/atlas/cluster-config/multi-cloud-distribution/#search-tier). |
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 would preserve this more detailed description of the instance size attribute as it also references valid values, we can adjust the schema description fields and also include a description override config in the generator_config.yml file.
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 was planning to modify this in the open api spec but this may be better. I will also update our doc to make sure this is documented
`mongodbatlas_search_deployment` provides a Search Deployment resource. The resource lets you create, edit and delete dedicated search nodes in a cluster. | ||
|
||
-> **NOTE:** For details on supported cloud providers and existing limitations you can visit the [Search Node Documentation](https://www.mongodb.com/docs/atlas/cluster-config/multi-cloud-distribution/#search-nodes-for-workload-isolation). | ||
|
||
-> **NOTE:** Only a single search deployment resource can be defined for each cluster. |
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.
Would prefer to not remove this content as it is valuable for the docs. Could we add this in the template, or as part of the description field of the schema?
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.
Could you clarify the content that you want to include in the template? is the NOTE?
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.
Yes the 2 NOTE:
provide valuable info/clarification.
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.
yes, we should add them in the template in this case
|
||
* `project_id` - (Required) Unique 24-hexadecimal digit string that identifies your project. | ||
* `cluster_name` - (Required) Label that identifies the cluster to create search nodes for. |
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 believe we should preserve this description as it makes more sense within the context of a resource.
@AgustinBettati I will open a follow-up PR to address these comments. |
Description
Ticket: https://jira.mongodb.org/browse/CLOUDP-221359
This PR updates the
search_deployment
doc viamake generate-doc
Type of change:
Required Checklist:
Further comments