Skip to content

rad init creates an unnecessary stub application resource #12649

Description

@zachcasper

Steps to reproduce

  1. Run:
    rad init
  2. List applications:
    rad app list

Observed output includes ✅ Scaffold application test, and rad app list --preview lists an application named after the directory:

RESOURCE  TYPE                            GROUP     STATE
test      Applications.Core/applications  default   Succeeded

The behavior is the same if running rad init --preview, only the Radius.Core/applications type is used.

Observed behavior

rad init creates a Applications.Core/applications or Radius.Core/applications resource named after the current working directory. This stub application resource is not needed. rad deploy creates the Application resource when (1) an explicit application resource is added to the app.bicep file, or (2) when the --application flag is passed such as rad deploy --application <app_name>.

This stub application resource served no purpose.

Desired behavior

rad init should not create a stub application resource as part of initialization. Initialization should configure Radius and create required local configuration without adding an application to the selected environment.

Workaround

No response

rad Version

❯ rad version
CLI Version Information:
RELEASE VERSION BICEP COMMIT
edge bd44f4e 0.42.1 bd44f4e

Control Plane Information:
STATUS VERSION
Installed edge

Operating system

No response

Additional context

The generated files are app.bicep and bicepconfig.json. The generated app.bicep includes:

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

Related rad init issues include: #12588, #12587, #12418, and #12568.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething is broken or not working as expected

    Type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions