Skip to content

Represent expressions made up of multiple properties of other resources.#2759

Merged
davidfowl merged 2 commits intomainfrom
davidfowl/expressions
Mar 10, 2024
Merged

Represent expressions made up of multiple properties of other resources.#2759
davidfowl merged 2 commits intomainfrom
davidfowl/expressions

Conversation

@davidfowl
Copy link
Copy Markdown
Contributor

@davidfowl davidfowl commented Mar 10, 2024

Introduce a ReferenceExpression which uses string interpolation to represent expressions that reference multiple resources. This removes duplication between the manifest and runtime model and allows introspection of the reference parameters.

  • Removed synchronous GetConnectionString.
  • Re-implement GetConnectionStringAsync to use ReferenceExpressions
  • Centralize hard coding of host.docker.internal
  • Added support for reference expressions in environment variables.

Contributes to #2639
Fixes #2428

Microsoft Reviewers: Open in CodeFlow

@ghost ghost added the area-app-model Issues pertaining to the APIs in Aspire.Hosting, e.g. DistributedApplication label Mar 10, 2024
@davidfowl davidfowl requested a review from mitchdenny March 10, 2024 16:59
properties of other resources.
- Re-implement GetConnectionString to use
ReferenceExpressions
- Centralize hard coding of host.docker.internal
- Fixed tests
- Added suport for reference expressions in
environment variables.
@davidfowl davidfowl force-pushed the davidfowl/expressions branch from 1cd06c0 to b3e1f75 Compare March 10, 2024 18:19
@davidfowl davidfowl marked this pull request as ready for review March 10, 2024 18:19
Copy link
Copy Markdown
Member

@mitchdenny mitchdenny left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This reference abstraction is really coming together nicely.

@davidfowl davidfowl merged commit d75d2c0 into main Mar 10, 2024
@davidfowl davidfowl deleted the davidfowl/expressions branch March 10, 2024 20:57
@github-actions github-actions bot locked and limited conversation to collaborators Apr 18, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

area-app-model Issues pertaining to the APIs in Aspire.Hosting, e.g. DistributedApplication

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Allow values from resources to be composed into environment variables

2 participants