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

Bump hashicorp/terraform-plugin-sdk to v2.30.0 #320

Merged
merged 1 commit into from
Jan 9, 2024

Conversation

ulucinar
Copy link
Collaborator

@ulucinar ulucinar commented Dec 27, 2023

Description of your changes

This PR bumps the Terraform plugin SDK version to v2.30.0 and if the schema.Resource.Schema is nil, populates the resource's native schema by calling the schema.Resource.SchemaFunc.

The PR does not attempt to optimize the memory usage due to large resource schemas with the lazy initialization of such schemas. This could be a future optimization point for us.

Another point is that we may need to branch out the versions we consume in the providers if we figure out issues when we bump the upjet versions in those providers because the bumped TF SDK version may not be compatible with them.

I have:

  • Read and followed Upjet's contribution process.
  • Run make reviewable to ensure this PR is ready for review.
  • Added backport release-x.y labels to auto-backport this PR if necessary.

How has this code been tested

Tested against crossplane-contrib/provider-upjet-aws#1037 using the aws_kinesis_firehose_delivery_stream resource that @turkenf reported.

if terraformResource.Schema == nil {
p.skippedResourceNames = append(p.skippedResourceNames, name)
continue
if terraformResource.SchemaFunc == nil {
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We may even consider panicing on these conditions.

- If schema.Resource.Schema is nil, try to populate the schema from the SchemaFunc.

Signed-off-by: Alper Rifat Ulucinar <[email protected]>
Copy link
Member

@sergenyalcin sergenyalcin left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks @ulucinar LGTM!

@ulucinar ulucinar merged commit 1976411 into crossplane:main Jan 9, 2024
7 checks passed
@ulucinar ulucinar deleted the bump-tf-sdk branch January 9, 2024 09:35
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.

2 participants