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

feat: migrate to terraform plugin framework #113

Open
wants to merge 4 commits into
base: main
Choose a base branch
from

Conversation

fabiomatavelli
Copy link
Contributor

This PR will:

  • Create the plugin framework provider
  • Migrate the service offering resource to the plugin framework

@fabiomatavelli
Copy link
Contributor Author

fabiomatavelli commented Apr 20, 2024

@CodeBleu @vishesh92 I started drafting the migration to the terraform plugin framework, base on the #71 , to see the effort to migrate the provider and resources. For that I've migrated the service offering resource. You can see the diff here.

I'm open to feedbacks on it.

@fabiomatavelli fabiomatavelli changed the title feat: update to terraform plugin framework feat: migrate to terraform plugin framework Apr 20, 2024
@fabiomatavelli fabiomatavelli force-pushed the feature/update-to-terraform-plugin-framework branch from da5c878 to 6a17bd9 Compare April 26, 2024 07:43
@CodeBleu
Copy link
Contributor

CodeBleu commented Jun 7, 2024

@fabiomatavelli Just wondering the status of this? Is this dependent on the following being merged?

#71

@fabiomatavelli
Copy link
Contributor Author

This is ready to be merged @CodeBleu , I just don't have the permission to merge it

@CodeBleu
Copy link
Contributor

CodeBleu commented Jun 7, 2024

This is ready to be merged @CodeBleu , I just don't have the permission to merge it

I just still see it in "Draft" mode.

@fabiomatavelli
Copy link
Contributor Author

Ah, sorry @CodeBleu , my bad, this is indeed waiting for #71

kiranchavala
kiranchavala approved these changes Jun 21, 2024
@CodeBleu
Copy link
Contributor

@fabiomatavelli now that #71 is merged (🥳 ), I'm hoping that removing this from Draft mode, will be able to be merged, since @kiranchavala approved it.

@fabiomatavelli fabiomatavelli marked this pull request as ready for review June 21, 2024 13:08
@fabiomatavelli
Copy link
Contributor Author

@CodeBleu I've removed the draft from it, but I think I'll need to rebase it

@fabiomatavelli fabiomatavelli force-pushed the feature/update-to-terraform-plugin-framework branch from 167cf37 to 61ad0bf Compare June 21, 2024 16:10
@fabiomatavelli
Copy link
Contributor Author

@kiranchavala if you can approve the CIs to run again 🙏

@vishesh92
Copy link
Member

@fabiomatavelli I have approved the github actions. Acceptance tests seems to be failing because of the below error:

 === RUN   TestAccServiceOfferingDataSource_basic
    data_source_cloudstack_service_offering_test.go:32: Step 1/1 error: Error running pre-apply plan: exit status 1
        
        Error: Invalid resource type
        
          on terraform_plugin_test.tf line 12, in resource "cloudstack_service_offering" "service-offering-resource":
          12: resource "cloudstack_service_offering" "service-offering-resource" {
        
        The provider hashicorp/cloudstack does not support resource type
        "cloudstack_service_offering".
        
        Did you intend to use the data source "cloudstack_service_offering"? If so,
        declare this using a "data" block instead of a "resource" block.
--- FAIL: TestAccServiceOfferingDataSource_basic (0.14s)

@fabiomatavelli
Copy link
Contributor Author

@vishesh92 @kiranchavala can you please review it again and re-approve the CI to run 🙏

I had to move the V6 (terraform plugin framework) to be tested with a muxed provider instead, as we still need to call resources/datasources in the V5 provider (terraform provider sdk).

@CodeBleu
Copy link
Contributor

@vishesh92 @kiranchavala Is this something that can be merged now? I feel like we were making good progress to get this provider over the hump with the new release of 0.5.0, and am hoping we can keep that momentum going and keep updating this project more frequently. With the #71 being merged and hopefully this one soon, I think this is really good for moving forward. There are some other PR's out there I think would be good to get merged as well, and hopefully we can get a new 0.6.0 release soon?

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

Successfully merging this pull request may close these issues.

None yet

4 participants