-
Notifications
You must be signed in to change notification settings - Fork 9.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 DigitalOcean datasource digitalocean_image #13787
Conversation
Current status: snapshots and droplets are not destroyed :( |
current status: working, ready for review |
Add a new data source for Digital Ocean that finds snapshots by name. Signed-off-by: Julien Pivotto <roidelapluie@inuits.eu>
This LGTM! The acceptance tests pass too :) Nice to see a DO datasource :)
Paul |
Great. Maybe the last test step could be changed by a "Cleanup" attribute at the TestCase level. This is because Terraform is not creating the snapshots in tf code, so I create them in go. |
@stack72 @roidelapluie After looking at the changes, the go files for this change are spelt wrong. Currently datasource_digitaloceal_image.go should be datasource_digitalocean_image.go. Sorry for commenting on a merged PR |
refs hashicorp#13787 Signed-off-by: Julien Pivotto <roidelapluie@inuits.eu>
refs #13787 Signed-off-by: Julien Pivotto <roidelapluie@inuits.eu>
Just noticed this landed. I had attempted something similar in #12873 but got blocked on tests. I didn't realize this approach was an option. The main difference between this and what I implemented is that I used the snapshots endpoint: https://developers.digitalocean.com/documentation/v2/#snapshots The main advantage to that is it also allows for finding volume snapshots. |
Yeah, I ended up doing something that works for me -- This datasource
can be later extended to fetch distributions etc as well.
Maybe we can have a data_digitalocean_snapshot in the future too. What
was the problem with tests? Time?
…--
(o- Julien Pivotto
//\ Open-Source Consultant
V_/_ Inuits - https://www.inuits.eu
|
In retrospect, it was a simple misunderstanding on my part. I thought it would require writing a resource to take snapshots first, which didn't seem particularly useful, as opposed to creating and deleting the resources directly via calls to godo. |
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 have found a problem that seems similar to this, please open a new issue and complete the issue template so we can capture all the details necessary to investigate further. |
Add a new data source for Digital Ocean that finds snapshots by name.
Signed-off-by: Julien Pivotto roidelapluie@inuits.eu
Current status: Test panics.
TODO: