-
Notifications
You must be signed in to change notification settings - Fork 9.6k
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
custom provider with many platform builds fails with localfile on v0.14-rc1 #26901
Comments
Hi @jurgenweber! Thanks for opening this issue. Based on what you've shared, I'm guessing that the system where you ran In that case, what you've seen here is an unfortunate but intentional behavior: because this provider isn't coming from a Terraform Registry, Terraform can't rely on the publisher's signatures to determine the correct checksums for other platforms, and so the lock file will by default only include the checksums for your current platform. This is what the parenthetical in the error message is alluding to:
The way we're intending to document this situation is to suggest using the new
For the sake of example above I've assumed that The Once v0.14.0 is final the recommendation would then be to check the updated If you choose not to put that file under version control for now, I think you should still be able to see it work under Terraform Cloud/Enterprise if you run the This design is a safety/convenience tradeoff which ended up favoring safety, and thus unfortunately requiring an extra step for those using a non-default provider installation configuration. We may continue to refine that tradeoff in future releases if we find other designs that can increase the convenience while preserving the safety, but this current implementation is the intended design which we are planning to ship in v0.14.0 and so I'm going to relabel this as an "enhancement" to reflect it being a place to discuss potential design changes, and also in the hope that what I've written above will be helpful to anyone else hitting this behavior before we publish the v0.14 version of the website that includes a discussion of this situation. |
You can see a draft of the new |
Your guesses are all true, I am on darwin vs TFCloud which is linux and we have both providers checked in. |
I am torn with the idea of the lock, right now I am rapidly developing a new environment, so I do not want a lock. Take all the latest versions as I can handle any fall out, as its not in use but later on. Not so sure. Now I need a partial lock file, to handle these sums if I want to continue to plan and use tf on my local vs in TFCloud? |
Assuming:
what should my -fs-mirror value be? I tried a bunch of variations:
Thanks |
Hi @jurgenweber, Based on the error message it seems like your shell isn't expanding If you'd like to avoid using the lock file mechanism at all for now, one option would be to use the |
Oh, I get it now... Like I understood, but now I get it. :) Cool. I will admit, I love it when you pick up my issues/forum posts. Your replies are always so professional and comprehensive. Sadly, while I have added a
I am still getting the error.
Thank you! |
while the .terraformignore approach did not work, this did:
|
Thanks for letting me know about the With that said, I'm glad that explicitly populating the lock file worked for you for now. I think that's the better solution in the long run anyway, since then you can make sure Terraform Cloud's remote operations mechanism will always use the same provider versions you used locally, which is one of the quirks of Terraform Cloud remote operations that the lock file mechanism was intended to address. |
Hi @jurgenweber, I've not yet been able to reproduce the problem of not being able to include From reviewing the documentation on A specific pitfall I'm thinking about here is that if the remote workspace has a sub-directory set as its "working directory" then the root directory would be the path that the working directory is specified relative to. Guessing a bit from your local directory layout as illustrated in what you shared so far, I wonder if your |
Yes, the 'terraform working directory' (as found in TFCloud workspace, general settings).
Right, you nailed it right on the head. I have it in the 'environment' directory. Where indeed the 'terraform' directory is the root of the git repo. I moved it up to test. It works as expected, but I think I am going to go with the lock file approach now and just inform the team on how to use it. 👍 As always, thank you very much. Absolute legend! :) |
Great! Thanks for following up, @jurgenweber. Since most of what we covered in the discussion here is going to get published on the website as part of the v0.14.0 documentation release, I'm going to close this issue for now and we'll see if any similar questions come up after the v0.14.0 final release, in which case we'll probably add some additional docs based on any recurring themes in those questions. If you are a person who found this issue while working on a v0.14.0 upgrade and you have run into a problem that the above doesn't answer, please feel free to start a topic in the community forum and I'll be happy to work through things with you there. If there are some common themes to questions then I'll gather them up myself and open a documentation PR. |
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 have 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. |
Terraform Version
Terraform Configuration Files
Debug Output
Expected Behavior
I expect terraform to init and run.
Actual Behavior
fails on init, due to checksums it just created in the lock file but then says they are invalid.
The interest part is, it works fine in TF Cloud, but when init and planning locally this fails as described above.
Steps to Reproduce
ensure you have a locally build provider.
Additional Context
I have a custom build, stored locally of a provider. This worked against v0.14-beta2, np.
References
The text was updated successfully, but these errors were encountered: