Skip to content
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

Make huaweicloud_compute_instance_v2 importable #301

Merged
merged 3 commits into from
Apr 15, 2020

Conversation

joec4i
Copy link
Contributor

@joec4i joec4i commented Apr 11, 2020

I've ported the importer implementation for huaweicloud_compute_instance_v2 from OpenStack, with a couple minor tweaks for unhandled errors.

This was tested with terraform import without issues:

$ terraform import 'module.test.huaweicloud_compute_instance_v2.instance[0]' xxxxxxxx-xxxxxx-xxxx-xxx-xxxxxx
module.test.huaweicloud_compute_instance_v2.instance[0]: Importing from ID " xxxxxxxx-xxxxxx-xxxx-xxx-xxxxxx"...
module.test.huaweicloud_compute_instance_v2.instance[0]: Import prepared!
  Prepared huaweicloud_compute_instance_v2 for import
module.test.huaweicloud_compute_instance_v2.instance[0]: Refreshing state... [id= xxxxxxxx-xxxxxx-xxxx-xxx-xxxxxx]

Import successful!

The resources that were imported are shown above. These resources are now in
your Terraform state and will henceforth be managed by Terraform.module.test

Note that I haven't run the acceptance tests because I don't have an account suitable for this. Please run the tests for me if you find this PR acceptable.

Cheers!

@ghost ghost added the size/L label Apr 11, 2020
@joec4i joec4i force-pushed the computer_instance_v2_importer branch from 470add5 to 1550675 Compare April 11, 2020 13:29
@niuzhenguo
Copy link
Member

Thanks for the patch!
Please help to update the doc as well :)

@ghost ghost added the documentation label Apr 14, 2020
@joec4i joec4i force-pushed the computer_instance_v2_importer branch from 378dcbd to f0bd037 Compare April 14, 2020 12:14
@joec4i
Copy link
Contributor Author

joec4i commented Apr 14, 2020

Thanks for the patch!
Please help to update the doc as well :)

Thanks @niuzhenguo . I have updated the docs. Please have another look.

@niuzhenguo niuzhenguo merged commit 0c5ed20 into huaweicloud:master Apr 15, 2020
@joec4i joec4i deleted the computer_instance_v2_importer branch April 15, 2020 05:18
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants