Skip to content

Endpoint visible for container #5954

Answered by davidfowl
rosieks asked this question in Q&A
Sep 26, 2024 · 1 comments · 3 replies
Discussion options

You must be logged in to vote

Sorry for taking so long to respond. This is a tricky topic as we attempt to do some magic under the covers to make sure things "just work" in the default case of passing an endpoint reference or passing a connection string via WithReference.

When you get an EndpointReference (via resource.GetEndpoint), it has no idea what the URL is or is going to be until the app host starts up. That's why you see exceptions about the endpoint not being allocated when you try to resolve the Url during startup. This is why there's an environment variable callback. It will run after the endpoints have been allocated and you can access various properties.

When we detect a container to host reference when r…

Replies: 1 comment 3 replies

Comment options

You must be logged in to vote
3 replies
@rosieks
Comment options

@Inx51
Comment options

@davidfowl
Comment options

Answer selected by rosieks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
3 participants