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

Add support for terraform plugin framework #130

Closed
turkenh opened this issue Nov 1, 2022 · 7 comments
Closed

Add support for terraform plugin framework #130

turkenh opened this issue Nov 1, 2022 · 7 comments
Labels
enhancement New feature or request

Comments

@turkenh
Copy link
Member

turkenh commented Nov 1, 2022

What problem are you facing?

It looks like upjet cannot generate providers built using https://github.com/hashicorp/terraform-plugin-framework

See:

How could Upjet help solve your problem?

Add support for https://github.com/hashicorp/terraform-plugin-framework

@turkenh turkenh added the enhancement New feature or request label Nov 1, 2022
@turkenh
Copy link
Member Author

turkenh commented Nov 1, 2022

We will most probably want to fix #131 before or together with this issue.

@prafull01
Copy link

Is there any ETA on this enhancement?

I have tried the workaround mentioned in this comment and the resource generation is successful.

However, it is causing a different issue. I have nested objects in the terraform schema as follows:

"serverless": schema.SingleNestedAttribute{
				Optional: true,
				PlanModifiers: []planmodifier.Object{
					objectplanmodifier.UseStateForUnknown(),
				},
				Attributes: map[string]schema.Attribute{
					"spend_limit": schema.Int64Attribute{
						Required: true,
						PlanModifiers: []planmodifier.Int64{
							int64planmodifier.UseStateForUnknown(),
						},
						MarkdownDescription: "Spend limit in US cents",
					},
					"routing_id": schema.StringAttribute{
						Computed: true,
						PlanModifiers: []planmodifier.String{
							stringplanmodifier.UseStateForUnknown(),
						},
					},
				},
}

The types.go generated has the array instead of object for this but terraform expects the object.

// +kubebuilder:validation:Optional
Serverless []ServerlessParameters `json:"serverless,omitempty" tf:"serverless,omitempty"`

I expect that the ServerlessParameters should be object not an array, this is causing issues in Crossplane controller I have built.

@zonybob
Copy link

zonybob commented Nov 7, 2023

Will the comment made on #131 affect this and potentially allow support for terraform plugin framework?
#131 (comment)

@zliang-akamai
Copy link

Hey @turkenh, as many TF providers starts migrating to the plugin framework, may we have some updates about this issue? Thanks!

@jeanduplessis
Copy link
Collaborator

@zliang-akamai the team is actively working on Plugin Framework support for Upjet. It's turning out to be more complex than integrating with the SDK. The current estimation is that it will be ready in early February.

@zliang-akamai
Copy link

@jeanduplessis, thank you and the team for the effort to support the plugin framework, and that's really a good news!

@jeanduplessis
Copy link
Collaborator

With the release of Upjet 1.1.0 we now support resources implemented using the Terraform Plugin Framework.

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

No branches or pull requests

5 participants