aspire-configuration

Map Aspire AppHost resource outputs to explicit environment variables.

Updated Dec 4, 2022
One-click install
npx skills add https://github.com/devingoble/CloudOStat --skill aspire-configuration-devingoble
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: aspire-configuration
Source: https://github.com/devingoble/CloudOStat/tree/main/.github/skills/aspire-configuration
Command: npx skills add https://github.com/devingoble/CloudOStat --skill aspire-configuration-devingoble

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve?

This Skill helps decouple application code from the specifics of Microsoft Aspire's service discovery and client instantiation, ensuring applications are portable and production-ready without Aspire-specific dependencies.

Core Features & Use Cases

  • Explicit Configuration Mapping: Translates Aspire resource outputs into explicit environment variables or configuration keys.
  • AppHost Ownership: Ensures Aspire hosting packages are confined to the AppHost, not application projects.
  • Production Parity: Guarantees that all configuration can be mirrored in production environments using standard configuration methods.
  • Use Case: When developing an application with Aspire, use this skill to configure your database connection strings and blob storage endpoints via environment variables, allowing your application code to bind to IOptions<T> without direct Aspire client references.

Quick Start

Configure your AppHost to emit explicit environment variables for all referenced resources.

Frequently Asked Questions about aspire-configuration

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I decouple application configuration from Aspire service discovery?

To decouple application configuration from Aspire, enforce explicit mapping from Aspire AppHost resources to application environment variables. This removes direct Aspire client package dependencies, allowing standard configuration binding.

Why do I need explicit environment variables for Aspire AppHost resources?

Explicit environment variables for Aspire AppHost resources ensure production parity by making all configuration transparent and settable outside of Aspire. This guarantees applications remain portable without Aspire-specific service discovery mechanisms.

Can I use IOptions<T> configuration binding without direct Aspire client references?

Yes, you can bind configuration to IOptions<T> without direct Aspire client references. The Skill translates Aspire resource outputs into explicit configuration keys, allowing standard .NET configuration methods to handle binding.

How do I confine Aspire hosting packages to the AppHost project?

Confine Aspire hosting packages to the AppHost by configuring it to emit explicit environment variables for all referenced resources. This ensures application projects consume configuration transparently without requiring Aspire-specific packages.

What is the best way to ensure production parity when using Aspire for microservices?

The best way to ensure production parity with Aspire is translating AppHost resource outputs into explicit environment variables. This guarantees all configuration can be mirrored in production using standard configuration methods, eliminating hidden Aspire dependencies.

Does this approach work for configuring database connection strings and blob storage endpoints in Aspire?

Yes, this approach configures database connection strings and blob storage endpoints by translating Aspire resource outputs into explicit environment variables. Applications consume these endpoints via standard configuration binding without Aspire client packages.