aspire-parameter

Configures secure parameters and secrets for .NET Aspire applications via AddParameter calls.

5|4|Updated Nov 3, 2025
One-click install
npx skills add https://github.com/microcks/microcks-aspire --skill aspire-parameter
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: aspire-parameter
Source: https://github.com/microcks/microcks-aspire/tree/main/.github/skills/aspire-parameter
Command: npx skills add https://github.com/microcks/microcks-aspire --skill aspire-parameter

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Aspire applications frequently require configuration values and credentials that must be stored and consumed securely across multiple components. This Skill provides a centralized pattern to define, reference, and inject parameters and secrets into .NET Aspire apps, reducing hard-coded values and improving safety.

Core Features & Use Cases

  • Centralized parameter management: define Parameters:name entries and mark secrets to protect sensitive values.
  • Seamless integration: reference ParameterResource values in container environments and configuration code.
  • Use Case: securely wire a database user and password into a service without exposing plaintext credentials.

Quick Start

Define a new parameter using AddParameter, e.g., builder.AddParameter("db-user"); then add a secret, builder.AddParameter("db-password", secret: true); and inject into a container's environment with context.EnvironmentVariables["DB_USER"] = user.Resource; context.EnvironmentVariables["DB_PASSWORD"] = password.Resource;

Frequently Asked Questions about aspire-parameter

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

FAQPage Schema
How do I manage secrets and configuration parameters securely in .NET Aspire?

You can manage secrets in .NET Aspire by defining parameters using AddParameter, marking sensitive values with the secret flag, and injecting ParameterResource values into container environment variables for secure runtime configuration.

How do I pass a database password to an Aspire container service without hardcoding it?

To pass a database password securely, create a ParameterResource using builder.AddParameter with the secret flag set to true, then assign the resource value to the container's environment variables during configuration.

What is the best way to centralize API keys and connection strings across .NET Aspire services?

Centralize API keys and connection strings by defining them as ParameterResource entries via AddParameter, enabling consistent referencing and secure injection across multiple Aspire services and containers.

Can I set a default value for a parameter in Aspire while keeping it secure?

Yes, you can configure AddParameter calls in Aspire to support both default values and the secret flag, allowing parameters to have fallback values while remaining protected as secure configuration entries.

Does .NET Aspire support runtime injection of configuration values into application code?

Yes, Aspire supports runtime injection by referencing ParameterResource values directly within configuration code and mapping them to environment variables for services and containers.