-
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 ability to import existing VPC peering networks #4291
Add ability to import existing VPC peering networks #4291
Conversation
Hey @austenLacy Are you able to get the test to work? I'm not, and I think it has to do with the importer setting the id as |
@slevenick it seems to be passing for me, but I could definitely be doing something wrong. from VS code "run test" click
using
|
I believe you are only running the unit tests, not the acceptance tests. Instructions are found here: https://github.com/terraform-providers/terraform-provider-google/blob/master/.github/CONTRIBUTING.md#tests I believe you want to run This actually creates the infrastructure and tests the import against it |
@slevenick That makes sense now. My fault. However, I can't seem to get past a go modules error. Grr
I've tried all of the |
Possibly upgrading to 1.13 would help? (Assuming you are on a lower version) micro/go-micro#748 Also check that |
I'm on 1.13.1, but I'll keep digging. Sorry for the complications. Thanks for your help so far |
} | ||
|
||
// Replace import id for the resource id | ||
id, err := replaceVars(d, config, "{{name}}") |
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.
randomly pass by, (also looking for this feature), it appears to me the format of id
for google_compute_network_peering
is network/name
from my other self-managed resources.
I tried to checkout to this branch and was able to import my resource google_compute_network_peering
, but the generated id
seems only contains name
.
Dunno if that matters, but wanna bring it up to discuss. Thanks in advance.
This feature will be available via GoogleCloudPlatform/magic-modules#2751 Closing this |
I'm going to lock this issue because it has been closed for 30 days ⏳. This helps our maintainers find and focus on the active issues. If you feel this issue should be reopened, we encourage creating a new issue linking back to this one for added context. If you feel I made an error 🤖 🙉 , please reach out to my human friends 👉 [email protected]. Thanks! |
This PR implements the
schema.ResourceImporter
for thegoogle_compute_network_peering
resource. It also adds a minimal test step for importing per the testing guidelines and updates the documentation with an example of how to import.