cloudstack-terraform-provider
cloudstack-terraform-provider copied to clipboard
Update SDKs
Update of SDKs and Go version:
- Go v1.21
- Terraform SDK from v1 to v2
- Cloudstack SDK from
v2.13.2tov2.16.0
The acceptance tests are still failing but the provider is compiling without any problem. All the necessary adjustments were made to make it work with the new terraform SDK.
resolves https://github.com/apache/cloudstack-terraform-provider/issues/66
If there is going to be SDK updates, why not just go to the Terraform Plugin Framework instead?
Rekicking build check
If there is going to be SDK updates, why not just go to the Terraform Plugin Framework instead?
I believe when these changes were created Hashcorp was still recommending SDKv2.
If there is going to be SDK updates, why not just go to the Terraform Plugin Framework instead?
I believe when these changes were created Hashcorp was still recommending SDKv2.
Yes, that was my understanding. I was just wondering if it's worth still merging this, or move to the Terraform Plugin Framework instead. I figured if there was going to be effort to merge in a "refactor", might as well be the latest method, don't you think?
I also think that something like this ( refactor ) would make more sense to be the v0.5.0, but for now it would be nice to get a v0.4.x out with the latest updates that are already commited.
Indeed, I haven't seen the Terraform Plugin Framework at the time I did it. If you think it is better to go straight to it, then I can close this one @CodeBleu @poddm as I'm not sure I'll have time to work on it.
@CodeBleu I was looking into migrating directly to the terraform plugin framework and it will require a huge effort for that. It will be not as simple as migrating from v1 to v2. So my proposal is to continue the migration to sdkv2 to, at least, have a more recent version of the SDK, then start working on the migration to the plugin framework.
I've already implemented some new things in my contribution, like muxing the provider and the terraform plugin testing in tests, so then it will be easier to migrate to the plugin framework.
@vishesh92 @rohityadavcloud I've added another matrix to the acceptance test so multiple versions of terraform can be tested.
@CodeBleu I was looking into migrating directly to the terraform plugin framework and it will require a huge effort for that. It will be not as simple as migrating from v1 to v2. So my proposal is to continue the migration to sdkv2 to, at least, have a more recent version of the SDK, then start working on the migration to the plugin framework.
I've already implemented some new things in my contribution, like muxing the provider and the terraform plugin testing in tests, so then it will be easier to migrate to the plugin framework.
@fabiomatavelli TF Plugin be a v0.7.0 milestone?
@fabiomatavelli TF Plugin be a v0.7.0 milestone?
@CodeBleu could be, but I'll let @rohityadavcloud decide on that. Also with muxing the migration can be partial, doing few resources/datasources on each release.
@fabiomatavelli can you resolve the conflicts, thanks. I've approved the Github actions to start running tests, thanks for the PR.
Done @rohityadavcloud
Thanks @fabiomatavelli tests kicked, let's see what Github actions do.
@rohityadavcloud I've added the OpenTofu acceptance test CI also as suggested by @CodeBleu . If you can allow the actions again so we can check the run 🙏
Looks like the opentofu/setup-opentofu@v1 action is not allowed. Is it possible to allow it @rohityadavcloud ?
@fabiomatavelli the ASF infra doesn't allow any actions to be used, if it's not running, likely it's not allow. Can you send me (list of?) all the GitHub Actions you want to use, I can request ASF infra to add/allow them for use in apache/cloudstack* repos.
@rohityadavcloud those are the ones that we are using in the acceptance test CI:
actions/setup-go@v5hashicorp/setup-terraform@v3opentofu/setup-opentofu@v1
From the error message that we got, looks like the only one not allowed was the setup-opentofu, as you can see here.
@fabiomatavelli done I've raised the ticket here - https://issues.apache.org/jira/browse/INFRA-25753
@fabiomatavelli the infra team has enabled the action, I’ve closed and reopened the PR to try again.
@rohityadavcloud thanks, it's working now
@poddm @fabiomatavelli @rohityadavcloud What are we waiting on to get this updated? I was looking into testing some other stuff and noticed the version of the cloudstack-go version is really old in the terraform provider (2.13.2) and was trying to get that resolved locally for testing things and then remembered this was out here.
@poddm @fabiomatavelli @rohityadavcloud What are we waiting on to get this updated? I was looking into testing some other stuff and noticed the version of the cloudstack-go version is really old in the terraform provider (2.13.2) and was trying to get that resolved locally for testing things and then remembered this was out here.
I approved it awhile back. All of my open PRs are dependent on updating the cloudstack-go SDK.
@poddm @rohityadavcloud what is the next step then? Can we merge it? It's all good to be merged so we can continue working on other PRs
@fabiomatavelli @poddm I am running a little busy these days. Let me review this PR by next week.
@fabiomatavelli I have reviewed the PR. Changes looks good. I have left comments where I have some questions about the changes. Apart from this, there are sinor code style issues related to indentation at some places which is due to tabs and spaces.
@vishesh92 issues fixed
@vishesh92 can you merge this now? I feel like it should be a simple pressing of the merge button at this point, no? 😉

