Document environment variable naming conventions for resources#498
Document environment variable naming conventions for resources#498
Conversation
Create new fundamentals/environment-variables.mdx page documenting:
- Connection string naming (ConnectionStrings__{resource-name})
- Endpoint URL naming (RESOURCE_NAME_SCHEME)
- Service discovery variables (services__name__scheme__index)
- Resource property naming (RESOURCE_NAME_PROPERTY)
- Name encoding rules (hyphens to underscores, uppercasing)
- Examples for C#, Python, and JavaScript
- Custom environment variables with WithEnvironment
Update sidebar, Python, JavaScript, and service discovery pages with
cross-references to the new page.
Co-authored-by: IEvangelist <7679720+IEvangelist@users.noreply.github.com>
… hyphen Co-authored-by: IEvangelist <7679720+IEvangelist@users.noreply.github.com>
IEvangelist
left a comment
There was a problem hiding this comment.
This PR looks good so far, but let's double check it for accuracy by using the .github/skills/doc-tester/SKILL.md skill. Please also consider all new comments and feedback/suggestions. @copilot
src/frontend/src/content/docs/fundamentals/environment-variables.mdx
Outdated
Show resolved
Hide resolved
src/frontend/src/content/docs/fundamentals/environment-variables.mdx
Outdated
Show resolved
Hide resolved
src/frontend/src/content/docs/fundamentals/environment-variables.mdx
Outdated
Show resolved
Hide resolved
src/frontend/src/content/docs/fundamentals/environment-variables.mdx
Outdated
Show resolved
Hide resolved
src/frontend/src/content/docs/fundamentals/environment-variables.mdx
Outdated
Show resolved
Hide resolved
…nMore, remove unused imports Co-authored-by: IEvangelist <7679720+IEvangelist@users.noreply.github.com>
All review suggestions applied in
Ran doc-tester verification — confirmed the five key naming convention claims against the Warning Firewall rules blocked me from connecting to one or more addresses (expand for details)I tried to connect to the following addresses, but was blocked by firewall rules:
If you need me to access, download, or install something from one of these locations, you can either:
|
src/frontend/src/content/docs/fundamentals/environment-variables.mdx
Outdated
Show resolved
Hide resolved
Co-authored-by: IEvangelist <7679720+IEvangelist@users.noreply.github.com>
Co-authored-by: IEvangelist <7679720+IEvangelist@users.noreply.github.com>
|
Just as a heads up, I was blocked by some firewall rules while working on your feedback. Expand below for details. Warning Firewall rules blocked me from connecting to one or more addresses (expand for details)I tried to connect to the following addresses, but was blocked by firewall rules:
If you need me to access, download, or install something from one of these locations, you can either:
|
|
Hey @copilot, could you please update this PR to ensure that |
Co-authored-by: IEvangelist <7679720+IEvangelist@users.noreply.github.com>
Added
The |
There was a problem hiding this comment.
Pull request overview
This PR adds a new fundamentals documentation page explaining how Aspire transforms resource names into environment variable names — a convention that was previously undocumented and caused significant debugging pain for non-.NET developers (Python, Node.js, Go). The new page covers connection strings, endpoint URLs, service discovery variables, and resource properties, with language-specific examples. Cross-references are added to related pages, and CI/devcontainer configs are updated to disable Astro telemetry.
Changes:
- Added new
fundamentals/environment-variables.mdxpage documenting naming conventions for connection strings, endpoint URLs, service discovery variables, and resource properties - Updated Python, JavaScript, and service discovery pages with cross-references to the new documentation
- Added Astro telemetry disabling to CI workflows and devcontainer configuration
Reviewed changes
Copilot reviewed 8 out of 8 changed files in this pull request and generated no comments.
Show a summary per file
| File | Description |
|---|---|
src/frontend/src/content/docs/fundamentals/environment-variables.mdx |
New fundamentals page documenting env var naming conventions with examples in C#, Python, and JavaScript |
src/frontend/src/content/docs/integrations/frameworks/python.mdx |
Added connection string example and cross-reference to new env vars page |
src/frontend/src/content/docs/integrations/frameworks/javascript.mdx |
Added WithReference example with connection string access and cross-reference |
src/frontend/src/content/docs/fundamentals/service-discovery.mdx |
Added Aside tip cross-referencing the new env vars page |
src/frontend/config/sidebar/docs.topics.ts |
Added sidebar entry with all locale translations for the new page |
.github/workflows/frontend-build.yml |
Added npx astro telemetry disable step |
.github/workflows/integration.yml |
Added npx astro telemetry disable step |
.devcontainer/devcontainer.json |
Added npx astro telemetry disable to postCreateCommand |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
You can also share your feedback on Copilot code review. Take the survey.
|
I didn't see a section on custom parameters i.e. |
fundamentals/environment-variables.mdxdocumenting naming conventionstxtlanguage identifier## See alsosectionTabs/TabItem,LearnMore)npx astro telemetry disableto CI workflows (frontend-build.yml,integration.yml) and devcontainerpostCreateCommandOriginal prompt
🔒 GitHub Advanced Security automatically protects Copilot coding agent pull requests. You can protect all pull requests by enabling Advanced Security for your repositories. Learn more about Advanced Security.