Skip to content

Upgrade to Terraform Provider SDK v2 #107

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

Merged
merged 11 commits into from
Apr 4, 2022
Merged

Upgrade to Terraform Provider SDK v2 #107

merged 11 commits into from
Apr 4, 2022

Conversation

pst
Copy link
Member

@pst pst commented Apr 12, 2021

No description provided.

@pst pst force-pushed the sdkv2 branch 3 times, most recently from 0d1d9d5 to 15878c2 Compare April 14, 2021 11:49
@willthames
Copy link
Contributor

@pst what are the future plans for this - the reshaping of the configuration seems like another thing that might be worth adding as a breaking change sooner rather than later

This might be good to do before adding support for replacements (assuming that's a goal)

Also do you have any thoughts on whether v2 makes sense as a target these days or just bite the bullet and move to framework (although framework relies on terraform 1.0.3+ which may well be a leap too far!)

@pst
Copy link
Member Author

pst commented Oct 15, 2021

Honestly, I have no idea and no opinion. My gut feeling is, to go with framework. But I haven't looked at it.

@pst pst force-pushed the sdkv2 branch 3 times, most recently from 099696d to fe84ca8 Compare March 19, 2022 12:26
@pst
Copy link
Member Author

pst commented Mar 19, 2022

panic: proto: file "extensions/extension.proto" is already registered
        previously from: "github.com/googleapis/gnostic/extensions"
        currently from:  "github.com/google/gnostic/extensions"

@pst pst force-pushed the sdkv2 branch 2 times, most recently from 8948260 to 7ff4171 Compare March 19, 2022 13:54
pst added 6 commits April 3, 2022 00:22
k8s.io/apimachinery v0.23.5 and k8s.io/client-go v0.23.5 both
import gnostic as github.com/google/gnostic and
github.com/googleapis/gnostic respectively.

Until this is resolved upstream, it seems easier to set the
conflictPolicy to warn for the provider binaries.
@pst pst force-pushed the sdkv2 branch 8 times, most recently from 31c6859 to 44327b2 Compare April 3, 2022 12:55
@pst pst merged commit f88ab14 into master Apr 4, 2022
@pst pst deleted the sdkv2 branch April 4, 2022 14:01
@willthames
Copy link
Contributor

@pst - any chance that we could have a 0.8.0-rc1 tag (or similar) so that we can try this out before it goes live?

@pst
Copy link
Member Author

pst commented Apr 5, 2022

The release was still in draft. So I assume you could not see it. https://github.com/kbst/terraform-provider-kustomization/releases/tag/v0.8.0-rc0

I don't think the -rcX tags are available from the terraform registry though.

@pst
Copy link
Member Author

pst commented Apr 5, 2022

I still need to update the docs for the schema changes. But you can see required changes here: kbst/catalog@f136940

Basically target, obj_ref and field_ref are blocks now, because the old schema was not valid anymore with SDK v2.

@willthames
Copy link
Contributor

I don't think the -rcX tags are available from the terraform registry though.

You can choose 0.8.0-rc0 in the version drop down but it will never default to the prerelease
https://registry.terraform.io/providers/kbst/kustomization/0.8.0-rc0

I see 0.8.0 is live now, look forward to trying it out!

@pst
Copy link
Member Author

pst commented Apr 7, 2022

I added a feature to opt out of the compression feature entirely. Just in case. But once disabled big CRDs will continue to fail. I found one bug in v0.8.0. #169 I forgot to have a schema migration for the data source. So for existing configurations, you may want to wait for v0.8.1.

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