-
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
Add support to importing a project by projectnumber #6427
Conversation
Do you mind adding a test to resource_google_project_test.go? You can add a test step (or 2) to TestAccProject_create that uses the (Import step format)[https://github.com/GoogleCloudPlatform/magic-modules/blob/4540f9c4260c86d6d7361641097a18255da00228/third_party/terraform/tests/resource_google_project_test.go#L142-L147] - ideally we'd want one with |
// Ensure the id format includes projects/ | ||
d.SetId(fmt.Sprintf("projects/%s", pid)) |
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.
Can you add a comment here and at the top of Read() saying that project ID might be either project ID or number?
Yes -- I will do so |
Hey @spew , we are cleaning up some lingering PR's. Is this something you are still intending to work on? Otherwise we can probably close after a few days. |
Hi, yes, I would like to get this in. |
Signed-off-by: Modular Magician <magic-modules@google.com>
Closing PR as stale |
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. |
Some google services, such as Cloud Asset Inventory, use the ProjectNumber as the ID of the project instead of the project id. This change adds support to importing by Number to the Project resource.