-
Notifications
You must be signed in to change notification settings - Fork 459
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
Upgrading to CDKTF 0.16.0 or 0.16.1 breaks random provider in go #2856
Comments
Hey @ansgarm thanks for the quick response. I tried upgrading to the random v7 provider and had some issues with upgrading to it in go, I could use some guidance here because I've had the same issue a couple times. Going off of the readme file, it says to import the random provider as
Then
So then I try to trim the
And then
Then I try to update my go.mod file to use v7 of the random provider
And this returns the following:
I've tried a couple other permutations as well, but nothing seems to allow me to import version 7 of the random provider. |
@ansgarm any thoughts on how to proceed on this? |
smh, just read the notice #2146, I'll try to follow this guideline to use the provided random provider and see if it works tomorrow. |
@eahrend not sure if worked for you, i didn't have any luck with this. Same setup as you, only using go 1.20.4 |
I haven't had the chance to try to re-upgrade to 0.16.X @moonord89 , I'll let you know if #2146 helps once I do, but due to the nature of $work, other things have been taking my time lol. |
@ansgarm this doesn't seem to work. If i try adding the package give me this error: github.com/cdktf/cdktf-provider-random-go/random/v7: module github.com/cdktf/cdktf-provider-random-go/random/v7@latest found (v7.0.0), but does not contain package github.com/cdktf/cdktf-provider-random-go/random/v7 Any thoughts on this? |
I see that a new version of the random provider has been published. Tried with this one as well but still got the same result: github.com/cdktf/cdktf-provider-random-go/random/v7: module github.com/cdktf/cdktf-provider-random-go/random/v7@latest found (v7.0.1), but does not contain package github.com/cdktf/cdktf-provider-random-go/random/v7 |
@ansgarm , I hate to bother you on this, but we're trying to update cdktf to 0.17 from 0.15 and we're still getting this issue. |
Nvm, got it working @moonord89 in addition to the things #2146 requires you to do, you need to import the specific resource as a sub path. Rather than import (
random "github.com/cdktf/cdktf-provider-random-go/random/v8"
) You need to specify that you're importing the stringresource in your import path. import (
random "github.com/cdktf/cdktf-provider-random-go/random/v8/stringresource"
) Let me know if this fixes it for you, because this fixed it for me on most of my stuff. WRT the go.mod file, this is what's working for me. module eahrend/tf
go 1.20
require (
github.com/aws/constructs-go/constructs/v10 v10.2.52
github.com/aws/jsii-runtime-go v1.84.0
github.com/cdktf/cdktf-provider-google-go/google/v8 v8.0.2
github.com/cdktf/cdktf-provider-helm-go/helm/v7 v7.0.0
github.com/cdktf/cdktf-provider-random-go/random/v8 v8.0.0
) |
@moonord89 so interesting thing, I noticed that some providers will actually have this documentation already, if you check out the provider docs on the kubernetes provider it's all there It may be a repo-by-repo thing we have to bug them to update, or if there is a template for pre-built providers that hashicorp has maybe it now autogenerates these? |
Hi there! 👋 We haven't heard from you in 15 days and would like to know if the problem has been resolved or if you still need help. If we don't hear from you before then, I'll auto-close this issue in 30 days. |
I'm closing this issue because we haven't heard back in 45 days. ⌛️ If you still need help, feel free to comment or reopen the issue! |
I'm going to lock this issue because it has been closed for 30 days. This helps our maintainers find and focus on the active issues. If you've found a problem that seems similar to this, please open a new issue and complete the issue template so we can capture all the details necessary to investigate further. |
Community Note
cdktf & Language Versions
cdktf.json
go.mod
Other stuff:
Affected Provider / Resource(s)
github.com/hashicorp/cdktf-provider-random-go/random
cdktf version 0.16.0 and 0.16.1
Debug Output
https://gist.github.com/eahrend/794c87066cc6ad36901bbf8ac4024e8b
Expected Behavior
CDKTF should synth and apply as usual
Actual Behavior
Errors out with debug in gist
Steps to Reproduce
Start with cdktf 0.15.3, create a resource that uses the random provider like so:
run
cdktf apply --auto-approve
Upgrade to cdktf versions 0.16.0 or 0.16.1
re-run
cdktf apply --auto-approve
Important Factoids
N/A
References
N/A
The text was updated successfully, but these errors were encountered: