Hi, I am trying to add a stack reference, but keep...
# azure
Hi, I am trying to add a stack reference, but keep encountering this error:
registered twice (read and read)
. Does anyone know how to fix this? Example code:
Copy code
var stackNames = new List<string> { "stack1", "stack2" };
            var backendPools = stackNames.Select(stack =>
                var stackRef = new StackReference($"{stack}ref", new StackReferenceArgs { Name = $"company/project/{stack}" });

                var output1 = stackRef.RequireOutput("output1").Apply(_ => _.ToString());
                var output2 = stackRef.RequireOutput("output2").Apply(_ => _.ToString());

                return GetBackendPoolArgs(..);
ah, got my
param mixed up with the stack name. All good now!
actually, that wasn't it after all. Still need help on this please.
Why do you have
two times?
They conflict with each other
bad example, sorry
in my code, the names are different. I've updated the example - do you know what would throw that error?
I’d still guess two stack references with the same name somehow…