Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
6 changes: 6 additions & 0 deletions .cspellignore
Original file line number Diff line number Diff line change
Expand Up @@ -104,6 +104,7 @@ BicepConfigProperties
BicepConfigPropertiesAuthentication
bicepparam
BicepRecipeProperties
binfmt
Bitbucket
Blazor
blockOwnerDeletion
Expand Down Expand Up @@ -425,6 +426,7 @@ geos
gg
ghcr
Gi
gibibytes
GigaOm
GitAuthConfig
GitAuthConfigPat
Expand Down Expand Up @@ -691,6 +693,7 @@ myroute
mysample
myservice
myserviceroute
mysqldb
myworkspace
NamedQuery
namespace
Expand Down Expand Up @@ -773,6 +776,7 @@ periodSeconds
PermissionSet
PersistentVolume
pfx
PGDATA
PhoneNumber
plainHTTP
PlaybackConfiguration
Expand Down Expand Up @@ -1071,6 +1075,7 @@ TaskTemplate
TBD
TCP
TcpHealthProbeProperties
tcpsocket
tcrra
TechCrunch
templateKind
Expand All @@ -1094,6 +1099,7 @@ tls
tlsdemo
tlstermination
tmp
tmpfs
toc
ToCs
ToDo
Expand Down
254 changes: 237 additions & 17 deletions .github/scripts/generate_resource_references.py

Large diffs are not rendered by default.

3 changes: 0 additions & 3 deletions bicepconfig.json
Original file line number Diff line number Diff line change
@@ -1,8 +1,5 @@
// The bicepconfig.json file is needed so the bicep files in the repo can be compiled with the correct setup
{
"experimentalFeaturesEnabled": {
"extensibility": true
},
"extensions": {
"radius": "br:biceptypes.azurecr.io/radius:latest",
"aws": "br:biceptypes.azurecr.io/aws:latest"
Expand Down
48 changes: 45 additions & 3 deletions docs/assets/scss/_content.scss
Original file line number Diff line number Diff line change
Expand Up @@ -44,14 +44,35 @@
@extend .img-fluid;
}

> table {
> table:not(.td-initial) {
@extend .table-striped;

@extend .table-responsive;

@extend .table-bordered;

@extend .table;

// Render as a normal table rather than Docsy's responsive
// `display: block` (which sets `display: block` and adds horizontal
// scrolling). The `:not(.td-initial)` qualifier matches the specificity
// of Docsy's own responsive-table rule so `display: table` wins the
// cascade.
display: table;
width: 100%;

// Use a fixed layout but WITHOUT any hard-coded per-column widths. With
// no `<col>`/`width` rules, the fixed algorithm divides the table width
// equally among columns (2 columns → 50/50, 3 → thirds, 4 → quarters).
// This is dynamic to the column count, never lets one column hog the
// width, and gives every column enough room that ordinary words like
// "string" or "boolean" are never broken mid-word. A genuinely long,
// unbreakable token (e.g. a UCP resource ID) wraps within its column
// via `overflow-wrap: anywhere` instead of forcing the table wide.
table-layout: fixed;

td, th {
overflow-wrap: anywhere;
word-break: normal;
}
}

> blockquote {
Expand Down Expand Up @@ -81,6 +102,27 @@
.lead {
margin-bottom: 1.5rem;
}

// The Docsy `tabs`/`codetab` shortcodes render each tab's body in a
// `.tab-pane` that has no horizontal padding, so paragraphs and code blocks
// sit flush against the tab-content border. Inset the content from the
// border for readability.
.tab-content .tab-pane {
padding: 1rem;

// The shortcode injects a leading <br> for top spacing; the padding now
// provides it, so hide the redundant break.
> br:first-child {
display: none;
}

// Docsy's tab styling resets `.highlight` to `margin: 0` inside a tab
// pane, which removes the spacing between a code block and the text that
// follows it. Restore a bottom margin so code blocks aren't cramped.
.highlight {
margin-bottom: 1rem;
}
}
}

.td-title {
Expand Down
5 changes: 4 additions & 1 deletion docs/assets/scss/_sidebar-tree.scss
Original file line number Diff line number Diff line change
Expand Up @@ -56,8 +56,11 @@
display: block;
padding-bottom: 0.15rem;

// Keep leaf-page links the same color and weight as section links so
// same-level siblings look identical regardless of page kind.
&__page {
color: $gray-700;
color: $gray-900;
font-weight: $font-weight-normal;
}
}

Expand Down
21 changes: 21 additions & 0 deletions docs/assets/scss/_styles_project.scss
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,21 @@
@import "sidebar-tree";
@import "content";

// Right-side "on this page" TOC: match the left sidebar's size and weight. Docsy
// renders top-level entries semibold (via --td-toc-h1-font-weight-delta) at the
// larger body font size, which reads as a different font next to the sidebar.
.td-toc {
font-size: .9rem;

#TableOfContents {
--td-toc-h1-font-weight-delta: 0;
}

nav a {
font-weight: $font-weight-normal;
}
}

// Code blocks use a dark syntax theme, so Docsy's default (dark) copy-to-clipboard
// button is nearly invisible against them until hovered. Use a light color so the
// button stays visible at all times, like other docs sites.
Expand All @@ -19,6 +34,12 @@
display: none;
}

