Comments (5)
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.
from terraform-provider-random.
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.
@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.
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)
- Documentation: random_shuffle output is already list HOT 2
- random_pet generating non unique names
- Update Go Module to Go 1.20 Minimum HOT 1
- tyring to upgrade azurerm version but getting below error. HOT 3
- Ambiguous wording in docs on the parameters for RandomPassword, eg "numeric = true" can still generate a password without numerics.
- Resource 'snowflake_grant_privileges_to_role' marks 'priveleges' attribute as changed regardless of any changes being made HOT 2
- random_shuffle need to add position 0 of an array to return 1 single result string HOT 2
- Support UUIDv7
- Enable password cannot have more than 2 repeated characters
- Feature Request: random IP from CIDR range HOT 4
- Feature Request: Random Date HOT 2
- `random_bytes` resource does not explicitly mention being "sufficiently random for cryptographic use HOT 2
- `random_bytes` resource does not explicitly mention being "sufficiently random for cryptographic use" HOT 2
- Improve documentation HOT 2
- Adjust Go Module Address
- Panic on `random_string` when all properties set to `false` HOT 3
- After importing random_string, special flag is changed HOT 2
- Importing a random password using an import block outputs a sensitive value during apply. HOT 1
- `provider::random::string()` function HOT 2
- Add word/profanity filter for random_pet HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from terraform-provider-random.