# AddRadiusEnvironment

- Module: [Aspire.Hosting.Radius](/reference/api/go/aspire.hosting.radius.md)
- Version: `17.0.0-preview.1.26565.2`
- Kind: `method`
- Defined on: `DistributedApplicationBuilder`
- Source: [GitHub](https://github.com/microsoft/aspire/tree/bcfa151cdca6d0a573f22d5d9c23f9c727cb3b2f)

Adds a Radius compute environment to the application model.

## Remarks

In `Run` mode this returns an
unregistered builder so the environment does not surface as a resource in
the dashboard and no pipeline steps are wired up -- matching
`AddKubernetesEnvironment` and `AddDockerComposeEnvironment`.
All deployment-target wiring runs in Publish mode only.

## Definition

```go
func (DistributedApplicationBuilder) AddRadiusEnvironment(name string) RadiusEnvironmentResource
```

## Parameters

- `name` (`string`) -- The name of the Radius environment resource.

## Returns

[`RadiusEnvironmentResource`](/reference/api/go/aspire.hosting.radius/radiusenvironmentresource.md) -- A reference to the `IResourceBuilder`.

Returns a handle; failures surface later via `Err()`.

## Applies to

- `DistributedApplicationBuilder`
