terraform-provider-lxd icon indicating copy to clipboard operation
terraform-provider-lxd copied to clipboard

WIP: Add lxd_project resource type

Open c10l opened this issue 3 years ago • 10 comments

This is preliminary work to support https://github.com/terraform-lxd/terraform-provider-lxd/issues/235

Progress:

  • [x] working POC for lxd_project resource
  • [x] tests
  • [x] default project as a provider config
  • [ ] project attribute in other resources
    • [x] lxd_cached_image
    • [x] lxd_container
    • [ ] lxd_container_file
    • [ ] lxd_network
    • [ ] lxd_profile
    • [x] lxd_publish_image
    • [ ] lxd_snapshot
    • [ ] lxd_storage_pool
    • [ ] lxd_volume
  • [ ] import lxd_project resource
  • [ ] docs

c10l avatar Aug 13 '21 02:08 c10l

@jtopjian Would you mind checking out the code that's currently in, and perhaps approving running the workflow so we can give the tests a whirl? Thanks!

c10l avatar Sep 29 '21 19:09 c10l

@c10l If you want to open a small PR that makes a minor change (for example: README, documentation), I can merge that which will then have the tests run automatically for you.

Would you mind checking out the code

I can take a look in the next day or so.

jtopjian avatar Sep 29 '21 19:09 jtopjian

open a small PR that makes a minor change

Hope this is fine: https://github.com/terraform-lxd/terraform-provider-lxd/pull/239 If not, let me know and I'll whip something else up.

I can take a look in the next day or so.

That's cool, thanks a lot.

Now to understand why the tests aren't passing. :)

c10l avatar Sep 30 '21 00:09 c10l

@c10l You should be good to go with having the tests automatically run. As for why they're failing - could be a number of reasons not related to this PR. There hasn't been a PR in this repo for a while, so it's been a while since tests have been run. Let me know if you get stuck and I'll find some time to take a look.

jtopjian avatar Sep 30 '21 02:09 jtopjian

Thanks for your review. I have hopefully addressed all your points. Tests are still failing. I think have finally managed to run them locally so I'll be digging into them to try to work out what's wrong.

c10l avatar Oct 06 '21 22:10 c10l

Tests are still failing. I think have finally managed to run them locally so I'll be digging into them to try to work out what's wrong.

I'll be looking into this shortly, too, since it's affecting another PR.

jtopjian avatar Oct 07 '21 03:10 jtopjian

@c10l #241 fixed the test failure. If you rebase and re-test, any new errors will be from this PR, so that'll help narrow down issues.

jtopjian avatar Oct 07 '21 04:10 jtopjian

@c10l Is there any plan to finish this? Looking forward to get this merged!

Thank you!

lblasc avatar Jul 16 '22 07:07 lblasc

Soliciting reviews of this TF provider; project support isn't a dealbreakfer for me. Opinions welcome https://discuss.linuxcontainers.org/t/opinions-on-the-lxd-terraform-provider/14964?u=dontlaugh

dontlaugh avatar Aug 27 '22 19:08 dontlaugh

@lblasc sorry, I never got the test suite to work properly and eventually other commitments took precedence over this. I'm happy for anyone to take over it if they're interested.

c10l avatar Aug 27 '22 22:08 c10l

I'm taking this forward. Locally I already have some things working. @c10l your setup still needed a couple of fixes, also for the one that you claim are working. @jtopjian should I open a new pull request since I have my own fork of the main repository?

Here's the link to my fork: https://github.com/dorkamotorka/terraform-provider-lxd

project configuration parameter should work with every other resource (there is just a slight "issue" with lxd_network. Look here for update on the issue: #278)

dorkamotorka avatar Dec 13 '22 13:12 dorkamotorka

@jtopjian should I open a new pull request since I have my own fork of the main repository?

Sure. I think if you're able to retain the commits from this PR so @c10l's work stays intact (even if it's later modified), then having a separate PR would be fine.

jtopjian avatar Dec 14 '22 17:12 jtopjian

Opened a new PR here #279

dorkamotorka avatar Dec 14 '22 18:12 dorkamotorka

Feel free to close this one as well.

@dorkamotorka if you need any help or clarifications on my code give a shout. It's been a while since I touched this but I'll do my best to help.

c10l avatar Dec 14 '22 18:12 c10l

This was done in #279.

dorkamotorka avatar Dec 20 '22 08:12 dorkamotorka

@c10l @dorkamotorka thank you both for your work on this.

jtopjian avatar Dec 20 '22 19:12 jtopjian