Code Monkey home page Code Monkey logo

Comments (5)

apparentlymart avatar apparentlymart commented on June 30, 2024

Hi @jcarlson! Sorry for this odd error message.

Given what we see in the error message here, it looks like in your configuration for input you have a reference to some other resource that is exporting an AWS subnet id. If so, I expect that actually the bug here is in that resource type, where it indicated during the initial plan that it would export null but then changed its mind once some other value was learned during the apply phase. Re-running makes the problem go away presumably because now that upstream resource already "knows" whatever value caused it to change its result, and so it produces a consistent plan both times on the second run.

Unfortunately due to some historical inconsistent behavior in the Terraform SDK (which is currently still based on the Terraform 0.11 protocol), provider implementations are currently exempt from certain safety checks that would normally catch this upstream at the original cause, and so this is being incorrectly reported at the point where you referenced the result rather than at the resource that generated that result.

If there is indeed a reference to some other resource in there, then I think this will need to be opened against whatever provider implements that resource type instead; given that it's an AWS subnet id, I'd guess it's some resource type from the AWS provider.

from terraform-provider-random.

jcarlson avatar jcarlson commented on June 30, 2024

from terraform-provider-random.

apparentlymart avatar apparentlymart commented on June 30, 2024

Great, thanks for following up @jcarlson!

Given that, there isn't any fix we could make here in the random provider to avoid that message, so I'm going to close this now and hopefully if it arises again we can capture it in the AWS provider repository instead.

Design work for updating the SDK to be based on the Terraform 0.12 protocol is getting started now, so hopefully before too long the AWS provider will no longer be treated to this special legacy protocol exception and Terraform Core will be able to report the problem at its source, which will cause the error message for this case to contain a more specific description of the problem.

Thanks for reporting this, and sorry that the error message is currently misleading about where exactly the problem arose.

from terraform-provider-random.

jcarlson avatar jcarlson commented on June 30, 2024

@apparentlymart I ran into this issue again and decided to commit some brain cycles to finding a workaround. Mostly by accident, I noticed that I am able to reliably reproduce this issue with random provider version 2.1.0, but if I upgrade that to 2.1.1 or greater, I am not able to reproduce it; all other providers were held constant as listed in this issue.

This leads me to believe that it is (or was) a bug in the random provider after all, but given I cannot reproduce it in newer versions of the provider, I'm not sure any further time is warranted here.

Thanks for your help.

from terraform-provider-random.

github-actions avatar github-actions commented on June 30, 2024

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.

from terraform-provider-random.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.