-
Notifications
You must be signed in to change notification settings - Fork 1.7k
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
Import doc fix for google_cloudiot_device #9920
Conversation
The full path to the resource including project and location must be specified; otherwise the device lookup fails with a 404 error and the import fails.
Following the docs as-is produces a 404 error:
|
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.
This LGTM; there's a chance this is a bug in the provider; I'll ask during the upstream review.
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.
After looking into this more, the docs are correct. The {{registry}}
field on this resource is expected to contain a full id (including project and location), so they don't need to be specified separately.
I agree this is not entirely clear from the docs, so I'm open to suggestions, but this document is also autogenerated, so there will be limitations as to what kinds of changes we can accept.
@melinath Which sections of the document are not autogenerated, and/or where is the template source? I'm happy to try to put together some useful verbiage; just need to know where to put it. :) |
The template is here: https://github.com/GoogleCloudPlatform/magic-modules/blob/master/mmv1/templates/terraform/resource.html.markdown.erb The resource information is here:
For now I'm going to close this PR, since it sounds like you might look into opening a PR against Magic Modules directly. I'm not sure whether it's going to be possible to improve this without significant changes to mmv1. The other option would be to convert this to a handwritten doc but we probably wouldn't accept that as an option, since handwritten docs are very difficult for us to maintain. |
I'm going to lock this pull request because it has been closed for 30 days ⏳. This helps our maintainers find and focus on the active issues. |
The full path to the resource including project and location must
be specified; otherwise the device lookup fails with a 404 error
and the import fails.