// Add breathing room above the "Feedback" footer section so it isn't crowded
// against the preceding page content.
.feedback--title {
margin-top: 2rem;
}

.btn-success {
background: #3176d9;
background-color: #3176d9;
Expand Down
3 changes: 0 additions & 3 deletions docs/config.toml
Original file line number Diff line number Diff line change
Expand Up @@ -25,9 +25,6 @@ path = "github.com/google/docsy"
source = "content"
target = "content"
[[module.mounts]]
source = "shared-content"
target = "content"
[[module.mounts]]
source = "static"
target = "static"
[[module.mounts]]
Expand Down
10 changes: 5 additions & 5 deletions docs/content/_index.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,21 +16,21 @@ Radius is a cloud native application platform. It enables developers and IT ope
[**Learn more**](https://radapp.io/)
{{% /alert %}}

{{< button text="Radius Quick Start 🚀" page="quick-start" color="success" size="btn-lg" >}}
{{< button text="Radius Quick Start 🚀" page="getting-started" color="success" size="btn-lg" >}}

{{< cardpane >}}
{{< card header="**🎓 Tutorials**" footer="[**View available tutorials →**]({{< ref tutorials >}})" >}}
Visit the tutorials for guided learning paths to try out Radius and pick up the main concepts. We'll walk you through the steps to get started with Radius and run your first set of apps.
{{< card header="**🎓 Get started**" footer="[**Get started with Radius →**]({{< ref getting-started >}})" >}}
Follow the getting started guide for a guided path to try out Radius and pick up the main concepts. We'll walk you through installing Radius and running your first application.
{{< /card >}}
{{< card header="**📘 How-to guides**" footer="[**Visit how-to guides →**]({{< ref guides >}})" >}}
{{< card header="**📘 How-to guides**" footer="[**Visit how-to guides →**]({{< ref applications >}})" >}}
Check out the how-to guides for step-by-step instructions on how to use Radius and its features. We'll walk you through how to accomplish specific tasks when using Radius.
{{< /card >}}
{{< /cardpane >}}
{{< cardpane >}}
{{< card header="**💭 Concepts**" footer="[**Learn the concepts →**]({{< ref concepts >}})" >}}
Learn about the background and concepts behind Radius with in-depth explanations. We'll cover the main concepts and how Radius works, so you have the broader context to deeply understand Radius and use it most effectively.
{{< /card >}}
{{< card header="**🧾 Reference**" footer="[**Visit reference material →**]({{< ref guides >}})" >}}
{{< card header="**🧾 Reference**" footer="[**Visit reference material →**]({{< ref reference >}})" >}}
Refer to detailed information on Radius resources, APIs, FAQs, and more. Reference material is useful for looking up specific information about Radius when you need it.
{{< /card >}}
{{< /cardpane >}}
9 changes: 9 additions & 0 deletions docs/content/applications/_index.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
---
type: docs
title: "Manage applications"
linkTitle: "Manage applications"
description: "Deploy and manage Applications and the resources that make them up"
weight: 600
---

Learn how to deploy an Application to an Environment, use connections to model dependencies between resources, configure ingress with Routes to expose services to the internet, and override Kubernetes resource configurations when you need finer control over the underlying platform.
155 changes: 155 additions & 0 deletions docs/content/applications/connections/_index.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,155 @@
---
type: docs
title: "How to model application dependencies using connections"
linkTitle: "Model application dependencies"
description: "Learn how to use connections to model dependencies within your application"
weight: 200
aliases:
- /guides/connections/
---

A connection is an explicit relationship between two resources in your [Application]({{< ref "/concepts/applications" >}}). Declaring a connection from a Container to another resource adds an edge to the Application graph and injects the connected resource's properties into the Container as environment variables. Your application then reads those variables instead of hard-coding hosts, ports, or credentials.

This guide adds a Redis cache to an application and connects a Container to it. It builds on the definition from [How to model an application definition]({{< ref "/applications/definitions" >}}).

## Step 1: Start from an application definition

Begin with a definition that declares an Application and a Container. The following `app.bicep` defines a `frontend` Container:

```bicep
extension radius

@description('The Radius Environment ID. Injected automatically by the rad CLI.')
param environment string

resource app 'Radius.Core/applications@2025-08-01-preview' = {
name: 'my-app'
properties: {
environment: environment
}
}

resource frontend 'Radius.Compute/containers@2025-08-01-preview' = {
name: 'frontend'
properties: {
environment: environment
application: app.id
containers: {
web: {
image: 'ghcr.io/radius-project/samples/demo:latest'
ports: {
web: {
containerPort: 3000
}
}
}
}
}
}
```

See [How to model an application definition]({{< ref "/applications/definitions" >}}) to build this file from scratch.

## Step 2: Add the resource to connect to

Add the dependency the Container needs. The following example adds a `Radius.Data/redisCaches` resource named `db` to the same Application:

```bicep
resource db 'Radius.Data/redisCaches@2025-08-01-preview' = {
name: 'db'
properties: {
environment: environment
application: app.id
}
}
```

## Step 3: Connect the Container to the resource

Add a `connections` entry to the Container's `properties`. Each connection has a name and a `source` set to the target resource's `.id`:

```bicep
resource frontend 'Radius.Compute/containers@2025-08-01-preview' = {
name: 'frontend'
properties: {
environment: environment
application: app.id
containers: {
web: {
image: 'ghcr.io/radius-project/samples/demo:latest'
ports: {
web: {
containerPort: 3000
}
}
}
}
connections: {
redis: {
source: db.id
}
}
}
}
```

The connection name (`redis`) becomes the prefix of the environment variables Radius injects into the Container. Referencing `db.id` also orders the deployment so Radius creates the cache before the Container.

## Step 4: Deploy the application

Deploy the updated definition with [`rad deploy`]({{< ref rad_deploy >}}):

```bash
rad deploy app.bicep
```

Radius provisions the Redis cache, injects its connection details into the Container, and records the connection in the Application graph.

## Step 5: Inspect the connection in the Application graph

Use [`rad application graph`]({{< ref rad_application_graph >}}) to view the resources and the connection between them:

<!-- TODO: Remove the `--preview` flag when the Radius.Core Application implementation is no longer in preview. -->
```bash
rad application graph --application my-app --preview
```

The output shows the `frontend` Container connected to the `db` cache, along with the infrastructure each resource created:

```text
Displaying application: my-app

Name: frontend (Radius.Compute/containers)
Connections:
frontend -> db (Radius.Data/redisCaches)
Resources:
frontend (kubernetes: apps/Deployment)
frontend (kubernetes: core/Service)

Name: db (Radius.Data/redisCaches)
Connections:
frontend (Radius.Compute/containers) -> db
Resources:
db (kubernetes: apps/Deployment)
db (kubernetes: core/Service)
```

## Connection environment variables

When a Container connects to another resource, Radius injects an environment variable for each property the connected resource exposes. The variables follow the pattern `CONNECTION_<CONNECTION-NAME>_<PROPERTY-NAME>`, uppercased. Radius manages the values securely through the Environment.

For the `redis` connection above, Radius injects a variable for each property the Redis cache exposes. For example, a cache that returns `host`, `port`, and `password` produces:

- `CONNECTION_REDIS_HOST`
- `CONNECTION_REDIS_PORT`
- `CONNECTION_REDIS_PASSWORD`

The exact variables depend on the properties defined by the connected Resource Type. See the [Resource Types reference]({{< ref "/reference/resources" >}}) for each type's properties, and [Connections]({{< ref "/concepts/applications#connections" >}}) in the Applications concept for how the graph and variables are built.

To use your own naming convention, ignore the generated variables and set explicit environment variables on the Container instead.

## Next steps

With the dependency connected, deploy and manage the complete Application.

{{< button text="Next step: How to deploy applications using Radius" page="/applications/deploy" >}}
Loading
Loading