-
Notifications
You must be signed in to change notification settings - Fork 178
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
INTMDB-128: Modified design when you can get .id from various resources #471
Conversation
…cit depedency with id from various resources instead of another id like container_id
Okay adding the explanation here. |
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.
Hi @coderGo93 awesome work, just one request could we create a terratest for all the modified resources, just for the sake of sanity.
And in addition to this could we add a datasource for project , and re-use the id of that datasource in the other resources.
ImportState: true, | ||
ImportStateVerify: true, | ||
ResourceName: resourceName, | ||
ImportStateIdFunc: testAccCheckMongoDBAtlasPrivateLinkEndpointServiceImportStateIDFunc(resourceName), |
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 have a question, is it necessary to use so long func names?
I mean, in this method you are in mongodbatlas_privatelink_endpoint...
method, maybe the name for this func can be testAccCheckServiceImportStateIDFunc
having names like this can affect the readability and the maintainability
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.
As long it doesn't cross the limit of the line-length from golangci.yml it should be fine, mm it seems readable for me since it's usually testAccCheckMongoDBAtlas[Resource/datasource][Extra(like ImportState, destroy, etc] something like that, but it somehow it crosses the limit, yes it would be nice to shorten it and still readable for the resource it belongs to
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!
(I just left one question, but is not so important)
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!
Done, thank you for the suggestion @leofigy |
container_id
from various resourceDescription
Please include a summary of the fix/feature/change, including any relevant motivation and context.
Link to any related issue(s):
Type of change:
Required Checklist:
Further comments
#320