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

Pulumi Provider #298

Open
belfhi opened this issue Feb 9, 2024 · 9 comments
Open

Pulumi Provider #298

belfhi opened this issue Feb 9, 2024 · 9 comments

Comments

@belfhi
Copy link
Contributor

belfhi commented Feb 9, 2024

Hello,

we would like to use the terraform provider from pulumi.
They provide a bridge to wrap existing terraform providers with the pulumi API:

https://github.com/pulumi/pulumi-tf-provider-boilerplate

We would appreciate it if there was an official pulumi package for Xen Orchestra.

@sMteX
Copy link

sMteX commented Feb 13, 2024

As an additional info to this issue, there exists a Pulumi provider for XO (albeit it looks unmaintained), but I wasn't able to get it working, there's some issue with missing package versions and/or replacements or whatever https://github.com/aslak11/pulumi-xenorchestra/

Might be a solid starting point though

@ddelnano
Copy link
Collaborator

Hey all, thanks for opening the discussion regarding Pulumi integration. Unfortunately I don't have the bandwidth for pursuing this nor do I have the Pulumi expertise for it.

If the community was interested in creating a new provider or refreshing the one linked above, I'm happy to provide assistance as far as internal XO provider details are concerned.

@belfhi
Copy link
Contributor Author

belfhi commented Feb 28, 2024

Hi @ddelnano,
we started looking into the pulumi provider using the boilerplate repository.
There a multiple issues with the terraform provider:

  • the go module and the github organisation don't match so the import doesn't work. This can be rewritten in go.mod but it should be easily fixable by replacing ddelnano by vatesfr in the go files in this repository.
  • Once that is fixed you should be able to remove the explicit version of client in this repository's root go.mod file (lines 6 & 84). this also causes import errors when trying to build the pulumi provider.
  • Finally, the last issue seems to be the macaddress package. Currently this provider uses your fork of the original package to fix the go module import path version issue. The original macaddress repository also does not contain a License file, which is problematic since this package is released under an MIT license.

@ddelnano
Copy link
Collaborator

@belfhi can't believe the ddelnano -> vatesfr renaming was missed earlier 🤦‍♂️. Thanks for opening up #302. I've run the GitHub actions for you and it seems that there is an issue with the provider documentation generation. Let me know if you need help addressing that.

We will also need the Jenkins build to pass, which unfortunately isn't publicly visible. I'll make sure that gets run and post any test failures on the PR once the GitHub action workflows succeed.

Thanks for mentioning the licensing issue. I've removed that in #304 and will follow up with asking them to add a license in addition to reviewing ivoronin/terraform-provider-macaddress#3. That will be tracked in #303.

@ddelnano
Copy link
Collaborator

ddelnano commented Mar 1, 2024

One other thing to keep in mind once as the initial pulumi integration is workable, is that migrating to the terraform-plugin-framework will need to start happening for the XO provider. It seems that pulumi supports the terraform-plugin-sdk and the terraform-plugin-framework.

I mention this because it will be important to understand how pulumi can work with a mixed provider (meaning part of the resources and data sources served by the terraform-plugin-sdk and part by the terraform-plugin-framework). While I haven't started on that framework migration, there are many resources and data sources that are low hanging fruit and could be migrated quickly.

@belfhi
Copy link
Contributor Author

belfhi commented Mar 14, 2024

So since the original pulumi provider has not been updated in 2 years and can be considered orphaned we used the pulumi boilerplate repository to set up the provider ourselves in a new repository.
The basic integration of the terraform-provider-xenorchestra seems to be working that the code compiles into a pulumi provider binary. We would like to keep working on this provider and improve it make pulumi a viable alternative to terraform.
We do want this project to become a repository in the vates github organisation.
Also, the provider should be published on pypi by vates.
What do you think @olivierlambert @ddelnano ?

@olivierlambert
Copy link
Member

@belfhi if you want to become a maintainer for it, it's OK to me. We just want to make sure it will be maintained, otherwise I'm very happy to welcome contributors in the Vates GH org 👍

Can you list exactly what do you need? So we create whatever repo/org at our name and add you where needed too. Adding @julien-f in the convo.

@belfhi
Copy link
Contributor Author

belfhi commented Mar 14, 2024

Hi, yes a repo vatesfr/pulumi-xenorchestra would with maintainer rights would be great.
We would then have to think about how this could be published to pypi, where there already is a package called pulumi-xenorchestra from the previous orphaned repository.

@olivierlambert
Copy link
Member

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants