diff --git a/hack/bicep-types-radius/generated/radius/radius.core/2025-08-01-preview/types.json b/hack/bicep-types-radius/generated/radius/radius.core/2025-08-01-preview/types.json index 37eb93bf2e..24d6a659bd 100644 --- a/hack/bicep-types-radius/generated/radius/radius.core/2025-08-01-preview/types.json +++ b/hack/bicep-types-radius/generated/radius/radius.core/2025-08-01-preview/types.json @@ -327,21 +327,21 @@ "$ref": "#/39" }, "flags": 2, - "description": "The status of the asynchronous operation." + "description": "(Read Only) The status of the Application resource within the Radius control plane. Does not include the other resources that compose the Application." }, "environment": { "type": { "$ref": "#/0" }, "flags": 1, - "description": "Fully qualified resource ID for the environment that the application is linked to" + "description": "(Required) Fully qualified resource ID of the environment the application is deployed to" }, "status": { "type": { "$ref": "#/12" }, "flags": 2, - "description": "Status of a resource." + "description": "(Read Only) Deployment details for the Application, including any output resources Radius created for it." } } }, @@ -565,21 +565,21 @@ "$ref": "#/11" }, "flags": 2, - "description": "The status of the asynchronous operation." + "description": "(Read Only) The status of the Application resource within the Radius control plane. Does not include the other resources that compose the Application." }, "environment": { "type": { "$ref": "#/0" }, "flags": 2, - "description": "Fully qualified resource ID for the environment that the application is linked to" + "description": "(Required) Fully qualified resource ID of the environment the application is deployed to" }, "status": { "type": { "$ref": "#/12" }, "flags": 2, - "description": "Status of a resource." + "description": "(Read Only) Deployment details for the Application, including any output resources Radius created for it." }, "properties": { "type": { @@ -926,35 +926,35 @@ "$ref": "#/84" }, "flags": 0, - "description": "The authentication method to use. Supported values: BasicAuth, AzureWI, AwsIrsa." + "description": "(Optional) How Radius authenticates to the registry." }, "basicAuthSecretId": { "type": { "$ref": "#/0" }, "flags": 0, - "description": "The ID of a secret resource containing username and password for BasicAuth. Supported types: Radius.Security/secrets (recommended) or Applications.Core/secretStores. Required when authenticationMethod is 'BasicAuth'." + "description": "(Optional) The ID of a `Radius.Security/secrets` resource containing the username and password. Required when `authenticationMethod` is `BasicAuth`." }, "azureWiClientId": { "type": { "$ref": "#/0" }, "flags": 0, - "description": "Azure Workload Identity client ID. Required when authenticationMethod is 'AzureWI'." + "description": "(Optional) Azure Workload Identity client ID. Required when `authenticationMethod` is `AzureWI`." }, "azureWiTenantId": { "type": { "$ref": "#/0" }, "flags": 0, - "description": "Azure Workload Identity tenant ID. Required when authenticationMethod is 'AzureWI'." + "description": "(Optional) Azure Workload Identity tenant ID. Required when `authenticationMethod` is `AzureWI`." }, "awsIamRoleArn": { "type": { "$ref": "#/0" }, "flags": 0, - "description": "AWS IAM Role ARN for IRSA authentication. Required when authenticationMethod is 'AwsIrsa'." + "description": "(Optional) AWS IAM Role ARN for IRSA authentication. Required when `authenticationMethod` is `AwsIrsa`." } } }, @@ -1001,21 +1001,21 @@ "$ref": "#/95" }, "flags": 2, - "description": "The status of the asynchronous operation." + "description": "(Read Only) The status of the Bicep settings resource within the Radius control plane." }, "referencedBy": { "type": { "$ref": "#/96" }, "flags": 2, - "description": "Environments that reference this Bicep configuration." + "description": "(Read Only) Resource IDs of the Environments that reference this Bicep settings resource." }, "registryAuthentications": { "type": { "$ref": "#/97" }, "flags": 0, - "description": "Authentication configuration for private Bicep registries, keyed by registry hostname (e.g. 'corp.acr.io'). The Bicep driver looks up credentials by the host parsed from the recipe template path." + "description": "(Optional) Authentication for private Bicep registries that host Recipe templates, keyed by registry hostname such as `corp.acr.io`. Radius matches a registry by the hostname in the Recipe source." } } }, @@ -1139,21 +1139,21 @@ "$ref": "#/78" }, "flags": 2, - "description": "The status of the asynchronous operation." + "description": "(Read Only) The status of the Bicep settings resource within the Radius control plane." }, "referencedBy": { "type": { "$ref": "#/79" }, "flags": 2, - "description": "Environments that reference this Bicep configuration." + "description": "(Read Only) Resource IDs of the Environments that reference this Bicep settings resource." }, "registryAuthentications": { "type": { "$ref": "#/85" }, "flags": 2, - "description": "Authentication configuration for private Bicep registries, keyed by registry hostname (e.g. 'corp.acr.io'). The Bicep driver looks up credentials by the host parsed from the recipe template path." + "description": "(Optional) Authentication for private Bicep registries that host Recipe templates, keyed by registry hostname such as `corp.acr.io`. Radius matches a registry by the hostname in the Recipe source." }, "properties": { "type": { @@ -1295,21 +1295,21 @@ "$ref": "#/116" }, "flags": 0, - "description": "The Azure cloud provider configuration." + "description": "(Optional) Configuration for deploying resources to Azure." }, "kubernetes": { "type": { "$ref": "#/117" }, "flags": 0, - "description": "The Kubernetes provider configuration." + "description": "(Optional) Configuration for deploying resources to Kubernetes." }, "aws": { "type": { "$ref": "#/118" }, "flags": 0, - "description": "The AWS cloud provider configuration." + "description": "(Optional) Configuration for deploying resources to AWS." } } }, @@ -1322,21 +1322,21 @@ "$ref": "#/0" }, "flags": 1, - "description": "Azure subscription ID hosting deployed resources." + "description": "(Required) ID of the Azure subscription that resources are deployed into." }, "resourceGroupName": { "type": { "$ref": "#/0" }, "flags": 0, - "description": "Optional resource group name." + "description": "(Optional) Name of the Azure resource group that resources are deployed into. Most Bicep and Terraform Recipes expect a resource group in the deployment context, so set this whenever deploying Azure resources." }, "identity": { "type": { "$ref": "#/14" }, "flags": 0, - "description": "External identity settings (moved from compute)." + "description": "(Optional) Managed or workload identity Radius uses to authenticate to Azure when deploying resources." } } }, @@ -1349,7 +1349,7 @@ "$ref": "#/0" }, "flags": 1, - "description": "Kubernetes namespace to deploy workloads into." + "description": "(Required) Kubernetes namespace that workloads are deployed into." } } }, @@ -1362,14 +1362,14 @@ "$ref": "#/0" }, "flags": 1, - "description": "AWS account ID for AWS resources to be deployed into." + "description": "(Required) ID of the AWS account that resources are deployed into." }, "region": { "type": { "$ref": "#/0" }, "flags": 1, - "description": "AWS region for AWS resources to be deployed into." + "description": "(Required) AWS region that resources are deployed into." } } }, @@ -1382,49 +1382,49 @@ "$ref": "#/128" }, "flags": 2, - "description": "The status of the asynchronous operation." + "description": "(Read Only) The status of the Environment resource within the Radius control plane. Does not include the resources deployed to the Environment." }, "recipePacks": { "type": { "$ref": "#/129" }, "flags": 0, - "description": "List of Recipe Pack resource IDs linked to this environment." + "description": "(Optional) Resource IDs of the Recipe Packs this Environment uses to provision infrastructure for application resources. Defaults to the `default` Recipe Pack in the `default` resource group if not specified." }, "recipeParameters": { "type": { "$ref": "#/131" }, "flags": 0, - "description": "Recipe specific parameters that apply to all resources of a given type in this environment." + "description": "(Optional) Parameters passed to Recipes when they run, keyed by resource type. Values here override the default parameters defined in the Recipe Pack for every resource of that type deployed to this Environment." }, "providers": { "type": { "$ref": "#/115" }, "flags": 0, - "description": "Cloud provider configuration for the environment." + "description": "(Optional) Target compute platform and cloud provider accounts that resources are deployed into. Defaults to Kubernetes in the `default` namespace if not specified." }, "terraformSettings": { "type": { "$ref": "#/0" }, "flags": 0, - "description": "Resource ID of a Radius.Core/terraformSettings resource providing Terraform recipe settings." + "description": "(Optional) Resource ID of a `Radius.Core/terraformSettings` resource that supplies Terraform CLI settings, such as private registry credentials, used when running Terraform Recipes in this Environment." }, "bicepSettings": { "type": { "$ref": "#/0" }, "flags": 0, - "description": "Resource ID of a Radius.Core/bicepSettings resource providing Bicep recipe settings." + "description": "(Optional) Resource ID of a `Radius.Core/bicepSettings` resource that supplies Bicep engine settings, such as private registry authentication, used when running Bicep Recipes in this Environment." }, "simulated": { "type": { "$ref": "#/28" }, "flags": 0, - "description": "Simulated environment." + "description": "(Optional) When true, the Environment is simulated and does not deploy real infrastructure. Recipes are evaluated but no resources are provisioned, which is useful for validating application definitions. Defaults to `false` if not specified." } } }, @@ -1556,49 +1556,49 @@ "$ref": "#/111" }, "flags": 2, - "description": "The status of the asynchronous operation." + "description": "(Read Only) The status of the Environment resource within the Radius control plane. Does not include the resources deployed to the Environment." }, "recipePacks": { "type": { "$ref": "#/112" }, "flags": 2, - "description": "List of Recipe Pack resource IDs linked to this environment." + "description": "(Optional) Resource IDs of the Recipe Packs this Environment uses to provision infrastructure for application resources. Defaults to the `default` Recipe Pack in the `default` resource group if not specified." }, "recipeParameters": { "type": { "$ref": "#/114" }, "flags": 2, - "description": "Recipe specific parameters that apply to all resources of a given type in this environment." + "description": "(Optional) Parameters passed to Recipes when they run, keyed by resource type. Values here override the default parameters defined in the Recipe Pack for every resource of that type deployed to this Environment." }, "providers": { "type": { "$ref": "#/115" }, "flags": 2, - "description": "Cloud provider configuration for the environment." + "description": "(Optional) Target compute platform and cloud provider accounts that resources are deployed into. Defaults to Kubernetes in the `default` namespace if not specified." }, "terraformSettings": { "type": { "$ref": "#/0" }, "flags": 2, - "description": "Resource ID of a Radius.Core/terraformSettings resource providing Terraform recipe settings." + "description": "(Optional) Resource ID of a `Radius.Core/terraformSettings` resource that supplies Terraform CLI settings, such as private registry credentials, used when running Terraform Recipes in this Environment." }, "bicepSettings": { "type": { "$ref": "#/0" }, "flags": 2, - "description": "Resource ID of a Radius.Core/bicepSettings resource providing Bicep recipe settings." + "description": "(Optional) Resource ID of a `Radius.Core/bicepSettings` resource that supplies Bicep engine settings, such as private registry authentication, used when running Bicep Recipes in this Environment." }, "simulated": { "type": { "$ref": "#/28" }, "flags": 2, - "description": "Simulated environment." + "description": "(Optional) When true, the Environment is simulated and does not deploy real infrastructure. Recipes are evaluated but no resources are provisioned, which is useful for validating application definitions. Defaults to `false` if not specified." }, "properties": { "type": { @@ -1724,35 +1724,35 @@ "$ref": "#/150" }, "flags": 1, - "description": "The type of recipe (e.g., Terraform, Bicep)" + "description": "(Required) The kind of Recipe, which determines how Radius runs it." }, "plainHttp": { "type": { "$ref": "#/28" }, "flags": 0, - "description": "Connect to the source using HTTP (not HTTPS). This should be used when the source is known not to support HTTPS, for example in a locally hosted registry for Bicep recipes. Defaults to false (use HTTPS/TLS)" + "description": "(Optional) Connect to the source using HTTP instead of HTTPS. Use this only when the source does not support HTTPS such as a locally hosted registry for Bicep recipes. Defaults to `false` if not specified." }, "source": { "type": { "$ref": "#/0" }, "flags": 1, - "description": "The source of the recipe. For Bicep recipes this is the OCI registry reference. For Terraform recipes this is the module source." + "description": "(Required) Location of the Recipe. For Bicep Recipes this is an OCI registry reference. For Terraform Recipes this is the module source such as a Git URL or a Terraform registry module." }, "parameters": { "type": { "$ref": "#/151" }, "flags": 0, - "description": "Parameters to pass to the recipe" + "description": "(Optional) Default parameter values passed to the Recipe when it runs. An Environment can override these per resource type through its `recipeParameters` property." }, "outputs": { "type": { "$ref": "#/152" }, "flags": 0, - "description": "Maps the module's outputs onto the resource type's properties, for recipes that point directly at a Bicep or Terraform module. Each entry's value is either a string (the module output name for a non-secret property) or, under the reserved `secrets` key, a nested object mapping secret property names to module output names. A `secrets` entry always routes its module output to the resource's secret outputs regardless of how the module classified it (for example an AVM module's `primaryConnectionString`). Example: `{ host: 'name', secrets: { connectionString: 'primaryConnectionString' } }`." + "description": "(Optional) Maps the module outputs onto the resource type properties for recipes that point directly at a Bicep or Terraform module. Each value is the module output name for a non-secret property. Under the reserved `secrets` key a nested object maps secret property names to module output names and always routes those outputs to the resource secret outputs." } } }, @@ -1808,21 +1808,21 @@ "$ref": "#/163" }, "flags": 2, - "description": "The status of the asynchronous operation" + "description": "(Read Only) The status of the Recipe Pack resource within the Radius control plane." }, "referencedBy": { "type": { "$ref": "#/164" }, "flags": 2, - "description": "List of environment IDs that reference this recipe pack" + "description": "(Read Only) Resource IDs of the Environments that reference this Recipe Pack." }, "recipes": { "type": { "$ref": "#/165" }, "flags": 1, - "description": "Map of resource types to their recipe configurations" + "description": "(Required) The Recipes in this pack, keyed by the resource type each Recipe provisions. Each key is a resource type such as `Radius.Data/redisCaches`." } } }, @@ -1946,21 +1946,21 @@ "$ref": "#/145" }, "flags": 2, - "description": "The status of the asynchronous operation" + "description": "(Read Only) The status of the Recipe Pack resource within the Radius control plane." }, "referencedBy": { "type": { "$ref": "#/146" }, "flags": 2, - "description": "List of environment IDs that reference this recipe pack" + "description": "(Read Only) Resource IDs of the Environments that reference this Recipe Pack." }, "recipes": { "type": { "$ref": "#/153" }, "flags": 2, - "description": "Map of resource types to their recipe configurations" + "description": "(Required) The Recipes in this pack, keyed by the resource type each Recipe provisions. Each key is a resource type such as `Radius.Data/redisCaches`." }, "properties": { "type": { @@ -2086,14 +2086,14 @@ "$ref": "#/182" }, "flags": 0, - "description": "Provider installation configuration. Specifies the location of providers via network mirrors or direct downloads." + "description": "(Optional) Controls where Terraform installs providers from, such as a network mirror instead of the public registry." }, "credentials": { "type": { "$ref": "#/190" }, "flags": 0, - "description": "Credentials for authenticating to private Terraform registries (HTTP-based, e.g. app.terraform.io). Map of registry hostname to credential configuration. Rendered as native `credentials \"hostname\" {}` blocks in the generated .terraformrc. Note: this is for Terraform CLI registry auth (HTTP), not for Git-based module sources; Git auth is a separate mechanism." + "description": "(Optional) Credentials for authenticating to private Terraform registries such as `app.terraform.io`. Maps a registry hostname to its credential configuration. This authenticates to Terraform CLI registries over HTTP and does not authenticate Git-based module sources, which use a separate mechanism." } } }, @@ -2106,14 +2106,14 @@ "$ref": "#/183" }, "flags": 0, - "description": "Network mirror configuration for downloading providers." + "description": "(Optional) A network mirror to install providers from instead of the public registry." }, "direct": { "type": { "$ref": "#/186" }, "flags": 0, - "description": "Direct provider installation configuration." + "description": "(Optional) Providers to install directly from the public registry rather than a mirror." } } }, @@ -2126,21 +2126,21 @@ "$ref": "#/0" }, "flags": 0, - "description": "The URL of the provider mirror." + "description": "(Optional) The URL of the provider mirror." }, "include": { "type": { "$ref": "#/184" }, "flags": 0, - "description": "Provider address patterns to include from this mirror." + "description": "(Optional) Provider address patterns to include from this mirror." }, "exclude": { "type": { "$ref": "#/185" }, "flags": 0, - "description": "Provider address patterns to exclude from this mirror." + "description": "(Optional) Provider address patterns to exclude from this mirror." } } }, @@ -2165,14 +2165,14 @@ "$ref": "#/187" }, "flags": 0, - "description": "Provider address patterns to include for direct installation." + "description": "(Optional) Provider address patterns to include for direct installation." }, "exclude": { "type": { "$ref": "#/188" }, "flags": 0, - "description": "Provider address patterns to exclude from direct installation." + "description": "(Optional) Provider address patterns to exclude from direct installation." } } }, @@ -2197,7 +2197,7 @@ "$ref": "#/0" }, "flags": 0, - "description": "The ID of a secret resource containing the authentication token. Supported types: Radius.Security/secrets (recommended) or Applications.Core/secretStores. The secret must have a key named 'token'." + "description": "(Optional) The ID of a `Radius.Security/secrets` resource containing the authentication token. The secret must have a key named `token`." } } }, @@ -2226,28 +2226,28 @@ "$ref": "#/201" }, "flags": 2, - "description": "The status of the asynchronous operation." + "description": "(Read Only) The status of the Terraform settings resource within the Radius control plane." }, "referencedBy": { "type": { "$ref": "#/202" }, "flags": 2, - "description": "Environments that reference this Terraform configuration." + "description": "(Read Only) Resource IDs of the Environments that reference this Terraform settings resource." }, "terraformrc": { "type": { "$ref": "#/181" }, "flags": 0, - "description": "Terraform CLI configuration file settings. Maps directly to the Terraform CLI configuration file (.terraformrc)." + "description": "(Optional) Settings for the Terraform CLI configuration file. Radius renders these into a `.terraformrc` file used when running Terraform Recipes." }, "env": { "type": { "$ref": "#/203" }, "flags": 0, - "description": "Environment variables injected during Terraform recipe execution." + "description": "(Optional) Environment variables injected into the Terraform process during Recipe execution." } } }, @@ -2371,28 +2371,28 @@ "$ref": "#/179" }, "flags": 2, - "description": "The status of the asynchronous operation." + "description": "(Read Only) The status of the Terraform settings resource within the Radius control plane." }, "referencedBy": { "type": { "$ref": "#/180" }, "flags": 2, - "description": "Environments that reference this Terraform configuration." + "description": "(Read Only) Resource IDs of the Environments that reference this Terraform settings resource." }, "terraformrc": { "type": { "$ref": "#/181" }, "flags": 2, - "description": "Terraform CLI configuration file settings. Maps directly to the Terraform CLI configuration file (.terraformrc)." + "description": "(Optional) Settings for the Terraform CLI configuration file. Radius renders these into a `.terraformrc` file used when running Terraform Recipes." }, "env": { "type": { "$ref": "#/191" }, "flags": 2, - "description": "Environment variables injected during Terraform recipe execution." + "description": "(Optional) Environment variables injected into the Terraform process during Recipe execution." }, "properties": { "type": { diff --git a/pkg/corerp/api/v20250801preview/zz_generated_bicepsettings_client.go b/pkg/corerp/api/v20250801preview/zz_generated_bicepsettings_client.go index a35725beba..aaa90d453b 100644 --- a/pkg/corerp/api/v20250801preview/zz_generated_bicepsettings_client.go +++ b/pkg/corerp/api/v20250801preview/zz_generated_bicepsettings_client.go @@ -41,7 +41,7 @@ func NewBicepSettingsClient(credential azcore.TokenCredential, options *arm.Clie // If the operation fails it returns an *azcore.ResponseError type. // - rootScope - The scope in which the resource is present. UCP Scope is /planes/{planeType}/{planeName}/resourceGroup/{resourcegroupID} // and Azure resource scope is /subscriptions/{subscriptionID}/resourceGroup/{resourcegroupID} -// - bicepSettingsName - Bicep configuration name +// - bicepSettingsName - Bicep settings name // - resource - Resource create parameters. // - options - BicepSettingsClientCreateOrUpdateOptions contains the optional parameters for the BicepSettingsClient.CreateOrUpdate // method. @@ -103,7 +103,7 @@ func (client *BicepSettingsClient) createOrUpdateHandleResponse(resp *http.Respo // If the operation fails it returns an *azcore.ResponseError type. // - rootScope - The scope in which the resource is present. UCP Scope is /planes/{planeType}/{planeName}/resourceGroup/{resourcegroupID} // and Azure resource scope is /subscriptions/{subscriptionID}/resourceGroup/{resourcegroupID} -// - bicepSettingsName - Bicep configuration name +// - bicepSettingsName - Bicep settings name // - options - BicepSettingsClientDeleteOptions contains the optional parameters for the BicepSettingsClient.Delete method. func (client *BicepSettingsClient) Delete(ctx context.Context, rootScope string, bicepSettingsName string, options *BicepSettingsClientDeleteOptions) (BicepSettingsClientDeleteResponse, error) { var err error @@ -148,7 +148,7 @@ func (client *BicepSettingsClient) deleteCreateRequest(ctx context.Context, root // If the operation fails it returns an *azcore.ResponseError type. // - rootScope - The scope in which the resource is present. UCP Scope is /planes/{planeType}/{planeName}/resourceGroup/{resourcegroupID} // and Azure resource scope is /subscriptions/{subscriptionID}/resourceGroup/{resourcegroupID} -// - bicepSettingsName - Bicep configuration name +// - bicepSettingsName - Bicep settings name // - options - BicepSettingsClientGetOptions contains the optional parameters for the BicepSettingsClient.Get method. func (client *BicepSettingsClient) Get(ctx context.Context, rootScope string, bicepSettingsName string, options *BicepSettingsClientGetOptions) (BicepSettingsClientGetResponse, error) { var err error @@ -258,7 +258,7 @@ func (client *BicepSettingsClient) listByScopeHandleResponse(resp *http.Response // If the operation fails it returns an *azcore.ResponseError type. // - rootScope - The scope in which the resource is present. UCP Scope is /planes/{planeType}/{planeName}/resourceGroup/{resourcegroupID} // and Azure resource scope is /subscriptions/{subscriptionID}/resourceGroup/{resourcegroupID} -// - bicepSettingsName - Bicep configuration name +// - bicepSettingsName - Bicep settings name // - properties - The resource properties to be updated. // - options - BicepSettingsClientUpdateOptions contains the optional parameters for the BicepSettingsClient.Update method. func (client *BicepSettingsClient) Update(ctx context.Context, rootScope string, bicepSettingsName string, properties BicepSettingsResource, options *BicepSettingsClientUpdateOptions) (BicepSettingsClientUpdateResponse, error) { diff --git a/pkg/corerp/api/v20250801preview/zz_generated_models.go b/pkg/corerp/api/v20250801preview/zz_generated_models.go index c1530f80f6..a1b289cd65 100644 --- a/pkg/corerp/api/v20250801preview/zz_generated_models.go +++ b/pkg/corerp/api/v20250801preview/zz_generated_models.go @@ -82,17 +82,60 @@ type ApplicationGraphResponse struct { // ApplicationProperties - Application properties type ApplicationProperties struct { - // REQUIRED; Fully qualified resource ID for the environment that the application is linked to + // REQUIRED; (Required) Fully qualified resource ID of the environment the application is deployed to Environment *string - // READ-ONLY; The status of the asynchronous operation. + // READ-ONLY; (Read Only) The status of the Application resource within the Radius control plane. Does not include the other + // resources that compose the Application. ProvisioningState *ProvisioningState - // READ-ONLY; Status of a resource. + // READ-ONLY; (Read Only) Deployment details for the Application, including any output resources Radius created for it. Status *ResourceStatus } -// ApplicationResource - Radius Application resource +// ApplicationResource - The `Radius.Core/applications` Resource Type represents a Radius Application: a logical grouping +// of the resources that make up a single Application, such as containers, databases, and message queues, along with the connections +// between them. Radius uses the Application to build the application graph, apply shared configuration, and manage its resources +// together throughout their lifecycle. +// ## Defining an Application +// An Application is always deployed to a Radius Environment, which is supplied through the `environment` property. To define +// an Application, add a `Radius.Core/applications` resource to your application definition Bicep file. +// ```bicep +// extension radius +// @description('The Radius Environment ID. Injected automatically by the rad CLI.') +// param environment string +// resource myApp 'Radius.Core/applications@2025-08-01-preview' = { +// name: 'my-app' +// properties: { +// environment: environment +// } +// } +// ``` +// ## Deploying an Application +// An Application is deployed with the `rad deploy` command, which deploys the Application together with the resources that +// belong to it: +// ```bash +// rad deploy ./app.bicep +// ``` +// ## Adding resources to an Application +// Resources are composed into an Application by setting their `application` property to the Application's ID. For example, +// to add a Container to this Application, add the following to the application definition Bicep file and set `application: +// myApp.id`: +// ```bicep +// resource frontend 'Radius.Compute/containers@2025-08-01-preview' = { +// name: 'frontend' +// properties: { +// environment: environment +// application: myApp.id +// containers: { +// frontend: { +// image: 'ghcr.io/my-org/frontend:latest' +// } +// } +// } +// } +// ``` +// For more information, see the Radius documentation at https://docs.radapp.io. type ApplicationResource struct { // REQUIRED; The geo-location where the resource lives Location *string @@ -152,37 +195,94 @@ func (a *AzureContainerInstanceCompute) GetEnvironmentCompute() *EnvironmentComp // BicepRegistryAuthentication - Authentication configuration for a single private Bicep registry. When `authenticationMethod` // is `BasicAuth`, `basicAuthSecretId` is required; the controller rejects configs that omit it. type BicepRegistryAuthentication struct { - // The authentication method to use. Supported values: BasicAuth, AzureWI, AwsIrsa. + // (Optional) How Radius authenticates to the registry. AuthenticationMethod *BicepAuthenticationMethod - // AWS IAM Role ARN for IRSA authentication. Required when authenticationMethod is 'AwsIrsa'. + // (Optional) AWS IAM Role ARN for IRSA authentication. Required when `authenticationMethod` is `AwsIrsa`. AwsIamRoleArn *string - // Azure Workload Identity client ID. Required when authenticationMethod is 'AzureWI'. + // (Optional) Azure Workload Identity client ID. Required when `authenticationMethod` is `AzureWI`. AzureWiClientID *string - // Azure Workload Identity tenant ID. Required when authenticationMethod is 'AzureWI'. + // (Optional) Azure Workload Identity tenant ID. Required when `authenticationMethod` is `AzureWI`. AzureWiTenantID *string - // The ID of a secret resource containing username and password for BasicAuth. Supported types: Radius.Security/secrets (recommended) - // or Applications.Core/secretStores. Required when authenticationMethod is 'BasicAuth'. + // (Optional) The ID of a `Radius.Security/secrets` resource containing the username and password. Required when `authenticationMethod` + // is `BasicAuth`. BasicAuthSecretID *string } -// BicepSettingsProperties - Bicep configuration properties. +// BicepSettingsProperties - Bicep settings properties. type BicepSettingsProperties struct { - // Authentication configuration for private Bicep registries, keyed by registry hostname (e.g. 'corp.acr.io'). The Bicep driver - // looks up credentials by the host parsed from the recipe template path. + // (Optional) Authentication for private Bicep registries that host Recipe templates, keyed by registry hostname such as `corp.acr.io`. + // Radius matches a registry by the hostname in the Recipe source. RegistryAuthentications map[string]*BicepRegistryAuthentication - // READ-ONLY; The status of the asynchronous operation. + // READ-ONLY; (Read Only) The status of the Bicep settings resource within the Radius control plane. ProvisioningState *ProvisioningState - // READ-ONLY; Environments that reference this Bicep configuration. + // READ-ONLY; (Read Only) Resource IDs of the Environments that reference this Bicep settings resource. ReferencedBy []*string } -// BicepSettingsResource - The Bicep configuration resource, providing reusable Bicep recipe settings for environments. +// BicepSettingsResource - The `Radius.Core/bicepSettings` Resource Type holds reusable Bicep engine settings that Environments +// apply when running Bicep Recipes. Its primary use is authenticating to private Bicep registries: OCI registries, such as +// Azure Container Registry, that host the Recipe templates referenced by a Recipe Pack. +// Platform engineers define a `Radius.Core/bicepSettings` resource once and reference it from any Environment whose Recipes +// pull templates from a private registry. +// ## Defining Bicep settings +// Configure `registryAuthentications`, keyed by registry hostname. When a Recipe template is pulled from a matching host, +// Radius authenticates using the configured method. The example below uses basic authentication, reading the username and +// password from a secret: +// ```bicep +// extension radius +// @description('The Radius Environment ID. Injected automatically by the rad CLI.') +// param environment string +// resource registrySecret 'Radius.Security/secrets@2025-08-01-preview' = { +// name: 'registry-credentials' +// properties: { +// environment: environment +// data: { +// username: { value: 'my-username' } +// password: { value: 'my-password' } +// } +// } +// } +// resource bicepRegistry 'Radius.Core/bicepSettings@2025-08-01-preview' = { +// name: 'private-registry' +// properties: { +// registryAuthentications: { +// 'corp.azurecr.io': { +// authenticationMethod: 'BasicAuth' +// basicAuthSecretId: registrySecret.id +// } +// } +// } +// } +// ``` +// Three authentication methods are supported: `BasicAuth` (username and password from a secret), `AwsIrsa` (AWS IAM Roles +// for Service Accounts, using `awsIamRoleArn`), and `AzureWI` (Azure Workload Identity, using `azureWiClientId` and `azureWiTenantId`). +// ## Deploying Bicep settings +// Deploy the settings resource with the `rad deploy` command: +// ```bash +// rad deploy ./bicep-settings.bicep +// ``` +// ## Referencing Bicep settings from an Environment +// Reference the settings from an Environment by setting its `bicepSettings` property to the resource ID. Every Bicep Recipe +// run in that Environment then uses the configured registry authentication: +// ```bicep +// extension radius +// resource bicepRegistry 'Radius.Core/bicepSettings@2025-08-01-preview' existing = { +// name: 'private-registry' +// } +// resource myEnvironment 'Radius.Core/environments@2025-08-01-preview' = { +// name: 'my-environment' +// properties: { +// bicepSettings: bicepRegistry.id +// } +// } +// ``` +// For more information, see the Radius documentation at https://docs.radapp.io. type BicepSettingsResource struct { // REQUIRED; The geo-location where the resource lives Location *string @@ -232,29 +332,122 @@ func (e *EnvironmentCompute) GetEnvironmentCompute() *EnvironmentCompute { retur // EnvironmentProperties - Environment properties type EnvironmentProperties struct { - // Resource ID of a Radius.Core/bicepSettings resource providing Bicep recipe settings. + // (Optional) Resource ID of a `Radius.Core/bicepSettings` resource that supplies Bicep engine settings, such as private registry + // authentication, used when running Bicep Recipes in this Environment. BicepSettings *string - // Cloud provider configuration for the environment. + // (Optional) Target compute platform and cloud provider accounts that resources are deployed into. Defaults to Kubernetes + // in the `default` namespace if not specified. Providers *Providers - // List of Recipe Pack resource IDs linked to this environment. + // (Optional) Resource IDs of the Recipe Packs this Environment uses to provision infrastructure for application resources. + // Defaults to the `default` Recipe Pack in the `default` resource group if not specified. RecipePacks []*string - // Recipe specific parameters that apply to all resources of a given type in this environment. + // (Optional) Parameters passed to Recipes when they run, keyed by resource type. Values here override the default parameters + // defined in the Recipe Pack for every resource of that type deployed to this Environment. RecipeParameters map[string]*RecipeParameterValue - // Simulated environment. + // (Optional) When true, the Environment is simulated and does not deploy real infrastructure. Recipes are evaluated but no + // resources are provisioned, which is useful for validating application definitions. Defaults to `false` if not specified. Simulated *bool - // Resource ID of a Radius.Core/terraformSettings resource providing Terraform recipe settings. + // (Optional) Resource ID of a `Radius.Core/terraformSettings` resource that supplies Terraform CLI settings, such as private + // registry credentials, used when running Terraform Recipes in this Environment. TerraformSettings *string - // READ-ONLY; The status of the asynchronous operation. + // READ-ONLY; (Read Only) The status of the Environment resource within the Radius control plane. Does not include the resources + // deployed to the Environment. ProvisioningState *ProvisioningState } -// EnvironmentResource - The environment resource +// EnvironmentResource - The `Radius.Core/environments` Resource Type represents a Radius Environment: the deployment target +// that platform engineers configure for their developers. Every Radius Application is deployed to an Environment through +// its `environment` property. +// An Environment defines three things for the Applications deployed to it: +// - **Where resources are deployed**: the target compute platform and cloud provider accounts, set through the `providers` +// property. +// - **Which Recipes are used**: the Recipe Packs whose Recipes provision the infrastructure backing application resources, +// set through the `recipePacks` property. +// - **Advanced Terraform and Bicep settings**: environment-wide Recipe parameters and Terraform or Bicep engine configuration +// applied when Recipes run. +// ## Defining an Environment +// The simplest Environment can be created directly with the `rad environment create` command, without a Bicep file: +// ```bash +// rad environment create my-environment +// ``` +// For more advanced configurations, define an Environment as a `Radius.Core/environments` resource in a Bicep file. For example: +// ```bicep +// extension radius +// resource myEnvironment 'Radius.Core/environments@2025-08-01-preview' = { +// name: 'my-environment' +// properties: { +// recipePacks: [ +// myRecipePack.id +// ] +// providers: { +// kubernetes: { +// namespace: 'my-namespace' +// } +// } +// } +// } +// resource myRecipePack 'Radius.Core/recipePacks@2025-08-01-preview' existing = { +// name: 'my-recipe-pack' +// } +// ``` +// Both properties have defaults. If `providers` is omitted, resources are deployed to Kubernetes in the `default` namespace. +// If `recipePacks` is omitted, the Environment uses the `default` Recipe Pack in the `default` resource group. +// ## Deploying an Environment +// Deploy a defined Environment with the `rad deploy` command: +// ```bash +// rad deploy ./environment.bicep +// ``` +// ## Cloud providers +// By default an Environment deploys to Kubernetes. To deploy cloud resources, configure the `providers` property with your +// cloud account. For AWS, set the account ID and region: +// ```bicep +// extension radius +// resource myEnvironment 'Radius.Core/environments@2025-08-01-preview' = { +// name: 'my-environment' +// properties: { +// providers: { +// aws: { +// accountId: '123456789012' +// region: 'us-west-2' +// } +// } +// } +// } +// ``` +// For Azure, set the subscription and resource group that resources are deployed into: +// ```bicep +// extension radius +// resource myEnvironment 'Radius.Core/environments@2025-08-01-preview' = { +// name: 'my-environment' +// properties: { +// providers: { +// azure: { +// subscriptionId: '00000000-0000-0000-0000-000000000000' +// resourceGroupName: 'my-resource-group' +// } +// } +// } +// } +// ``` +// The `providers` property selects the target account, but the credentials Radius uses to authenticate to AWS and Azure are +// configured separately with the `rad credential register` command. +// ## Recipe Packs +// A Recipe Pack is a collection of Recipes, defined as a separate `Radius.Core/recipePacks` resource. A Recipe is an infrastructure-as-code +// module, a Terraform module or Bicep template, that provisions the infrastructure backing an application resource. Reference +// one or more Recipe Packs by their resource IDs in the `recipePacks` property to control which Recipes are used. See the +// `Radius.Core/recipePacks` documentation for details. +// Use `recipeParameters` to pass environment-specific parameters to the Recipes defined in the referenced Recipe Packs, for +// example to standardize configuration such as SKUs or instance sizes across an Environment. +// ## Advanced Terraform and Bicep settings +// For advanced Terraform and Bicep settings, such as private module sources and registry authentication, reference a `Radius.Core/terraformSettings` +// or `Radius.Core/bicepSettings` resource from the `terraformSettings` and `bicepSettings` properties. +// For more information, see the Radius documentation at https://docs.radapp.io. type EnvironmentResource struct { // REQUIRED; The geo-location where the resource lives Location *string @@ -398,79 +591,158 @@ type OutputResource struct { } type Providers struct { - // The AWS cloud provider configuration. + // (Optional) Configuration for deploying resources to AWS. Aws *ProvidersAws - // The Azure cloud provider configuration. + // (Optional) Configuration for deploying resources to Azure. Azure *ProvidersAzure - // The Kubernetes provider configuration. + // (Optional) Configuration for deploying resources to Kubernetes. Kubernetes *ProvidersKubernetes } // ProvidersAws - The AWS cloud provider definition. type ProvidersAws struct { - // REQUIRED; AWS account ID for AWS resources to be deployed into. + // REQUIRED; (Required) ID of the AWS account that resources are deployed into. AccountID *string - // REQUIRED; AWS region for AWS resources to be deployed into. + // REQUIRED; (Required) AWS region that resources are deployed into. Region *string } // ProvidersAzure - The Azure cloud provider definition. type ProvidersAzure struct { - // REQUIRED; Azure subscription ID hosting deployed resources. + // REQUIRED; (Required) ID of the Azure subscription that resources are deployed into. SubscriptionID *string - // External identity settings (moved from compute). + // (Optional) Managed or workload identity Radius uses to authenticate to Azure when deploying resources. Identity *IdentitySettings - // Optional resource group name. + // (Optional) Name of the Azure resource group that resources are deployed into. Most Bicep and Terraform Recipes expect a + // resource group in the deployment context, so set this whenever deploying Azure resources. ResourceGroupName *string } type ProvidersKubernetes struct { - // REQUIRED; Kubernetes namespace to deploy workloads into. + // REQUIRED; (Required) Kubernetes namespace that workloads are deployed into. Namespace *string } // RecipeDefinition - Recipe definition for a specific resource type type RecipeDefinition struct { - // REQUIRED; The type of recipe (e.g., Terraform, Bicep) + // REQUIRED; (Required) The kind of Recipe, which determines how Radius runs it. Kind *RecipeKind - // REQUIRED; The source of the recipe. For Bicep recipes this is the OCI registry reference. For Terraform recipes this is - // the module source. + // REQUIRED; (Required) Location of the Recipe. For Bicep Recipes this is an OCI registry reference. For Terraform Recipes + // this is the module source such as a Git URL or a Terraform registry module. Source *string - // Maps the module's outputs onto the resource type's properties, for recipes that point directly at a Bicep or Terraform - // module. Each entry's value is either a string (the module output name for a non-secret property) or, under the reserved - // `secrets` key, a nested object mapping secret property names to module output names. A `secrets` entry always routes its - // module output to the resource's secret outputs regardless of how the module classified it (for example an AVM module's - // `primaryConnectionString`). Example: `{ host: 'name', secrets: { connectionString: 'primaryConnectionString' } }`. + // (Optional) Maps the module outputs onto the resource type properties for recipes that point directly at a Bicep or Terraform + // module. Each value is the module output name for a non-secret property. Under the reserved `secrets` key a nested object + // maps secret property names to module output names and always routes those outputs to the resource secret outputs. Outputs map[string]any - // Parameters to pass to the recipe + // (Optional) Default parameter values passed to the Recipe when it runs. An Environment can override these per resource type + // through its `recipeParameters` property. Parameters map[string]any - // Connect to the source using HTTP (not HTTPS). This should be used when the source is known not to support HTTPS, for example - // in a locally hosted registry for Bicep recipes. Defaults to false (use HTTPS/TLS) + // (Optional) Connect to the source using HTTP instead of HTTPS. Use this only when the source does not support HTTPS such + // as a locally hosted registry for Bicep recipes. Defaults to `false` if not specified. PlainHTTP *bool } // RecipePackProperties - Recipe Pack properties type RecipePackProperties struct { - // REQUIRED; Map of resource types to their recipe configurations + // REQUIRED; (Required) The Recipes in this pack, keyed by the resource type each Recipe provisions. Each key is a resource + // type such as `Radius.Data/redisCaches`. Recipes map[string]*RecipeDefinition - // READ-ONLY; The status of the asynchronous operation + // READ-ONLY; (Read Only) The status of the Recipe Pack resource within the Radius control plane. ProvisioningState *ProvisioningState - // READ-ONLY; List of environment IDs that reference this recipe pack + // READ-ONLY; (Read Only) Resource IDs of the Environments that reference this Recipe Pack. ReferencedBy []*string } -// RecipePackResource - The recipe pack resource +// RecipePackResource - The `Radius.Core/recipePacks` Resource Type represents a Recipe Pack: a named collection of Recipes +// that platform engineers assign to an Environment. A Recipe maps a resource type (such as `Radius.Data/redisCaches`) to +// an infrastructure-as-code module, a Terraform module or Bicep template, that provisions the infrastructure backing that +// resource when a developer deploys it. +// A Recipe Pack is defined as its own resource and referenced from an Environment's `recipePacks` property, so one Recipe +// Pack can be shared across many Environments. +// ## Defining a Recipe Pack +// Each entry in the `recipes` map is keyed by resource type. Set the recipe `kind` (`bicep` or `terraform`) and its `source` +// (an OCI registry reference for Bicep recipes, or a module source for Terraform recipes). +// ```bicep +// extension radius +// resource dataRecipes 'Radius.Core/recipePacks@2025-08-01-preview' = { +// name: 'data-recipes' +// properties: { +// recipes: { +// 'Radius.Data/redisCaches': { +// kind: 'bicep' +// source: 'ghcr.io/my-org/recipes/redis:latest' +// } +// 'Radius.Data/postgreSqlDatabases': { +// kind: 'terraform' +// source: 'git::https://github.com/my-org/recipes//postgresql' +// } +// } +// } +// } +// ``` +// ## Recipe parameters +// Each Recipe can declare default `parameters` that are passed to its module. Platform engineers set baseline values here, +// and developers get them automatically. An Environment can override these values per resource type through its `recipeParameters` +// property. +// ```bicep +// resource dataRecipes 'Radius.Core/recipePacks@2025-08-01-preview' = { +// name: 'data-recipes' +// properties: { +// recipes: { +// 'Radius.Data/redisCaches': { +// kind: 'bicep' +// source: 'ghcr.io/my-org/recipes/redis:latest' +// parameters: { +// sku: 'Standard' +// capacity: 1 +// } +// } +// } +// } +// } +// ``` +// ## Deploying a Recipe Pack +// Deploy the Bicep file with `rad deploy` to create the Recipe Pack resource. Once deployed, list and inspect Recipe Packs +// with the `rad recipe-pack list` and `rad recipe-pack show` commands. +// ## Referencing a Recipe Pack from an Environment +// An Environment references a Recipe Pack through its `recipePacks` property. When the Recipe Pack and the Environment are +// deployed to the same resource group, declare it as an `existing` resource and reference its `.id`: +// ```bicep +// extension radius +// resource dataRecipes 'Radius.Core/recipePacks@2025-08-01-preview' existing = { +// name: 'data-recipes' +// } +// resource myEnvironment 'Radius.Core/environments@2025-08-01-preview' = { +// name: 'my-environment' +// properties: { +// recipePacks: [ +// dataRecipes.id +// ] +// } +// } +// ``` +// To reference a Recipe Pack in a different resource group, use its full resource ID instead: +// ```bicep +// recipePacks: [ +// '/planes/radius/local/resourceGroups/shared/providers/Radius.Core/recipePacks/data-recipes' +// ] +// ``` +// Radius is installed with a `default` Recipe Pack in the `default` resource group, which an Environment uses when `recipePacks` +// is not set. +// Prebuilt Recipe Packs and the Recipes they reference are published in the [resource-types-contrib](https://github.com/radius-project/resource-types-contrib) +// repository. +// For more information, see the Radius documentation at https://docs.radapp.io. type RecipePackResource struct { // REQUIRED; The geo-location where the resource lives Location *string @@ -555,57 +827,150 @@ type SystemData struct { // TerraformCredentialConfig - Credential configuration for a Terraform registry or module source host. type TerraformCredentialConfig struct { - // The ID of a secret resource containing the authentication token. Supported types: Radius.Security/secrets (recommended) - // or Applications.Core/secretStores. The secret must have a key named 'token'. + // (Optional) The ID of a `Radius.Security/secrets` resource containing the authentication token. The secret must have a key + // named `token`. Secret *string } // TerraformProviderDirect - Direct provider installation configuration. type TerraformProviderDirect struct { - // Provider address patterns to exclude from direct installation. + // (Optional) Provider address patterns to exclude from direct installation. Exclude []*string - // Provider address patterns to include for direct installation. + // (Optional) Provider address patterns to include for direct installation. Include []*string } // TerraformProviderInstallation - Provider installation configuration for Terraform CLI. type TerraformProviderInstallation struct { - // Direct provider installation configuration. + // (Optional) Providers to install directly from the public registry rather than a mirror. Direct *TerraformProviderDirect - // Network mirror configuration for downloading providers. + // (Optional) A network mirror to install providers from instead of the public registry. NetworkMirror *TerraformProviderMirror } // TerraformProviderMirror - Network mirror configuration for Terraform providers. type TerraformProviderMirror struct { - // Provider address patterns to exclude from this mirror. + // (Optional) Provider address patterns to exclude from this mirror. Exclude []*string - // Provider address patterns to include from this mirror. + // (Optional) Provider address patterns to include from this mirror. Include []*string - // The URL of the provider mirror. + // (Optional) The URL of the provider mirror. URL *string } -// TerraformSettingsProperties - Terraform configuration properties. +// TerraformSettingsProperties - Terraform settings properties. type TerraformSettingsProperties struct { - // Environment variables injected during Terraform recipe execution. + // (Optional) Environment variables injected into the Terraform process during Recipe execution. Env map[string]*string - // Terraform CLI configuration file settings. Maps directly to the Terraform CLI configuration file (.terraformrc). + // (Optional) Settings for the Terraform CLI configuration file. Radius renders these into a `.terraformrc` file used when + // running Terraform Recipes. Terraformrc *TerraformrcConfig - // READ-ONLY; The status of the asynchronous operation. + // READ-ONLY; (Read Only) The status of the Terraform settings resource within the Radius control plane. ProvisioningState *ProvisioningState - // READ-ONLY; Environments that reference this Terraform configuration. + // READ-ONLY; (Read Only) Resource IDs of the Environments that reference this Terraform settings resource. ReferencedBy []*string } -// TerraformSettingsResource - The Terraform configuration resource, providing reusable Terraform recipe settings for environments. +// TerraformSettingsResource - The `Radius.Core/terraformSettings` Resource Type holds reusable Terraform CLI settings that +// Environments apply when running Terraform Recipes. Its primary use is authenticating to private Terraform registries that +// host the modules referenced by a Recipe Pack, along with configuring provider installation and injecting environment variables +// during Recipe execution. +// Platform engineers define a `Radius.Core/terraformSettings` resource once and reference it from any Environment whose Recipes +// pull modules from a private registry. +// ## Defining Terraform settings +// Configure `terraformrc.credentials`, keyed by registry hostname, to authenticate to a private Terraform registry. Each +// entry points to a secret whose `token` key holds the registry token: +// ```bicep +// extension radius +// @description('The Radius Environment ID. Injected automatically by the rad CLI.') +// param environment string +// resource registrySecret 'Radius.Security/secrets@2025-08-01-preview' = { +// name: 'terraform-registry-token' +// properties: { +// environment: environment +// data: { +// token: { value: 'my-registry-token' } +// } +// } +// } +// resource terraformRegistry 'Radius.Core/terraformSettings@2025-08-01-preview' = { +// name: 'private-registry' +// properties: { +// terraformrc: { +// credentials: { +// 'app.terraform.io': { +// secret: registrySecret.id +// } +// } +// } +// } +// } +// ``` +// Two other settings are available: provider installation and environment variables. +// ### Provider installation +// In air-gapped or internal environments, use `terraformrc.providerInstallation` to install providers from a network mirror +// instead of the public registry. Set the mirror `url`, optionally narrow it with `include` or `exclude` provider address +// patterns, and use `direct` to control which providers are still downloaded directly: +// ```bicep +// resource providerMirror 'Radius.Core/terraformSettings@2025-08-01-preview' = { +// name: 'internal-mirror' +// properties: { +// terraformrc: { +// providerInstallation: { +// networkMirror: { +// url: 'https://terraform.corp.example.com/providers/' +// include: ['*'] +// } +// direct: { +// exclude: ['*'] +// } +// } +// } +// } +// } +// ``` +// ### Environment variables +// Use `env` to inject environment variables into every Terraform Recipe run, for example to raise the Terraform log level +// for troubleshooting or to tune CLI behavior: +// ```bicep +// resource terraformLogging 'Radius.Core/terraformSettings@2025-08-01-preview' = { +// name: 'terraform-logging' +// properties: { +// env: { +// TF_LOG: 'TRACE' +// TF_REGISTRY_CLIENT_TIMEOUT: '15' +// } +// } +// } +// ``` +// ## Deploying Terraform settings +// Deploy the settings resource with the `rad deploy` command: +// ```bash +// rad deploy ./terraform-settings.bicep +// ``` +// ## Referencing Terraform settings from an Environment +// Reference the settings from an Environment by setting its `terraformSettings` property to the resource ID. Every Terraform +// Recipe run in that Environment then uses the configured registry credentials: +// ```bicep +// extension radius +// resource terraformRegistry 'Radius.Core/terraformSettings@2025-08-01-preview' existing = { +// name: 'private-registry' +// } +// resource myEnvironment 'Radius.Core/environments@2025-08-01-preview' = { +// name: 'my-environment' +// properties: { +// terraformSettings: terraformRegistry.id +// } +// } +// ``` +// For more information, see the Radius documentation at https://docs.radapp.io. type TerraformSettingsResource struct { // REQUIRED; The geo-location where the resource lives Location *string @@ -641,11 +1006,11 @@ type TerraformSettingsResourceListResult struct { // TerraformrcConfig - Terraform CLI configuration file (.terraformrc) settings. See https://developer.hashicorp.com/terraform/cli/config // for details. type TerraformrcConfig struct { - // Credentials for authenticating to private Terraform registries (HTTP-based, e.g. app.terraform.io). Map of registry hostname - // to credential configuration. Rendered as native `credentials "hostname" {}` blocks in the generated .terraformrc. Note: - // this is for Terraform CLI registry auth (HTTP), not for Git-based module sources; Git auth is a separate mechanism. + // (Optional) Credentials for authenticating to private Terraform registries such as `app.terraform.io`. Maps a registry hostname + // to its credential configuration. This authenticates to Terraform CLI registries over HTTP and does not authenticate Git-based + // module sources, which use a separate mechanism. Credentials map[string]*TerraformCredentialConfig - // Provider installation configuration. Specifies the location of providers via network mirrors or direct downloads. + // (Optional) Controls where Terraform installs providers from, such as a network mirror instead of the public registry. ProviderInstallation *TerraformProviderInstallation } diff --git a/pkg/corerp/api/v20250801preview/zz_generated_responses.go b/pkg/corerp/api/v20250801preview/zz_generated_responses.go index 9c3afc17c0..b16de9389c 100644 --- a/pkg/corerp/api/v20250801preview/zz_generated_responses.go +++ b/pkg/corerp/api/v20250801preview/zz_generated_responses.go @@ -5,7 +5,49 @@ package v20250801preview // ApplicationsClientCreateOrUpdateResponse contains the response from method ApplicationsClient.CreateOrUpdate. type ApplicationsClientCreateOrUpdateResponse struct { - // Radius Application resource + // The `Radius.Core/applications` Resource Type represents a Radius Application: a logical grouping of the resources that + // make up a single Application, such as containers, databases, and message queues, along with the connections between them. + // Radius uses the Application to build the application graph, apply shared configuration, and manage its resources together + // throughout their lifecycle. + // ## Defining an Application + // An Application is always deployed to a Radius Environment, which is supplied through the `environment` property. To define + // an Application, add a `Radius.Core/applications` resource to your application definition Bicep file. + // ```bicep + // extension radius + // @description('The Radius Environment ID. Injected automatically by the rad CLI.') + // param environment string + // resource myApp 'Radius.Core/applications@2025-08-01-preview' = { + // name: 'my-app' + // properties: { + // environment: environment + // } + // } + // ``` + // ## Deploying an Application + // An Application is deployed with the `rad deploy` command, which deploys the Application together with the resources that + // belong to it: + // ```bash + // rad deploy ./app.bicep + // ``` + // ## Adding resources to an Application + // Resources are composed into an Application by setting their `application` property to the Application's ID. For example, + // to add a Container to this Application, add the following to the application definition Bicep file and set `application: + // myApp.id`: + // ```bicep + // resource frontend 'Radius.Compute/containers@2025-08-01-preview' = { + // name: 'frontend' + // properties: { + // environment: environment + // application: myApp.id + // containers: { + // frontend: { + // image: 'ghcr.io/my-org/frontend:latest' + // } + // } + // } + // } + // ``` + // For more information, see the Radius documentation at https://docs.radapp.io. ApplicationResource } @@ -22,7 +64,49 @@ type ApplicationsClientGetGraphResponse struct { // ApplicationsClientGetResponse contains the response from method ApplicationsClient.Get. type ApplicationsClientGetResponse struct { - // Radius Application resource + // The `Radius.Core/applications` Resource Type represents a Radius Application: a logical grouping of the resources that + // make up a single Application, such as containers, databases, and message queues, along with the connections between them. + // Radius uses the Application to build the application graph, apply shared configuration, and manage its resources together + // throughout their lifecycle. + // ## Defining an Application + // An Application is always deployed to a Radius Environment, which is supplied through the `environment` property. To define + // an Application, add a `Radius.Core/applications` resource to your application definition Bicep file. + // ```bicep + // extension radius + // @description('The Radius Environment ID. Injected automatically by the rad CLI.') + // param environment string + // resource myApp 'Radius.Core/applications@2025-08-01-preview' = { + // name: 'my-app' + // properties: { + // environment: environment + // } + // } + // ``` + // ## Deploying an Application + // An Application is deployed with the `rad deploy` command, which deploys the Application together with the resources that + // belong to it: + // ```bash + // rad deploy ./app.bicep + // ``` + // ## Adding resources to an Application + // Resources are composed into an Application by setting their `application` property to the Application's ID. For example, + // to add a Container to this Application, add the following to the application definition Bicep file and set `application: + // myApp.id`: + // ```bicep + // resource frontend 'Radius.Compute/containers@2025-08-01-preview' = { + // name: 'frontend' + // properties: { + // environment: environment + // application: myApp.id + // containers: { + // frontend: { + // image: 'ghcr.io/my-org/frontend:latest' + // } + // } + // } + // } + // ``` + // For more information, see the Radius documentation at https://docs.radapp.io. ApplicationResource } @@ -34,13 +118,112 @@ type ApplicationsClientListByScopeResponse struct { // ApplicationsClientUpdateResponse contains the response from method ApplicationsClient.Update. type ApplicationsClientUpdateResponse struct { - // Radius Application resource + // The `Radius.Core/applications` Resource Type represents a Radius Application: a logical grouping of the resources that + // make up a single Application, such as containers, databases, and message queues, along with the connections between them. + // Radius uses the Application to build the application graph, apply shared configuration, and manage its resources together + // throughout their lifecycle. + // ## Defining an Application + // An Application is always deployed to a Radius Environment, which is supplied through the `environment` property. To define + // an Application, add a `Radius.Core/applications` resource to your application definition Bicep file. + // ```bicep + // extension radius + // @description('The Radius Environment ID. Injected automatically by the rad CLI.') + // param environment string + // resource myApp 'Radius.Core/applications@2025-08-01-preview' = { + // name: 'my-app' + // properties: { + // environment: environment + // } + // } + // ``` + // ## Deploying an Application + // An Application is deployed with the `rad deploy` command, which deploys the Application together with the resources that + // belong to it: + // ```bash + // rad deploy ./app.bicep + // ``` + // ## Adding resources to an Application + // Resources are composed into an Application by setting their `application` property to the Application's ID. For example, + // to add a Container to this Application, add the following to the application definition Bicep file and set `application: + // myApp.id`: + // ```bicep + // resource frontend 'Radius.Compute/containers@2025-08-01-preview' = { + // name: 'frontend' + // properties: { + // environment: environment + // application: myApp.id + // containers: { + // frontend: { + // image: 'ghcr.io/my-org/frontend:latest' + // } + // } + // } + // } + // ``` + // For more information, see the Radius documentation at https://docs.radapp.io. ApplicationResource } // BicepSettingsClientCreateOrUpdateResponse contains the response from method BicepSettingsClient.CreateOrUpdate. type BicepSettingsClientCreateOrUpdateResponse struct { - // The Bicep configuration resource, providing reusable Bicep recipe settings for environments. + // The `Radius.Core/bicepSettings` Resource Type holds reusable Bicep engine settings that Environments apply when running + // Bicep Recipes. Its primary use is authenticating to private Bicep registries: OCI registries, such as Azure Container Registry, + // that host the Recipe templates referenced by a Recipe Pack. + // Platform engineers define a `Radius.Core/bicepSettings` resource once and reference it from any Environment whose Recipes + // pull templates from a private registry. + // ## Defining Bicep settings + // Configure `registryAuthentications`, keyed by registry hostname. When a Recipe template is pulled from a matching host, + // Radius authenticates using the configured method. The example below uses basic authentication, reading the username and + // password from a secret: + // ```bicep + // extension radius + // @description('The Radius Environment ID. Injected automatically by the rad CLI.') + // param environment string + // resource registrySecret 'Radius.Security/secrets@2025-08-01-preview' = { + // name: 'registry-credentials' + // properties: { + // environment: environment + // data: { + // username: { value: 'my-username' } + // password: { value: 'my-password' } + // } + // } + // } + // resource bicepRegistry 'Radius.Core/bicepSettings@2025-08-01-preview' = { + // name: 'private-registry' + // properties: { + // registryAuthentications: { + // 'corp.azurecr.io': { + // authenticationMethod: 'BasicAuth' + // basicAuthSecretId: registrySecret.id + // } + // } + // } + // } + // ``` + // Three authentication methods are supported: `BasicAuth` (username and password from a secret), `AwsIrsa` (AWS IAM Roles + // for Service Accounts, using `awsIamRoleArn`), and `AzureWI` (Azure Workload Identity, using `azureWiClientId` and `azureWiTenantId`). + // ## Deploying Bicep settings + // Deploy the settings resource with the `rad deploy` command: + // ```bash + // rad deploy ./bicep-settings.bicep + // ``` + // ## Referencing Bicep settings from an Environment + // Reference the settings from an Environment by setting its `bicepSettings` property to the resource ID. Every Bicep Recipe + // run in that Environment then uses the configured registry authentication: + // ```bicep + // extension radius + // resource bicepRegistry 'Radius.Core/bicepSettings@2025-08-01-preview' existing = { + // name: 'private-registry' + // } + // resource myEnvironment 'Radius.Core/environments@2025-08-01-preview' = { + // name: 'my-environment' + // properties: { + // bicepSettings: bicepRegistry.id + // } + // } + // ``` + // For more information, see the Radius documentation at https://docs.radapp.io. BicepSettingsResource } @@ -51,7 +234,64 @@ type BicepSettingsClientDeleteResponse struct { // BicepSettingsClientGetResponse contains the response from method BicepSettingsClient.Get. type BicepSettingsClientGetResponse struct { - // The Bicep configuration resource, providing reusable Bicep recipe settings for environments. + // The `Radius.Core/bicepSettings` Resource Type holds reusable Bicep engine settings that Environments apply when running + // Bicep Recipes. Its primary use is authenticating to private Bicep registries: OCI registries, such as Azure Container Registry, + // that host the Recipe templates referenced by a Recipe Pack. + // Platform engineers define a `Radius.Core/bicepSettings` resource once and reference it from any Environment whose Recipes + // pull templates from a private registry. + // ## Defining Bicep settings + // Configure `registryAuthentications`, keyed by registry hostname. When a Recipe template is pulled from a matching host, + // Radius authenticates using the configured method. The example below uses basic authentication, reading the username and + // password from a secret: + // ```bicep + // extension radius + // @description('The Radius Environment ID. Injected automatically by the rad CLI.') + // param environment string + // resource registrySecret 'Radius.Security/secrets@2025-08-01-preview' = { + // name: 'registry-credentials' + // properties: { + // environment: environment + // data: { + // username: { value: 'my-username' } + // password: { value: 'my-password' } + // } + // } + // } + // resource bicepRegistry 'Radius.Core/bicepSettings@2025-08-01-preview' = { + // name: 'private-registry' + // properties: { + // registryAuthentications: { + // 'corp.azurecr.io': { + // authenticationMethod: 'BasicAuth' + // basicAuthSecretId: registrySecret.id + // } + // } + // } + // } + // ``` + // Three authentication methods are supported: `BasicAuth` (username and password from a secret), `AwsIrsa` (AWS IAM Roles + // for Service Accounts, using `awsIamRoleArn`), and `AzureWI` (Azure Workload Identity, using `azureWiClientId` and `azureWiTenantId`). + // ## Deploying Bicep settings + // Deploy the settings resource with the `rad deploy` command: + // ```bash + // rad deploy ./bicep-settings.bicep + // ``` + // ## Referencing Bicep settings from an Environment + // Reference the settings from an Environment by setting its `bicepSettings` property to the resource ID. Every Bicep Recipe + // run in that Environment then uses the configured registry authentication: + // ```bicep + // extension radius + // resource bicepRegistry 'Radius.Core/bicepSettings@2025-08-01-preview' existing = { + // name: 'private-registry' + // } + // resource myEnvironment 'Radius.Core/environments@2025-08-01-preview' = { + // name: 'my-environment' + // properties: { + // bicepSettings: bicepRegistry.id + // } + // } + // ``` + // For more information, see the Radius documentation at https://docs.radapp.io. BicepSettingsResource } @@ -63,13 +303,155 @@ type BicepSettingsClientListByScopeResponse struct { // BicepSettingsClientUpdateResponse contains the response from method BicepSettingsClient.Update. type BicepSettingsClientUpdateResponse struct { - // The Bicep configuration resource, providing reusable Bicep recipe settings for environments. + // The `Radius.Core/bicepSettings` Resource Type holds reusable Bicep engine settings that Environments apply when running + // Bicep Recipes. Its primary use is authenticating to private Bicep registries: OCI registries, such as Azure Container Registry, + // that host the Recipe templates referenced by a Recipe Pack. + // Platform engineers define a `Radius.Core/bicepSettings` resource once and reference it from any Environment whose Recipes + // pull templates from a private registry. + // ## Defining Bicep settings + // Configure `registryAuthentications`, keyed by registry hostname. When a Recipe template is pulled from a matching host, + // Radius authenticates using the configured method. The example below uses basic authentication, reading the username and + // password from a secret: + // ```bicep + // extension radius + // @description('The Radius Environment ID. Injected automatically by the rad CLI.') + // param environment string + // resource registrySecret 'Radius.Security/secrets@2025-08-01-preview' = { + // name: 'registry-credentials' + // properties: { + // environment: environment + // data: { + // username: { value: 'my-username' } + // password: { value: 'my-password' } + // } + // } + // } + // resource bicepRegistry 'Radius.Core/bicepSettings@2025-08-01-preview' = { + // name: 'private-registry' + // properties: { + // registryAuthentications: { + // 'corp.azurecr.io': { + // authenticationMethod: 'BasicAuth' + // basicAuthSecretId: registrySecret.id + // } + // } + // } + // } + // ``` + // Three authentication methods are supported: `BasicAuth` (username and password from a secret), `AwsIrsa` (AWS IAM Roles + // for Service Accounts, using `awsIamRoleArn`), and `AzureWI` (Azure Workload Identity, using `azureWiClientId` and `azureWiTenantId`). + // ## Deploying Bicep settings + // Deploy the settings resource with the `rad deploy` command: + // ```bash + // rad deploy ./bicep-settings.bicep + // ``` + // ## Referencing Bicep settings from an Environment + // Reference the settings from an Environment by setting its `bicepSettings` property to the resource ID. Every Bicep Recipe + // run in that Environment then uses the configured registry authentication: + // ```bicep + // extension radius + // resource bicepRegistry 'Radius.Core/bicepSettings@2025-08-01-preview' existing = { + // name: 'private-registry' + // } + // resource myEnvironment 'Radius.Core/environments@2025-08-01-preview' = { + // name: 'my-environment' + // properties: { + // bicepSettings: bicepRegistry.id + // } + // } + // ``` + // For more information, see the Radius documentation at https://docs.radapp.io. BicepSettingsResource } // EnvironmentsClientCreateOrUpdateResponse contains the response from method EnvironmentsClient.CreateOrUpdate. type EnvironmentsClientCreateOrUpdateResponse struct { - // The environment resource + // The `Radius.Core/environments` Resource Type represents a Radius Environment: the deployment target that platform engineers + // configure for their developers. Every Radius Application is deployed to an Environment through its `environment` property. + // An Environment defines three things for the Applications deployed to it: + // - **Where resources are deployed**: the target compute platform and cloud provider accounts, set through the `providers` + // property. + // - **Which Recipes are used**: the Recipe Packs whose Recipes provision the infrastructure backing application resources, + // set through the `recipePacks` property. + // - **Advanced Terraform and Bicep settings**: environment-wide Recipe parameters and Terraform or Bicep engine configuration + // applied when Recipes run. + // ## Defining an Environment + // The simplest Environment can be created directly with the `rad environment create` command, without a Bicep file: + // ```bash + // rad environment create my-environment + // ``` + // For more advanced configurations, define an Environment as a `Radius.Core/environments` resource in a Bicep file. For example: + // ```bicep + // extension radius + // resource myEnvironment 'Radius.Core/environments@2025-08-01-preview' = { + // name: 'my-environment' + // properties: { + // recipePacks: [ + // myRecipePack.id + // ] + // providers: { + // kubernetes: { + // namespace: 'my-namespace' + // } + // } + // } + // } + // resource myRecipePack 'Radius.Core/recipePacks@2025-08-01-preview' existing = { + // name: 'my-recipe-pack' + // } + // ``` + // Both properties have defaults. If `providers` is omitted, resources are deployed to Kubernetes in the `default` namespace. + // If `recipePacks` is omitted, the Environment uses the `default` Recipe Pack in the `default` resource group. + // ## Deploying an Environment + // Deploy a defined Environment with the `rad deploy` command: + // ```bash + // rad deploy ./environment.bicep + // ``` + // ## Cloud providers + // By default an Environment deploys to Kubernetes. To deploy cloud resources, configure the `providers` property with your + // cloud account. For AWS, set the account ID and region: + // ```bicep + // extension radius + // resource myEnvironment 'Radius.Core/environments@2025-08-01-preview' = { + // name: 'my-environment' + // properties: { + // providers: { + // aws: { + // accountId: '123456789012' + // region: 'us-west-2' + // } + // } + // } + // } + // ``` + // For Azure, set the subscription and resource group that resources are deployed into: + // ```bicep + // extension radius + // resource myEnvironment 'Radius.Core/environments@2025-08-01-preview' = { + // name: 'my-environment' + // properties: { + // providers: { + // azure: { + // subscriptionId: '00000000-0000-0000-0000-000000000000' + // resourceGroupName: 'my-resource-group' + // } + // } + // } + // } + // ``` + // The `providers` property selects the target account, but the credentials Radius uses to authenticate to AWS and Azure are + // configured separately with the `rad credential register` command. + // ## Recipe Packs + // A Recipe Pack is a collection of Recipes, defined as a separate `Radius.Core/recipePacks` resource. A Recipe is an infrastructure-as-code + // module, a Terraform module or Bicep template, that provisions the infrastructure backing an application resource. Reference + // one or more Recipe Packs by their resource IDs in the `recipePacks` property to control which Recipes are used. See the + // `Radius.Core/recipePacks` documentation for details. + // Use `recipeParameters` to pass environment-specific parameters to the Recipes defined in the referenced Recipe Packs, for + // example to standardize configuration such as SKUs or instance sizes across an Environment. + // ## Advanced Terraform and Bicep settings + // For advanced Terraform and Bicep settings, such as private module sources and registry authentication, reference a `Radius.Core/terraformSettings` + // or `Radius.Core/bicepSettings` resource from the `terraformSettings` and `bicepSettings` properties. + // For more information, see the Radius documentation at https://docs.radapp.io. EnvironmentResource } @@ -80,7 +462,92 @@ type EnvironmentsClientDeleteResponse struct { // EnvironmentsClientGetResponse contains the response from method EnvironmentsClient.Get. type EnvironmentsClientGetResponse struct { - // The environment resource + // The `Radius.Core/environments` Resource Type represents a Radius Environment: the deployment target that platform engineers + // configure for their developers. Every Radius Application is deployed to an Environment through its `environment` property. + // An Environment defines three things for the Applications deployed to it: + // - **Where resources are deployed**: the target compute platform and cloud provider accounts, set through the `providers` + // property. + // - **Which Recipes are used**: the Recipe Packs whose Recipes provision the infrastructure backing application resources, + // set through the `recipePacks` property. + // - **Advanced Terraform and Bicep settings**: environment-wide Recipe parameters and Terraform or Bicep engine configuration + // applied when Recipes run. + // ## Defining an Environment + // The simplest Environment can be created directly with the `rad environment create` command, without a Bicep file: + // ```bash + // rad environment create my-environment + // ``` + // For more advanced configurations, define an Environment as a `Radius.Core/environments` resource in a Bicep file. For example: + // ```bicep + // extension radius + // resource myEnvironment 'Radius.Core/environments@2025-08-01-preview' = { + // name: 'my-environment' + // properties: { + // recipePacks: [ + // myRecipePack.id + // ] + // providers: { + // kubernetes: { + // namespace: 'my-namespace' + // } + // } + // } + // } + // resource myRecipePack 'Radius.Core/recipePacks@2025-08-01-preview' existing = { + // name: 'my-recipe-pack' + // } + // ``` + // Both properties have defaults. If `providers` is omitted, resources are deployed to Kubernetes in the `default` namespace. + // If `recipePacks` is omitted, the Environment uses the `default` Recipe Pack in the `default` resource group. + // ## Deploying an Environment + // Deploy a defined Environment with the `rad deploy` command: + // ```bash + // rad deploy ./environment.bicep + // ``` + // ## Cloud providers + // By default an Environment deploys to Kubernetes. To deploy cloud resources, configure the `providers` property with your + // cloud account. For AWS, set the account ID and region: + // ```bicep + // extension radius + // resource myEnvironment 'Radius.Core/environments@2025-08-01-preview' = { + // name: 'my-environment' + // properties: { + // providers: { + // aws: { + // accountId: '123456789012' + // region: 'us-west-2' + // } + // } + // } + // } + // ``` + // For Azure, set the subscription and resource group that resources are deployed into: + // ```bicep + // extension radius + // resource myEnvironment 'Radius.Core/environments@2025-08-01-preview' = { + // name: 'my-environment' + // properties: { + // providers: { + // azure: { + // subscriptionId: '00000000-0000-0000-0000-000000000000' + // resourceGroupName: 'my-resource-group' + // } + // } + // } + // } + // ``` + // The `providers` property selects the target account, but the credentials Radius uses to authenticate to AWS and Azure are + // configured separately with the `rad credential register` command. + // ## Recipe Packs + // A Recipe Pack is a collection of Recipes, defined as a separate `Radius.Core/recipePacks` resource. A Recipe is an infrastructure-as-code + // module, a Terraform module or Bicep template, that provisions the infrastructure backing an application resource. Reference + // one or more Recipe Packs by their resource IDs in the `recipePacks` property to control which Recipes are used. See the + // `Radius.Core/recipePacks` documentation for details. + // Use `recipeParameters` to pass environment-specific parameters to the Recipes defined in the referenced Recipe Packs, for + // example to standardize configuration such as SKUs or instance sizes across an Environment. + // ## Advanced Terraform and Bicep settings + // For advanced Terraform and Bicep settings, such as private module sources and registry authentication, reference a `Radius.Core/terraformSettings` + // or `Radius.Core/bicepSettings` resource from the `terraformSettings` and `bicepSettings` properties. + // For more information, see the Radius documentation at https://docs.radapp.io. EnvironmentResource } @@ -92,7 +559,92 @@ type EnvironmentsClientListByScopeResponse struct { // EnvironmentsClientUpdateResponse contains the response from method EnvironmentsClient.Update. type EnvironmentsClientUpdateResponse struct { - // The environment resource + // The `Radius.Core/environments` Resource Type represents a Radius Environment: the deployment target that platform engineers + // configure for their developers. Every Radius Application is deployed to an Environment through its `environment` property. + // An Environment defines three things for the Applications deployed to it: + // - **Where resources are deployed**: the target compute platform and cloud provider accounts, set through the `providers` + // property. + // - **Which Recipes are used**: the Recipe Packs whose Recipes provision the infrastructure backing application resources, + // set through the `recipePacks` property. + // - **Advanced Terraform and Bicep settings**: environment-wide Recipe parameters and Terraform or Bicep engine configuration + // applied when Recipes run. + // ## Defining an Environment + // The simplest Environment can be created directly with the `rad environment create` command, without a Bicep file: + // ```bash + // rad environment create my-environment + // ``` + // For more advanced configurations, define an Environment as a `Radius.Core/environments` resource in a Bicep file. For example: + // ```bicep + // extension radius + // resource myEnvironment 'Radius.Core/environments@2025-08-01-preview' = { + // name: 'my-environment' + // properties: { + // recipePacks: [ + // myRecipePack.id + // ] + // providers: { + // kubernetes: { + // namespace: 'my-namespace' + // } + // } + // } + // } + // resource myRecipePack 'Radius.Core/recipePacks@2025-08-01-preview' existing = { + // name: 'my-recipe-pack' + // } + // ``` + // Both properties have defaults. If `providers` is omitted, resources are deployed to Kubernetes in the `default` namespace. + // If `recipePacks` is omitted, the Environment uses the `default` Recipe Pack in the `default` resource group. + // ## Deploying an Environment + // Deploy a defined Environment with the `rad deploy` command: + // ```bash + // rad deploy ./environment.bicep + // ``` + // ## Cloud providers + // By default an Environment deploys to Kubernetes. To deploy cloud resources, configure the `providers` property with your + // cloud account. For AWS, set the account ID and region: + // ```bicep + // extension radius + // resource myEnvironment 'Radius.Core/environments@2025-08-01-preview' = { + // name: 'my-environment' + // properties: { + // providers: { + // aws: { + // accountId: '123456789012' + // region: 'us-west-2' + // } + // } + // } + // } + // ``` + // For Azure, set the subscription and resource group that resources are deployed into: + // ```bicep + // extension radius + // resource myEnvironment 'Radius.Core/environments@2025-08-01-preview' = { + // name: 'my-environment' + // properties: { + // providers: { + // azure: { + // subscriptionId: '00000000-0000-0000-0000-000000000000' + // resourceGroupName: 'my-resource-group' + // } + // } + // } + // } + // ``` + // The `providers` property selects the target account, but the credentials Radius uses to authenticate to AWS and Azure are + // configured separately with the `rad credential register` command. + // ## Recipe Packs + // A Recipe Pack is a collection of Recipes, defined as a separate `Radius.Core/recipePacks` resource. A Recipe is an infrastructure-as-code + // module, a Terraform module or Bicep template, that provisions the infrastructure backing an application resource. Reference + // one or more Recipe Packs by their resource IDs in the `recipePacks` property to control which Recipes are used. See the + // `Radius.Core/recipePacks` documentation for details. + // Use `recipeParameters` to pass environment-specific parameters to the Recipes defined in the referenced Recipe Packs, for + // example to standardize configuration such as SKUs or instance sizes across an Environment. + // ## Advanced Terraform and Bicep settings + // For advanced Terraform and Bicep settings, such as private module sources and registry authentication, reference a `Radius.Core/terraformSettings` + // or `Radius.Core/bicepSettings` resource from the `terraformSettings` and `bicepSettings` properties. + // For more information, see the Radius documentation at https://docs.radapp.io. EnvironmentResource } @@ -104,7 +656,85 @@ type OperationsClientListResponse struct { // RecipePacksClientCreateOrUpdateResponse contains the response from method RecipePacksClient.CreateOrUpdate. type RecipePacksClientCreateOrUpdateResponse struct { - // The recipe pack resource + // The `Radius.Core/recipePacks` Resource Type represents a Recipe Pack: a named collection of Recipes that platform engineers + // assign to an Environment. A Recipe maps a resource type (such as `Radius.Data/redisCaches`) to an infrastructure-as-code + // module, a Terraform module or Bicep template, that provisions the infrastructure backing that resource when a developer + // deploys it. + // A Recipe Pack is defined as its own resource and referenced from an Environment's `recipePacks` property, so one Recipe + // Pack can be shared across many Environments. + // ## Defining a Recipe Pack + // Each entry in the `recipes` map is keyed by resource type. Set the recipe `kind` (`bicep` or `terraform`) and its `source` + // (an OCI registry reference for Bicep recipes, or a module source for Terraform recipes). + // ```bicep + // extension radius + // resource dataRecipes 'Radius.Core/recipePacks@2025-08-01-preview' = { + // name: 'data-recipes' + // properties: { + // recipes: { + // 'Radius.Data/redisCaches': { + // kind: 'bicep' + // source: 'ghcr.io/my-org/recipes/redis:latest' + // } + // 'Radius.Data/postgreSqlDatabases': { + // kind: 'terraform' + // source: 'git::https://github.com/my-org/recipes//postgresql' + // } + // } + // } + // } + // ``` + // ## Recipe parameters + // Each Recipe can declare default `parameters` that are passed to its module. Platform engineers set baseline values here, + // and developers get them automatically. An Environment can override these values per resource type through its `recipeParameters` + // property. + // ```bicep + // resource dataRecipes 'Radius.Core/recipePacks@2025-08-01-preview' = { + // name: 'data-recipes' + // properties: { + // recipes: { + // 'Radius.Data/redisCaches': { + // kind: 'bicep' + // source: 'ghcr.io/my-org/recipes/redis:latest' + // parameters: { + // sku: 'Standard' + // capacity: 1 + // } + // } + // } + // } + // } + // ``` + // ## Deploying a Recipe Pack + // Deploy the Bicep file with `rad deploy` to create the Recipe Pack resource. Once deployed, list and inspect Recipe Packs + // with the `rad recipe-pack list` and `rad recipe-pack show` commands. + // ## Referencing a Recipe Pack from an Environment + // An Environment references a Recipe Pack through its `recipePacks` property. When the Recipe Pack and the Environment are + // deployed to the same resource group, declare it as an `existing` resource and reference its `.id`: + // ```bicep + // extension radius + // resource dataRecipes 'Radius.Core/recipePacks@2025-08-01-preview' existing = { + // name: 'data-recipes' + // } + // resource myEnvironment 'Radius.Core/environments@2025-08-01-preview' = { + // name: 'my-environment' + // properties: { + // recipePacks: [ + // dataRecipes.id + // ] + // } + // } + // ``` + // To reference a Recipe Pack in a different resource group, use its full resource ID instead: + // ```bicep + // recipePacks: [ + // '/planes/radius/local/resourceGroups/shared/providers/Radius.Core/recipePacks/data-recipes' + // ] + // ``` + // Radius is installed with a `default` Recipe Pack in the `default` resource group, which an Environment uses when `recipePacks` + // is not set. + // Prebuilt Recipe Packs and the Recipes they reference are published in the [resource-types-contrib](https://github.com/radius-project/resource-types-contrib) + // repository. + // For more information, see the Radius documentation at https://docs.radapp.io. RecipePackResource } @@ -115,7 +745,85 @@ type RecipePacksClientDeleteResponse struct { // RecipePacksClientGetResponse contains the response from method RecipePacksClient.Get. type RecipePacksClientGetResponse struct { - // The recipe pack resource + // The `Radius.Core/recipePacks` Resource Type represents a Recipe Pack: a named collection of Recipes that platform engineers + // assign to an Environment. A Recipe maps a resource type (such as `Radius.Data/redisCaches`) to an infrastructure-as-code + // module, a Terraform module or Bicep template, that provisions the infrastructure backing that resource when a developer + // deploys it. + // A Recipe Pack is defined as its own resource and referenced from an Environment's `recipePacks` property, so one Recipe + // Pack can be shared across many Environments. + // ## Defining a Recipe Pack + // Each entry in the `recipes` map is keyed by resource type. Set the recipe `kind` (`bicep` or `terraform`) and its `source` + // (an OCI registry reference for Bicep recipes, or a module source for Terraform recipes). + // ```bicep + // extension radius + // resource dataRecipes 'Radius.Core/recipePacks@2025-08-01-preview' = { + // name: 'data-recipes' + // properties: { + // recipes: { + // 'Radius.Data/redisCaches': { + // kind: 'bicep' + // source: 'ghcr.io/my-org/recipes/redis:latest' + // } + // 'Radius.Data/postgreSqlDatabases': { + // kind: 'terraform' + // source: 'git::https://github.com/my-org/recipes//postgresql' + // } + // } + // } + // } + // ``` + // ## Recipe parameters + // Each Recipe can declare default `parameters` that are passed to its module. Platform engineers set baseline values here, + // and developers get them automatically. An Environment can override these values per resource type through its `recipeParameters` + // property. + // ```bicep + // resource dataRecipes 'Radius.Core/recipePacks@2025-08-01-preview' = { + // name: 'data-recipes' + // properties: { + // recipes: { + // 'Radius.Data/redisCaches': { + // kind: 'bicep' + // source: 'ghcr.io/my-org/recipes/redis:latest' + // parameters: { + // sku: 'Standard' + // capacity: 1 + // } + // } + // } + // } + // } + // ``` + // ## Deploying a Recipe Pack + // Deploy the Bicep file with `rad deploy` to create the Recipe Pack resource. Once deployed, list and inspect Recipe Packs + // with the `rad recipe-pack list` and `rad recipe-pack show` commands. + // ## Referencing a Recipe Pack from an Environment + // An Environment references a Recipe Pack through its `recipePacks` property. When the Recipe Pack and the Environment are + // deployed to the same resource group, declare it as an `existing` resource and reference its `.id`: + // ```bicep + // extension radius + // resource dataRecipes 'Radius.Core/recipePacks@2025-08-01-preview' existing = { + // name: 'data-recipes' + // } + // resource myEnvironment 'Radius.Core/environments@2025-08-01-preview' = { + // name: 'my-environment' + // properties: { + // recipePacks: [ + // dataRecipes.id + // ] + // } + // } + // ``` + // To reference a Recipe Pack in a different resource group, use its full resource ID instead: + // ```bicep + // recipePacks: [ + // '/planes/radius/local/resourceGroups/shared/providers/Radius.Core/recipePacks/data-recipes' + // ] + // ``` + // Radius is installed with a `default` Recipe Pack in the `default` resource group, which an Environment uses when `recipePacks` + // is not set. + // Prebuilt Recipe Packs and the Recipes they reference are published in the [resource-types-contrib](https://github.com/radius-project/resource-types-contrib) + // repository. + // For more information, see the Radius documentation at https://docs.radapp.io. RecipePackResource } @@ -127,13 +835,182 @@ type RecipePacksClientListByScopeResponse struct { // RecipePacksClientUpdateResponse contains the response from method RecipePacksClient.Update. type RecipePacksClientUpdateResponse struct { - // The recipe pack resource + // The `Radius.Core/recipePacks` Resource Type represents a Recipe Pack: a named collection of Recipes that platform engineers + // assign to an Environment. A Recipe maps a resource type (such as `Radius.Data/redisCaches`) to an infrastructure-as-code + // module, a Terraform module or Bicep template, that provisions the infrastructure backing that resource when a developer + // deploys it. + // A Recipe Pack is defined as its own resource and referenced from an Environment's `recipePacks` property, so one Recipe + // Pack can be shared across many Environments. + // ## Defining a Recipe Pack + // Each entry in the `recipes` map is keyed by resource type. Set the recipe `kind` (`bicep` or `terraform`) and its `source` + // (an OCI registry reference for Bicep recipes, or a module source for Terraform recipes). + // ```bicep + // extension radius + // resource dataRecipes 'Radius.Core/recipePacks@2025-08-01-preview' = { + // name: 'data-recipes' + // properties: { + // recipes: { + // 'Radius.Data/redisCaches': { + // kind: 'bicep' + // source: 'ghcr.io/my-org/recipes/redis:latest' + // } + // 'Radius.Data/postgreSqlDatabases': { + // kind: 'terraform' + // source: 'git::https://github.com/my-org/recipes//postgresql' + // } + // } + // } + // } + // ``` + // ## Recipe parameters + // Each Recipe can declare default `parameters` that are passed to its module. Platform engineers set baseline values here, + // and developers get them automatically. An Environment can override these values per resource type through its `recipeParameters` + // property. + // ```bicep + // resource dataRecipes 'Radius.Core/recipePacks@2025-08-01-preview' = { + // name: 'data-recipes' + // properties: { + // recipes: { + // 'Radius.Data/redisCaches': { + // kind: 'bicep' + // source: 'ghcr.io/my-org/recipes/redis:latest' + // parameters: { + // sku: 'Standard' + // capacity: 1 + // } + // } + // } + // } + // } + // ``` + // ## Deploying a Recipe Pack + // Deploy the Bicep file with `rad deploy` to create the Recipe Pack resource. Once deployed, list and inspect Recipe Packs + // with the `rad recipe-pack list` and `rad recipe-pack show` commands. + // ## Referencing a Recipe Pack from an Environment + // An Environment references a Recipe Pack through its `recipePacks` property. When the Recipe Pack and the Environment are + // deployed to the same resource group, declare it as an `existing` resource and reference its `.id`: + // ```bicep + // extension radius + // resource dataRecipes 'Radius.Core/recipePacks@2025-08-01-preview' existing = { + // name: 'data-recipes' + // } + // resource myEnvironment 'Radius.Core/environments@2025-08-01-preview' = { + // name: 'my-environment' + // properties: { + // recipePacks: [ + // dataRecipes.id + // ] + // } + // } + // ``` + // To reference a Recipe Pack in a different resource group, use its full resource ID instead: + // ```bicep + // recipePacks: [ + // '/planes/radius/local/resourceGroups/shared/providers/Radius.Core/recipePacks/data-recipes' + // ] + // ``` + // Radius is installed with a `default` Recipe Pack in the `default` resource group, which an Environment uses when `recipePacks` + // is not set. + // Prebuilt Recipe Packs and the Recipes they reference are published in the [resource-types-contrib](https://github.com/radius-project/resource-types-contrib) + // repository. + // For more information, see the Radius documentation at https://docs.radapp.io. RecipePackResource } // TerraformSettingsClientCreateOrUpdateResponse contains the response from method TerraformSettingsClient.CreateOrUpdate. type TerraformSettingsClientCreateOrUpdateResponse struct { - // The Terraform configuration resource, providing reusable Terraform recipe settings for environments. + // The `Radius.Core/terraformSettings` Resource Type holds reusable Terraform CLI settings that Environments apply when running + // Terraform Recipes. Its primary use is authenticating to private Terraform registries that host the modules referenced by + // a Recipe Pack, along with configuring provider installation and injecting environment variables during Recipe execution. + // Platform engineers define a `Radius.Core/terraformSettings` resource once and reference it from any Environment whose Recipes + // pull modules from a private registry. + // ## Defining Terraform settings + // Configure `terraformrc.credentials`, keyed by registry hostname, to authenticate to a private Terraform registry. Each + // entry points to a secret whose `token` key holds the registry token: + // ```bicep + // extension radius + // @description('The Radius Environment ID. Injected automatically by the rad CLI.') + // param environment string + // resource registrySecret 'Radius.Security/secrets@2025-08-01-preview' = { + // name: 'terraform-registry-token' + // properties: { + // environment: environment + // data: { + // token: { value: 'my-registry-token' } + // } + // } + // } + // resource terraformRegistry 'Radius.Core/terraformSettings@2025-08-01-preview' = { + // name: 'private-registry' + // properties: { + // terraformrc: { + // credentials: { + // 'app.terraform.io': { + // secret: registrySecret.id + // } + // } + // } + // } + // } + // ``` + // Two other settings are available: provider installation and environment variables. + // ### Provider installation + // In air-gapped or internal environments, use `terraformrc.providerInstallation` to install providers from a network mirror + // instead of the public registry. Set the mirror `url`, optionally narrow it with `include` or `exclude` provider address + // patterns, and use `direct` to control which providers are still downloaded directly: + // ```bicep + // resource providerMirror 'Radius.Core/terraformSettings@2025-08-01-preview' = { + // name: 'internal-mirror' + // properties: { + // terraformrc: { + // providerInstallation: { + // networkMirror: { + // url: 'https://terraform.corp.example.com/providers/' + // include: ['*'] + // } + // direct: { + // exclude: ['*'] + // } + // } + // } + // } + // } + // ``` + // ### Environment variables + // Use `env` to inject environment variables into every Terraform Recipe run, for example to raise the Terraform log level + // for troubleshooting or to tune CLI behavior: + // ```bicep + // resource terraformLogging 'Radius.Core/terraformSettings@2025-08-01-preview' = { + // name: 'terraform-logging' + // properties: { + // env: { + // TF_LOG: 'TRACE' + // TF_REGISTRY_CLIENT_TIMEOUT: '15' + // } + // } + // } + // ``` + // ## Deploying Terraform settings + // Deploy the settings resource with the `rad deploy` command: + // ```bash + // rad deploy ./terraform-settings.bicep + // ``` + // ## Referencing Terraform settings from an Environment + // Reference the settings from an Environment by setting its `terraformSettings` property to the resource ID. Every Terraform + // Recipe run in that Environment then uses the configured registry credentials: + // ```bicep + // extension radius + // resource terraformRegistry 'Radius.Core/terraformSettings@2025-08-01-preview' existing = { + // name: 'private-registry' + // } + // resource myEnvironment 'Radius.Core/environments@2025-08-01-preview' = { + // name: 'my-environment' + // properties: { + // terraformSettings: terraformRegistry.id + // } + // } + // ``` + // For more information, see the Radius documentation at https://docs.radapp.io. TerraformSettingsResource } @@ -144,7 +1021,98 @@ type TerraformSettingsClientDeleteResponse struct { // TerraformSettingsClientGetResponse contains the response from method TerraformSettingsClient.Get. type TerraformSettingsClientGetResponse struct { - // The Terraform configuration resource, providing reusable Terraform recipe settings for environments. + // The `Radius.Core/terraformSettings` Resource Type holds reusable Terraform CLI settings that Environments apply when running + // Terraform Recipes. Its primary use is authenticating to private Terraform registries that host the modules referenced by + // a Recipe Pack, along with configuring provider installation and injecting environment variables during Recipe execution. + // Platform engineers define a `Radius.Core/terraformSettings` resource once and reference it from any Environment whose Recipes + // pull modules from a private registry. + // ## Defining Terraform settings + // Configure `terraformrc.credentials`, keyed by registry hostname, to authenticate to a private Terraform registry. Each + // entry points to a secret whose `token` key holds the registry token: + // ```bicep + // extension radius + // @description('The Radius Environment ID. Injected automatically by the rad CLI.') + // param environment string + // resource registrySecret 'Radius.Security/secrets@2025-08-01-preview' = { + // name: 'terraform-registry-token' + // properties: { + // environment: environment + // data: { + // token: { value: 'my-registry-token' } + // } + // } + // } + // resource terraformRegistry 'Radius.Core/terraformSettings@2025-08-01-preview' = { + // name: 'private-registry' + // properties: { + // terraformrc: { + // credentials: { + // 'app.terraform.io': { + // secret: registrySecret.id + // } + // } + // } + // } + // } + // ``` + // Two other settings are available: provider installation and environment variables. + // ### Provider installation + // In air-gapped or internal environments, use `terraformrc.providerInstallation` to install providers from a network mirror + // instead of the public registry. Set the mirror `url`, optionally narrow it with `include` or `exclude` provider address + // patterns, and use `direct` to control which providers are still downloaded directly: + // ```bicep + // resource providerMirror 'Radius.Core/terraformSettings@2025-08-01-preview' = { + // name: 'internal-mirror' + // properties: { + // terraformrc: { + // providerInstallation: { + // networkMirror: { + // url: 'https://terraform.corp.example.com/providers/' + // include: ['*'] + // } + // direct: { + // exclude: ['*'] + // } + // } + // } + // } + // } + // ``` + // ### Environment variables + // Use `env` to inject environment variables into every Terraform Recipe run, for example to raise the Terraform log level + // for troubleshooting or to tune CLI behavior: + // ```bicep + // resource terraformLogging 'Radius.Core/terraformSettings@2025-08-01-preview' = { + // name: 'terraform-logging' + // properties: { + // env: { + // TF_LOG: 'TRACE' + // TF_REGISTRY_CLIENT_TIMEOUT: '15' + // } + // } + // } + // ``` + // ## Deploying Terraform settings + // Deploy the settings resource with the `rad deploy` command: + // ```bash + // rad deploy ./terraform-settings.bicep + // ``` + // ## Referencing Terraform settings from an Environment + // Reference the settings from an Environment by setting its `terraformSettings` property to the resource ID. Every Terraform + // Recipe run in that Environment then uses the configured registry credentials: + // ```bicep + // extension radius + // resource terraformRegistry 'Radius.Core/terraformSettings@2025-08-01-preview' existing = { + // name: 'private-registry' + // } + // resource myEnvironment 'Radius.Core/environments@2025-08-01-preview' = { + // name: 'my-environment' + // properties: { + // terraformSettings: terraformRegistry.id + // } + // } + // ``` + // For more information, see the Radius documentation at https://docs.radapp.io. TerraformSettingsResource } @@ -156,6 +1124,97 @@ type TerraformSettingsClientListByScopeResponse struct { // TerraformSettingsClientUpdateResponse contains the response from method TerraformSettingsClient.Update. type TerraformSettingsClientUpdateResponse struct { - // The Terraform configuration resource, providing reusable Terraform recipe settings for environments. + // The `Radius.Core/terraformSettings` Resource Type holds reusable Terraform CLI settings that Environments apply when running + // Terraform Recipes. Its primary use is authenticating to private Terraform registries that host the modules referenced by + // a Recipe Pack, along with configuring provider installation and injecting environment variables during Recipe execution. + // Platform engineers define a `Radius.Core/terraformSettings` resource once and reference it from any Environment whose Recipes + // pull modules from a private registry. + // ## Defining Terraform settings + // Configure `terraformrc.credentials`, keyed by registry hostname, to authenticate to a private Terraform registry. Each + // entry points to a secret whose `token` key holds the registry token: + // ```bicep + // extension radius + // @description('The Radius Environment ID. Injected automatically by the rad CLI.') + // param environment string + // resource registrySecret 'Radius.Security/secrets@2025-08-01-preview' = { + // name: 'terraform-registry-token' + // properties: { + // environment: environment + // data: { + // token: { value: 'my-registry-token' } + // } + // } + // } + // resource terraformRegistry 'Radius.Core/terraformSettings@2025-08-01-preview' = { + // name: 'private-registry' + // properties: { + // terraformrc: { + // credentials: { + // 'app.terraform.io': { + // secret: registrySecret.id + // } + // } + // } + // } + // } + // ``` + // Two other settings are available: provider installation and environment variables. + // ### Provider installation + // In air-gapped or internal environments, use `terraformrc.providerInstallation` to install providers from a network mirror + // instead of the public registry. Set the mirror `url`, optionally narrow it with `include` or `exclude` provider address + // patterns, and use `direct` to control which providers are still downloaded directly: + // ```bicep + // resource providerMirror 'Radius.Core/terraformSettings@2025-08-01-preview' = { + // name: 'internal-mirror' + // properties: { + // terraformrc: { + // providerInstallation: { + // networkMirror: { + // url: 'https://terraform.corp.example.com/providers/' + // include: ['*'] + // } + // direct: { + // exclude: ['*'] + // } + // } + // } + // } + // } + // ``` + // ### Environment variables + // Use `env` to inject environment variables into every Terraform Recipe run, for example to raise the Terraform log level + // for troubleshooting or to tune CLI behavior: + // ```bicep + // resource terraformLogging 'Radius.Core/terraformSettings@2025-08-01-preview' = { + // name: 'terraform-logging' + // properties: { + // env: { + // TF_LOG: 'TRACE' + // TF_REGISTRY_CLIENT_TIMEOUT: '15' + // } + // } + // } + // ``` + // ## Deploying Terraform settings + // Deploy the settings resource with the `rad deploy` command: + // ```bash + // rad deploy ./terraform-settings.bicep + // ``` + // ## Referencing Terraform settings from an Environment + // Reference the settings from an Environment by setting its `terraformSettings` property to the resource ID. Every Terraform + // Recipe run in that Environment then uses the configured registry credentials: + // ```bicep + // extension radius + // resource terraformRegistry 'Radius.Core/terraformSettings@2025-08-01-preview' existing = { + // name: 'private-registry' + // } + // resource myEnvironment 'Radius.Core/environments@2025-08-01-preview' = { + // name: 'my-environment' + // properties: { + // terraformSettings: terraformRegistry.id + // } + // } + // ``` + // For more information, see the Radius documentation at https://docs.radapp.io. TerraformSettingsResource } diff --git a/pkg/corerp/api/v20250801preview/zz_generated_terraformsettings_client.go b/pkg/corerp/api/v20250801preview/zz_generated_terraformsettings_client.go index 160a8526b9..eaacf9a01f 100644 --- a/pkg/corerp/api/v20250801preview/zz_generated_terraformsettings_client.go +++ b/pkg/corerp/api/v20250801preview/zz_generated_terraformsettings_client.go @@ -41,7 +41,7 @@ func NewTerraformSettingsClient(credential azcore.TokenCredential, options *arm. // If the operation fails it returns an *azcore.ResponseError type. // - rootScope - The scope in which the resource is present. UCP Scope is /planes/{planeType}/{planeName}/resourceGroup/{resourcegroupID} // and Azure resource scope is /subscriptions/{subscriptionID}/resourceGroup/{resourcegroupID} -// - terraformSettingsName - Terraform configuration name +// - terraformSettingsName - Terraform settings name // - resource - Resource create parameters. // - options - TerraformSettingsClientCreateOrUpdateOptions contains the optional parameters for the TerraformSettingsClient.CreateOrUpdate // method. @@ -103,7 +103,7 @@ func (client *TerraformSettingsClient) createOrUpdateHandleResponse(resp *http.R // If the operation fails it returns an *azcore.ResponseError type. // - rootScope - The scope in which the resource is present. UCP Scope is /planes/{planeType}/{planeName}/resourceGroup/{resourcegroupID} // and Azure resource scope is /subscriptions/{subscriptionID}/resourceGroup/{resourcegroupID} -// - terraformSettingsName - Terraform configuration name +// - terraformSettingsName - Terraform settings name // - options - TerraformSettingsClientDeleteOptions contains the optional parameters for the TerraformSettingsClient.Delete // method. func (client *TerraformSettingsClient) Delete(ctx context.Context, rootScope string, terraformSettingsName string, options *TerraformSettingsClientDeleteOptions) (TerraformSettingsClientDeleteResponse, error) { @@ -149,7 +149,7 @@ func (client *TerraformSettingsClient) deleteCreateRequest(ctx context.Context, // If the operation fails it returns an *azcore.ResponseError type. // - rootScope - The scope in which the resource is present. UCP Scope is /planes/{planeType}/{planeName}/resourceGroup/{resourcegroupID} // and Azure resource scope is /subscriptions/{subscriptionID}/resourceGroup/{resourcegroupID} -// - terraformSettingsName - Terraform configuration name +// - terraformSettingsName - Terraform settings name // - options - TerraformSettingsClientGetOptions contains the optional parameters for the TerraformSettingsClient.Get method. func (client *TerraformSettingsClient) Get(ctx context.Context, rootScope string, terraformSettingsName string, options *TerraformSettingsClientGetOptions) (TerraformSettingsClientGetResponse, error) { var err error @@ -259,7 +259,7 @@ func (client *TerraformSettingsClient) listByScopeHandleResponse(resp *http.Resp // If the operation fails it returns an *azcore.ResponseError type. // - rootScope - The scope in which the resource is present. UCP Scope is /planes/{planeType}/{planeName}/resourceGroup/{resourcegroupID} // and Azure resource scope is /subscriptions/{subscriptionID}/resourceGroup/{resourcegroupID} -// - terraformSettingsName - Terraform configuration name +// - terraformSettingsName - Terraform settings name // - properties - The resource properties to be updated. // - options - TerraformSettingsClientUpdateOptions contains the optional parameters for the TerraformSettingsClient.Update // method. diff --git a/pkg/ucp/initializer/service_test.go b/pkg/ucp/initializer/service_test.go index 961cba9e2d..f2531738f6 100644 --- a/pkg/ucp/initializer/service_test.go +++ b/pkg/ucp/initializer/service_test.go @@ -22,6 +22,7 @@ import ( "encoding/hex" "os" "path/filepath" + "strings" "testing" v1 "github.com/radius-project/radius/pkg/armrpc/api/v1" @@ -323,19 +324,20 @@ types: require.NoError(t, obj.As(summaryModel)) require.Len(t, summaryModel.Properties.ResourceTypes, len(radiusCoreTypeOpenAPIDefinitions)) - expectedDescriptions := map[string]string{ - "applications": "Radius Application resource", - "bicepSettings": "The Bicep configuration resource, providing reusable Bicep recipe settings for environments.", - "environments": "The environment resource", - "recipePacks": "The recipe pack resource", - "terraformSettings": "The Terraform configuration resource, providing reusable Terraform recipe settings for environments.", + expectedDescriptionPrefixes := map[string]string{ + "applications": "The `Radius.Core/applications` Resource Type represents a Radius Application", + "bicepSettings": "The `Radius.Core/bicepSettings` Resource Type holds reusable Bicep engine settings", + "environments": "The `Radius.Core/environments` Resource Type represents a Radius Environment", + "recipePacks": "The `Radius.Core/recipePacks` Resource Type represents a Recipe Pack", + "terraformSettings": "The `Radius.Core/terraformSettings` Resource Type holds reusable Terraform CLI settings", } - require.Len(t, expectedDescriptions, len(radiusCoreTypeOpenAPIDefinitions)) - for typeName, expectedDescription := range expectedDescriptions { + require.Len(t, expectedDescriptionPrefixes, len(radiusCoreTypeOpenAPIDefinitions)) + for typeName, expectedDescriptionPrefix := range expectedDescriptionPrefixes { resourceType := summaryModel.Properties.ResourceTypes[typeName] require.NotNil(t, resourceType, "resource type %q should be registered", typeName) require.NotNil(t, resourceType.Description, "resource type %q should have a description", typeName) - assert.Equal(t, expectedDescription, *resourceType.Description) + assert.True(t, strings.HasPrefix(*resourceType.Description, expectedDescriptionPrefix), + "resource type %q description should start with %q, got %q", typeName, expectedDescriptionPrefix, *resourceType.Description) apiVersion := resourceType.APIVersions["2025-08-01-preview"] require.NotNil(t, apiVersion, "resource type %q should have API version 2025-08-01-preview", typeName) diff --git a/swagger/specification/radius/resource-manager/Radius.Core/preview/2025-08-01-preview/openapi.json b/swagger/specification/radius/resource-manager/Radius.Core/preview/2025-08-01-preview/openapi.json index 9239aa3c35..ba91ba9cc8 100644 --- a/swagger/specification/radius/resource-manager/Radius.Core/preview/2025-08-01-preview/openapi.json +++ b/swagger/specification/radius/resource-manager/Radius.Core/preview/2025-08-01-preview/openapi.json @@ -394,7 +394,7 @@ { "name": "bicepSettingsName", "in": "path", - "description": "Bicep configuration name", + "description": "Bicep settings name", "required": true, "type": "string", "maxLength": 63, @@ -432,7 +432,7 @@ { "name": "bicepSettingsName", "in": "path", - "description": "Bicep configuration name", + "description": "Bicep settings name", "required": true, "type": "string", "maxLength": 63, @@ -485,7 +485,7 @@ { "name": "bicepSettingsName", "in": "path", - "description": "Bicep configuration name", + "description": "Bicep settings name", "required": true, "type": "string", "maxLength": 63, @@ -532,7 +532,7 @@ { "name": "bicepSettingsName", "in": "path", - "description": "Bicep configuration name", + "description": "Bicep settings name", "required": true, "type": "string", "maxLength": 63, @@ -1061,7 +1061,7 @@ { "name": "terraformSettingsName", "in": "path", - "description": "Terraform configuration name", + "description": "Terraform settings name", "required": true, "type": "string", "maxLength": 63, @@ -1099,7 +1099,7 @@ { "name": "terraformSettingsName", "in": "path", - "description": "Terraform configuration name", + "description": "Terraform settings name", "required": true, "type": "string", "maxLength": 63, @@ -1152,7 +1152,7 @@ { "name": "terraformSettingsName", "in": "path", - "description": "Terraform configuration name", + "description": "Terraform settings name", "required": true, "type": "string", "maxLength": 63, @@ -1199,7 +1199,7 @@ { "name": "terraformSettingsName", "in": "path", - "description": "Terraform configuration name", + "description": "Terraform settings name", "required": true, "type": "string", "maxLength": 63, @@ -1393,16 +1393,16 @@ "properties": { "provisioningState": { "$ref": "#/definitions/ProvisioningState", - "description": "The status of the asynchronous operation.", + "description": "(Read Only) The status of the Application resource within the Radius control plane. Does not include the other resources that compose the Application.", "readOnly": true }, "environment": { "type": "string", - "description": "Fully qualified resource ID for the environment that the application is linked to" + "description": "(Required) Fully qualified resource ID of the environment the application is deployed to" }, "status": { "$ref": "#/definitions/ResourceStatus", - "description": "Status of a resource.", + "description": "(Read Only) Deployment details for the Application, including any output resources Radius created for it.", "readOnly": true } }, @@ -1412,7 +1412,7 @@ }, "ApplicationResource": { "type": "object", - "description": "Radius Application resource", + "description": "The `Radius.Core/applications` Resource Type represents a Radius Application: a logical grouping of the resources that make up a single Application, such as containers, databases, and message queues, along with the connections between them. Radius uses the Application to build the application graph, apply shared configuration, and manage its resources together throughout their lifecycle.\n\n## Defining an Application\n\nAn Application is always deployed to a Radius Environment, which is supplied through the `environment` property. To define an Application, add a `Radius.Core/applications` resource to your application definition Bicep file.\n\n```bicep\nextension radius\n\n@description('The Radius Environment ID. Injected automatically by the rad CLI.')\nparam environment string\n\nresource myApp 'Radius.Core/applications@2025-08-01-preview' = {\n name: 'my-app'\n properties: {\n environment: environment\n }\n}\n```\n\n## Deploying an Application\n\nAn Application is deployed with the `rad deploy` command, which deploys the Application together with the resources that belong to it:\n\n```bash\nrad deploy ./app.bicep\n```\n\n## Adding resources to an Application\n\nResources are composed into an Application by setting their `application` property to the Application's ID. For example, to add a Container to this Application, add the following to the application definition Bicep file and set `application: myApp.id`:\n\n```bicep\nresource frontend 'Radius.Compute/containers@2025-08-01-preview' = {\n name: 'frontend'\n properties: {\n environment: environment\n application: myApp.id\n containers: {\n frontend: {\n image: 'ghcr.io/my-org/frontend:latest'\n }\n }\n }\n}\n```\n\nFor more information, see the Radius documentation at https://docs.radapp.io.", "properties": { "properties": { "$ref": "#/definitions/ApplicationProperties", @@ -1456,7 +1456,7 @@ }, "ApplicationResourceUpdate": { "type": "object", - "description": "Radius Application resource", + "description": "The `Radius.Core/applications` Resource Type represents a Radius Application: a logical grouping of the resources that make up a single Application, such as containers, databases, and message queues, along with the connections between them. Radius uses the Application to build the application graph, apply shared configuration, and manage its resources together throughout their lifecycle.\n\n## Defining an Application\n\nAn Application is always deployed to a Radius Environment, which is supplied through the `environment` property. To define an Application, add a `Radius.Core/applications` resource to your application definition Bicep file.\n\n```bicep\nextension radius\n\n@description('The Radius Environment ID. Injected automatically by the rad CLI.')\nparam environment string\n\nresource myApp 'Radius.Core/applications@2025-08-01-preview' = {\n name: 'my-app'\n properties: {\n environment: environment\n }\n}\n```\n\n## Deploying an Application\n\nAn Application is deployed with the `rad deploy` command, which deploys the Application together with the resources that belong to it:\n\n```bash\nrad deploy ./app.bicep\n```\n\n## Adding resources to an Application\n\nResources are composed into an Application by setting their `application` property to the Application's ID. For example, to add a Container to this Application, add the following to the application definition Bicep file and set `application: myApp.id`:\n\n```bicep\nresource frontend 'Radius.Compute/containers@2025-08-01-preview' = {\n name: 'frontend'\n properties: {\n environment: environment\n application: myApp.id\n containers: {\n frontend: {\n image: 'ghcr.io/my-org/frontend:latest'\n }\n }\n }\n}\n```\n\nFor more information, see the Radius documentation at https://docs.radapp.io.", "allOf": [ { "$ref": "#/definitions/Azure.ResourceManager.CommonTypes.TrackedResourceUpdate" @@ -1534,38 +1534,38 @@ "properties": { "authenticationMethod": { "$ref": "#/definitions/BicepAuthenticationMethod", - "description": "The authentication method to use. Supported values: BasicAuth, AzureWI, AwsIrsa." + "description": "(Optional) How Radius authenticates to the registry." }, "basicAuthSecretId": { "type": "string", - "description": "The ID of a secret resource containing username and password for BasicAuth. Supported types: Radius.Security/secrets (recommended) or Applications.Core/secretStores. Required when authenticationMethod is 'BasicAuth'." + "description": "(Optional) The ID of a `Radius.Security/secrets` resource containing the username and password. Required when `authenticationMethod` is `BasicAuth`." }, "azureWiClientId": { "type": "string", - "description": "Azure Workload Identity client ID. Required when authenticationMethod is 'AzureWI'." + "description": "(Optional) Azure Workload Identity client ID. Required when `authenticationMethod` is `AzureWI`." }, "azureWiTenantId": { "type": "string", - "description": "Azure Workload Identity tenant ID. Required when authenticationMethod is 'AzureWI'." + "description": "(Optional) Azure Workload Identity tenant ID. Required when `authenticationMethod` is `AzureWI`." }, "awsIamRoleArn": { "type": "string", - "description": "AWS IAM Role ARN for IRSA authentication. Required when authenticationMethod is 'AwsIrsa'." + "description": "(Optional) AWS IAM Role ARN for IRSA authentication. Required when `authenticationMethod` is `AwsIrsa`." } } }, "BicepSettingsProperties": { "type": "object", - "description": "Bicep configuration properties.", + "description": "Bicep settings properties.", "properties": { "provisioningState": { "$ref": "#/definitions/ProvisioningState", - "description": "The status of the asynchronous operation.", + "description": "(Read Only) The status of the Bicep settings resource within the Radius control plane.", "readOnly": true }, "referencedBy": { "type": "array", - "description": "Environments that reference this Bicep configuration.", + "description": "(Read Only) Resource IDs of the Environments that reference this Bicep settings resource.", "items": { "type": "string" }, @@ -1573,7 +1573,7 @@ }, "registryAuthentications": { "type": "object", - "description": "Authentication configuration for private Bicep registries, keyed by registry hostname (e.g. 'corp.acr.io'). The Bicep driver looks up credentials by the host parsed from the recipe template path.", + "description": "(Optional) Authentication for private Bicep registries that host Recipe templates, keyed by registry hostname such as `corp.acr.io`. Radius matches a registry by the hostname in the Recipe source.", "additionalProperties": { "$ref": "#/definitions/BicepRegistryAuthentication" } @@ -1582,7 +1582,7 @@ }, "BicepSettingsResource": { "type": "object", - "description": "The Bicep configuration resource, providing reusable Bicep recipe settings for environments.", + "description": "The `Radius.Core/bicepSettings` Resource Type holds reusable Bicep engine settings that Environments apply when running Bicep Recipes. Its primary use is authenticating to private Bicep registries: OCI registries, such as Azure Container Registry, that host the Recipe templates referenced by a Recipe Pack.\n\nPlatform engineers define a `Radius.Core/bicepSettings` resource once and reference it from any Environment whose Recipes pull templates from a private registry.\n\n## Defining Bicep settings\n\nConfigure `registryAuthentications`, keyed by registry hostname. When a Recipe template is pulled from a matching host, Radius authenticates using the configured method. The example below uses basic authentication, reading the username and password from a secret:\n\n```bicep\nextension radius\n\n@description('The Radius Environment ID. Injected automatically by the rad CLI.')\nparam environment string\n\nresource registrySecret 'Radius.Security/secrets@2025-08-01-preview' = {\n name: 'registry-credentials'\n properties: {\n environment: environment\n data: {\n username: { value: 'my-username' }\n password: { value: 'my-password' }\n }\n }\n}\n\nresource bicepRegistry 'Radius.Core/bicepSettings@2025-08-01-preview' = {\n name: 'private-registry'\n properties: {\n registryAuthentications: {\n 'corp.azurecr.io': {\n authenticationMethod: 'BasicAuth'\n basicAuthSecretId: registrySecret.id\n }\n }\n }\n}\n```\n\nThree authentication methods are supported: `BasicAuth` (username and password from a secret), `AwsIrsa` (AWS IAM Roles for Service Accounts, using `awsIamRoleArn`), and `AzureWI` (Azure Workload Identity, using `azureWiClientId` and `azureWiTenantId`).\n\n## Deploying Bicep settings\n\nDeploy the settings resource with the `rad deploy` command:\n\n```bash\nrad deploy ./bicep-settings.bicep\n```\n\n## Referencing Bicep settings from an Environment\n\nReference the settings from an Environment by setting its `bicepSettings` property to the resource ID. Every Bicep Recipe run in that Environment then uses the configured registry authentication:\n\n```bicep\nextension radius\n\nresource bicepRegistry 'Radius.Core/bicepSettings@2025-08-01-preview' existing = {\n name: 'private-registry'\n}\n\nresource myEnvironment 'Radius.Core/environments@2025-08-01-preview' = {\n name: 'my-environment'\n properties: {\n bicepSettings: bicepRegistry.id\n }\n}\n```\n\nFor more information, see the Radius documentation at https://docs.radapp.io.", "properties": { "properties": { "$ref": "#/definitions/BicepSettingsProperties", @@ -1626,7 +1626,7 @@ }, "BicepSettingsResourceUpdate": { "type": "object", - "description": "The Bicep configuration resource, providing reusable Bicep recipe settings for environments.", + "description": "The `Radius.Core/bicepSettings` Resource Type holds reusable Bicep engine settings that Environments apply when running Bicep Recipes. Its primary use is authenticating to private Bicep registries: OCI registries, such as Azure Container Registry, that host the Recipe templates referenced by a Recipe Pack.\n\nPlatform engineers define a `Radius.Core/bicepSettings` resource once and reference it from any Environment whose Recipes pull templates from a private registry.\n\n## Defining Bicep settings\n\nConfigure `registryAuthentications`, keyed by registry hostname. When a Recipe template is pulled from a matching host, Radius authenticates using the configured method. The example below uses basic authentication, reading the username and password from a secret:\n\n```bicep\nextension radius\n\n@description('The Radius Environment ID. Injected automatically by the rad CLI.')\nparam environment string\n\nresource registrySecret 'Radius.Security/secrets@2025-08-01-preview' = {\n name: 'registry-credentials'\n properties: {\n environment: environment\n data: {\n username: { value: 'my-username' }\n password: { value: 'my-password' }\n }\n }\n}\n\nresource bicepRegistry 'Radius.Core/bicepSettings@2025-08-01-preview' = {\n name: 'private-registry'\n properties: {\n registryAuthentications: {\n 'corp.azurecr.io': {\n authenticationMethod: 'BasicAuth'\n basicAuthSecretId: registrySecret.id\n }\n }\n }\n}\n```\n\nThree authentication methods are supported: `BasicAuth` (username and password from a secret), `AwsIrsa` (AWS IAM Roles for Service Accounts, using `awsIamRoleArn`), and `AzureWI` (Azure Workload Identity, using `azureWiClientId` and `azureWiTenantId`).\n\n## Deploying Bicep settings\n\nDeploy the settings resource with the `rad deploy` command:\n\n```bash\nrad deploy ./bicep-settings.bicep\n```\n\n## Referencing Bicep settings from an Environment\n\nReference the settings from an Environment by setting its `bicepSettings` property to the resource ID. Every Bicep Recipe run in that Environment then uses the configured registry authentication:\n\n```bicep\nextension radius\n\nresource bicepRegistry 'Radius.Core/bicepSettings@2025-08-01-preview' existing = {\n name: 'private-registry'\n}\n\nresource myEnvironment 'Radius.Core/environments@2025-08-01-preview' = {\n name: 'my-environment'\n properties: {\n bicepSettings: bicepRegistry.id\n }\n}\n```\n\nFor more information, see the Radius documentation at https://docs.radapp.io.", "allOf": [ { "$ref": "#/definitions/Azure.ResourceManager.CommonTypes.TrackedResourceUpdate" @@ -1685,44 +1685,44 @@ "properties": { "provisioningState": { "$ref": "#/definitions/ProvisioningState", - "description": "The status of the asynchronous operation.", + "description": "(Read Only) The status of the Environment resource within the Radius control plane. Does not include the resources deployed to the Environment.", "readOnly": true }, "recipePacks": { "type": "array", - "description": "List of Recipe Pack resource IDs linked to this environment.", + "description": "(Optional) Resource IDs of the Recipe Packs this Environment uses to provision infrastructure for application resources. Defaults to the `default` Recipe Pack in the `default` resource group if not specified.", "items": { "type": "string" } }, "recipeParameters": { "type": "object", - "description": "Recipe specific parameters that apply to all resources of a given type in this environment.", + "description": "(Optional) Parameters passed to Recipes when they run, keyed by resource type. Values here override the default parameters defined in the Recipe Pack for every resource of that type deployed to this Environment.", "additionalProperties": { "$ref": "#/definitions/RecipeParameterValue" } }, "providers": { "$ref": "#/definitions/Providers", - "description": "Cloud provider configuration for the environment." + "description": "(Optional) Target compute platform and cloud provider accounts that resources are deployed into. Defaults to Kubernetes in the `default` namespace if not specified." }, "terraformSettings": { "type": "string", - "description": "Resource ID of a Radius.Core/terraformSettings resource providing Terraform recipe settings." + "description": "(Optional) Resource ID of a `Radius.Core/terraformSettings` resource that supplies Terraform CLI settings, such as private registry credentials, used when running Terraform Recipes in this Environment." }, "bicepSettings": { "type": "string", - "description": "Resource ID of a Radius.Core/bicepSettings resource providing Bicep recipe settings." + "description": "(Optional) Resource ID of a `Radius.Core/bicepSettings` resource that supplies Bicep engine settings, such as private registry authentication, used when running Bicep Recipes in this Environment." }, "simulated": { "type": "boolean", - "description": "Simulated environment." + "description": "(Optional) When true, the Environment is simulated and does not deploy real infrastructure. Recipes are evaluated but no resources are provisioned, which is useful for validating application definitions. Defaults to `false` if not specified." } } }, "EnvironmentResource": { "type": "object", - "description": "The environment resource", + "description": "The `Radius.Core/environments` Resource Type represents a Radius Environment: the deployment target that platform engineers configure for their developers. Every Radius Application is deployed to an Environment through its `environment` property.\n\nAn Environment defines three things for the Applications deployed to it:\n\n- **Where resources are deployed**: the target compute platform and cloud provider accounts, set through the `providers` property.\n- **Which Recipes are used**: the Recipe Packs whose Recipes provision the infrastructure backing application resources, set through the `recipePacks` property.\n- **Advanced Terraform and Bicep settings**: environment-wide Recipe parameters and Terraform or Bicep engine configuration applied when Recipes run.\n\n## Defining an Environment\n\nThe simplest Environment can be created directly with the `rad environment create` command, without a Bicep file:\n\n```bash\nrad environment create my-environment\n```\n\nFor more advanced configurations, define an Environment as a `Radius.Core/environments` resource in a Bicep file. For example:\n\n```bicep\nextension radius\n\nresource myEnvironment 'Radius.Core/environments@2025-08-01-preview' = {\n name: 'my-environment'\n properties: {\n recipePacks: [\n myRecipePack.id\n ]\n providers: {\n kubernetes: {\n namespace: 'my-namespace'\n }\n }\n }\n}\n\nresource myRecipePack 'Radius.Core/recipePacks@2025-08-01-preview' existing = {\n name: 'my-recipe-pack'\n}\n```\n\nBoth properties have defaults. If `providers` is omitted, resources are deployed to Kubernetes in the `default` namespace. If `recipePacks` is omitted, the Environment uses the `default` Recipe Pack in the `default` resource group.\n\n## Deploying an Environment\n\nDeploy a defined Environment with the `rad deploy` command:\n\n```bash\nrad deploy ./environment.bicep\n```\n\n## Cloud providers\n\nBy default an Environment deploys to Kubernetes. To deploy cloud resources, configure the `providers` property with your cloud account. For AWS, set the account ID and region:\n\n```bicep\nextension radius\n\nresource myEnvironment 'Radius.Core/environments@2025-08-01-preview' = {\n name: 'my-environment'\n properties: {\n providers: {\n aws: {\n accountId: '123456789012'\n region: 'us-west-2'\n }\n }\n }\n}\n```\n\nFor Azure, set the subscription and resource group that resources are deployed into:\n\n```bicep\nextension radius\n\nresource myEnvironment 'Radius.Core/environments@2025-08-01-preview' = {\n name: 'my-environment'\n properties: {\n providers: {\n azure: {\n subscriptionId: '00000000-0000-0000-0000-000000000000'\n resourceGroupName: 'my-resource-group'\n }\n }\n }\n}\n```\n\nThe `providers` property selects the target account, but the credentials Radius uses to authenticate to AWS and Azure are configured separately with the `rad credential register` command.\n\n## Recipe Packs\n\nA Recipe Pack is a collection of Recipes, defined as a separate `Radius.Core/recipePacks` resource. A Recipe is an infrastructure-as-code module, a Terraform module or Bicep template, that provisions the infrastructure backing an application resource. Reference one or more Recipe Packs by their resource IDs in the `recipePacks` property to control which Recipes are used. See the `Radius.Core/recipePacks` documentation for details.\n\nUse `recipeParameters` to pass environment-specific parameters to the Recipes defined in the referenced Recipe Packs, for example to standardize configuration such as SKUs or instance sizes across an Environment.\n\n## Advanced Terraform and Bicep settings\n\nFor advanced Terraform and Bicep settings, such as private module sources and registry authentication, reference a `Radius.Core/terraformSettings` or `Radius.Core/bicepSettings` resource from the `terraformSettings` and `bicepSettings` properties.\n\nFor more information, see the Radius documentation at https://docs.radapp.io.", "properties": { "properties": { "$ref": "#/definitions/EnvironmentProperties", @@ -1766,7 +1766,7 @@ }, "EnvironmentResourceUpdate": { "type": "object", - "description": "The environment resource", + "description": "The `Radius.Core/environments` Resource Type represents a Radius Environment: the deployment target that platform engineers configure for their developers. Every Radius Application is deployed to an Environment through its `environment` property.\n\nAn Environment defines three things for the Applications deployed to it:\n\n- **Where resources are deployed**: the target compute platform and cloud provider accounts, set through the `providers` property.\n- **Which Recipes are used**: the Recipe Packs whose Recipes provision the infrastructure backing application resources, set through the `recipePacks` property.\n- **Advanced Terraform and Bicep settings**: environment-wide Recipe parameters and Terraform or Bicep engine configuration applied when Recipes run.\n\n## Defining an Environment\n\nThe simplest Environment can be created directly with the `rad environment create` command, without a Bicep file:\n\n```bash\nrad environment create my-environment\n```\n\nFor more advanced configurations, define an Environment as a `Radius.Core/environments` resource in a Bicep file. For example:\n\n```bicep\nextension radius\n\nresource myEnvironment 'Radius.Core/environments@2025-08-01-preview' = {\n name: 'my-environment'\n properties: {\n recipePacks: [\n myRecipePack.id\n ]\n providers: {\n kubernetes: {\n namespace: 'my-namespace'\n }\n }\n }\n}\n\nresource myRecipePack 'Radius.Core/recipePacks@2025-08-01-preview' existing = {\n name: 'my-recipe-pack'\n}\n```\n\nBoth properties have defaults. If `providers` is omitted, resources are deployed to Kubernetes in the `default` namespace. If `recipePacks` is omitted, the Environment uses the `default` Recipe Pack in the `default` resource group.\n\n## Deploying an Environment\n\nDeploy a defined Environment with the `rad deploy` command:\n\n```bash\nrad deploy ./environment.bicep\n```\n\n## Cloud providers\n\nBy default an Environment deploys to Kubernetes. To deploy cloud resources, configure the `providers` property with your cloud account. For AWS, set the account ID and region:\n\n```bicep\nextension radius\n\nresource myEnvironment 'Radius.Core/environments@2025-08-01-preview' = {\n name: 'my-environment'\n properties: {\n providers: {\n aws: {\n accountId: '123456789012'\n region: 'us-west-2'\n }\n }\n }\n}\n```\n\nFor Azure, set the subscription and resource group that resources are deployed into:\n\n```bicep\nextension radius\n\nresource myEnvironment 'Radius.Core/environments@2025-08-01-preview' = {\n name: 'my-environment'\n properties: {\n providers: {\n azure: {\n subscriptionId: '00000000-0000-0000-0000-000000000000'\n resourceGroupName: 'my-resource-group'\n }\n }\n }\n}\n```\n\nThe `providers` property selects the target account, but the credentials Radius uses to authenticate to AWS and Azure are configured separately with the `rad credential register` command.\n\n## Recipe Packs\n\nA Recipe Pack is a collection of Recipes, defined as a separate `Radius.Core/recipePacks` resource. A Recipe is an infrastructure-as-code module, a Terraform module or Bicep template, that provisions the infrastructure backing an application resource. Reference one or more Recipe Packs by their resource IDs in the `recipePacks` property to control which Recipes are used. See the `Radius.Core/recipePacks` documentation for details.\n\nUse `recipeParameters` to pass environment-specific parameters to the Recipes defined in the referenced Recipe Packs, for example to standardize configuration such as SKUs or instance sizes across an Environment.\n\n## Advanced Terraform and Bicep settings\n\nFor advanced Terraform and Bicep settings, such as private module sources and registry authentication, reference a `Radius.Core/terraformSettings` or `Radius.Core/bicepSettings` resource from the `terraformSettings` and `bicepSettings` properties.\n\nFor more information, see the Radius documentation at https://docs.radapp.io.", "allOf": [ { "$ref": "#/definitions/Azure.ResourceManager.CommonTypes.TrackedResourceUpdate" @@ -1895,15 +1895,15 @@ "properties": { "azure": { "$ref": "#/definitions/ProvidersAzure", - "description": "The Azure cloud provider configuration." + "description": "(Optional) Configuration for deploying resources to Azure." }, "kubernetes": { "$ref": "#/definitions/ProvidersKubernetes", - "description": "The Kubernetes provider configuration." + "description": "(Optional) Configuration for deploying resources to Kubernetes." }, "aws": { "$ref": "#/definitions/ProvidersAws", - "description": "The AWS cloud provider configuration." + "description": "(Optional) Configuration for deploying resources to AWS." } } }, @@ -1913,11 +1913,11 @@ "properties": { "accountId": { "type": "string", - "description": "AWS account ID for AWS resources to be deployed into." + "description": "(Required) ID of the AWS account that resources are deployed into." }, "region": { "type": "string", - "description": "AWS region for AWS resources to be deployed into." + "description": "(Required) AWS region that resources are deployed into." } }, "required": [ @@ -1931,15 +1931,15 @@ "properties": { "subscriptionId": { "type": "string", - "description": "Azure subscription ID hosting deployed resources." + "description": "(Required) ID of the Azure subscription that resources are deployed into." }, "resourceGroupName": { "type": "string", - "description": "Optional resource group name." + "description": "(Optional) Name of the Azure resource group that resources are deployed into. Most Bicep and Terraform Recipes expect a resource group in the deployment context, so set this whenever deploying Azure resources." }, "identity": { "$ref": "#/definitions/IdentitySettings", - "description": "External identity settings (moved from compute)." + "description": "(Optional) Managed or workload identity Radius uses to authenticate to Azure when deploying resources." } }, "required": [ @@ -1951,7 +1951,7 @@ "properties": { "namespace": { "type": "string", - "description": "Kubernetes namespace to deploy workloads into." + "description": "(Required) Kubernetes namespace that workloads are deployed into." } }, "required": [ @@ -2025,24 +2025,24 @@ "properties": { "kind": { "$ref": "#/definitions/RecipeKind", - "description": "The type of recipe (e.g., Terraform, Bicep)" + "description": "(Required) The kind of Recipe, which determines how Radius runs it." }, "plainHttp": { "type": "boolean", - "description": "Connect to the source using HTTP (not HTTPS). This should be used when the source is known not to support HTTPS, for example in a locally hosted registry for Bicep recipes. Defaults to false (use HTTPS/TLS)" + "description": "(Optional) Connect to the source using HTTP instead of HTTPS. Use this only when the source does not support HTTPS such as a locally hosted registry for Bicep recipes. Defaults to `false` if not specified." }, "source": { "type": "string", - "description": "The source of the recipe. For Bicep recipes this is the OCI registry reference. For Terraform recipes this is the module source." + "description": "(Required) Location of the Recipe. For Bicep Recipes this is an OCI registry reference. For Terraform Recipes this is the module source such as a Git URL or a Terraform registry module." }, "parameters": { "type": "object", - "description": "Parameters to pass to the recipe", + "description": "(Optional) Default parameter values passed to the Recipe when it runs. An Environment can override these per resource type through its `recipeParameters` property.", "additionalProperties": {} }, "outputs": { "type": "object", - "description": "Maps the module's outputs onto the resource type's properties, for recipes that point directly at a Bicep or Terraform module. Each entry's value is either a string (the module output name for a non-secret property) or, under the reserved `secrets` key, a nested object mapping secret property names to module output names. A `secrets` entry always routes its module output to the resource's secret outputs regardless of how the module classified it (for example an AVM module's `primaryConnectionString`). Example: `{ host: 'name', secrets: { connectionString: 'primaryConnectionString' } }`.", + "description": "(Optional) Maps the module outputs onto the resource type properties for recipes that point directly at a Bicep or Terraform module. Each value is the module output name for a non-secret property. Under the reserved `secrets` key a nested object maps secret property names to module output names and always routes those outputs to the resource secret outputs.", "additionalProperties": {} } }, @@ -2081,12 +2081,12 @@ "properties": { "provisioningState": { "$ref": "#/definitions/ProvisioningState", - "description": "The status of the asynchronous operation", + "description": "(Read Only) The status of the Recipe Pack resource within the Radius control plane.", "readOnly": true }, "referencedBy": { "type": "array", - "description": "List of environment IDs that reference this recipe pack", + "description": "(Read Only) Resource IDs of the Environments that reference this Recipe Pack.", "items": { "type": "string" }, @@ -2094,7 +2094,7 @@ }, "recipes": { "type": "object", - "description": "Map of resource types to their recipe configurations", + "description": "(Required) The Recipes in this pack, keyed by the resource type each Recipe provisions. Each key is a resource type such as `Radius.Data/redisCaches`.", "additionalProperties": { "$ref": "#/definitions/RecipeDefinition" } @@ -2106,7 +2106,7 @@ }, "RecipePackResource": { "type": "object", - "description": "The recipe pack resource", + "description": "The `Radius.Core/recipePacks` Resource Type represents a Recipe Pack: a named collection of Recipes that platform engineers assign to an Environment. A Recipe maps a resource type (such as `Radius.Data/redisCaches`) to an infrastructure-as-code module, a Terraform module or Bicep template, that provisions the infrastructure backing that resource when a developer deploys it.\n\nA Recipe Pack is defined as its own resource and referenced from an Environment's `recipePacks` property, so one Recipe Pack can be shared across many Environments.\n\n## Defining a Recipe Pack\n\nEach entry in the `recipes` map is keyed by resource type. Set the recipe `kind` (`bicep` or `terraform`) and its `source` (an OCI registry reference for Bicep recipes, or a module source for Terraform recipes).\n\n```bicep\nextension radius\n\nresource dataRecipes 'Radius.Core/recipePacks@2025-08-01-preview' = {\n name: 'data-recipes'\n properties: {\n recipes: {\n 'Radius.Data/redisCaches': {\n kind: 'bicep'\n source: 'ghcr.io/my-org/recipes/redis:latest'\n }\n 'Radius.Data/postgreSqlDatabases': {\n kind: 'terraform'\n source: 'git::https://github.com/my-org/recipes//postgresql'\n }\n }\n }\n}\n```\n\n## Recipe parameters\n\nEach Recipe can declare default `parameters` that are passed to its module. Platform engineers set baseline values here, and developers get them automatically. An Environment can override these values per resource type through its `recipeParameters` property.\n\n```bicep\nresource dataRecipes 'Radius.Core/recipePacks@2025-08-01-preview' = {\n name: 'data-recipes'\n properties: {\n recipes: {\n 'Radius.Data/redisCaches': {\n kind: 'bicep'\n source: 'ghcr.io/my-org/recipes/redis:latest'\n parameters: {\n sku: 'Standard'\n capacity: 1\n }\n }\n }\n }\n}\n```\n\n## Deploying a Recipe Pack\n\nDeploy the Bicep file with `rad deploy` to create the Recipe Pack resource. Once deployed, list and inspect Recipe Packs with the `rad recipe-pack list` and `rad recipe-pack show` commands.\n\n## Referencing a Recipe Pack from an Environment\n\nAn Environment references a Recipe Pack through its `recipePacks` property. When the Recipe Pack and the Environment are deployed to the same resource group, declare it as an `existing` resource and reference its `.id`:\n\n```bicep\nextension radius\n\nresource dataRecipes 'Radius.Core/recipePacks@2025-08-01-preview' existing = {\n name: 'data-recipes'\n}\n\nresource myEnvironment 'Radius.Core/environments@2025-08-01-preview' = {\n name: 'my-environment'\n properties: {\n recipePacks: [\n dataRecipes.id\n ]\n }\n}\n```\n\nTo reference a Recipe Pack in a different resource group, use its full resource ID instead:\n\n```bicep\nrecipePacks: [\n '/planes/radius/local/resourceGroups/shared/providers/Radius.Core/recipePacks/data-recipes'\n]\n```\n\nRadius is installed with a `default` Recipe Pack in the `default` resource group, which an Environment uses when `recipePacks` is not set.\n\nPrebuilt Recipe Packs and the Recipes they reference are published in the [resource-types-contrib](https://github.com/radius-project/resource-types-contrib) repository.\n\nFor more information, see the Radius documentation at https://docs.radapp.io.", "properties": { "properties": { "$ref": "#/definitions/RecipePackProperties", @@ -2150,7 +2150,7 @@ }, "RecipePackResourceUpdate": { "type": "object", - "description": "The recipe pack resource", + "description": "The `Radius.Core/recipePacks` Resource Type represents a Recipe Pack: a named collection of Recipes that platform engineers assign to an Environment. A Recipe maps a resource type (such as `Radius.Data/redisCaches`) to an infrastructure-as-code module, a Terraform module or Bicep template, that provisions the infrastructure backing that resource when a developer deploys it.\n\nA Recipe Pack is defined as its own resource and referenced from an Environment's `recipePacks` property, so one Recipe Pack can be shared across many Environments.\n\n## Defining a Recipe Pack\n\nEach entry in the `recipes` map is keyed by resource type. Set the recipe `kind` (`bicep` or `terraform`) and its `source` (an OCI registry reference for Bicep recipes, or a module source for Terraform recipes).\n\n```bicep\nextension radius\n\nresource dataRecipes 'Radius.Core/recipePacks@2025-08-01-preview' = {\n name: 'data-recipes'\n properties: {\n recipes: {\n 'Radius.Data/redisCaches': {\n kind: 'bicep'\n source: 'ghcr.io/my-org/recipes/redis:latest'\n }\n 'Radius.Data/postgreSqlDatabases': {\n kind: 'terraform'\n source: 'git::https://github.com/my-org/recipes//postgresql'\n }\n }\n }\n}\n```\n\n## Recipe parameters\n\nEach Recipe can declare default `parameters` that are passed to its module. Platform engineers set baseline values here, and developers get them automatically. An Environment can override these values per resource type through its `recipeParameters` property.\n\n```bicep\nresource dataRecipes 'Radius.Core/recipePacks@2025-08-01-preview' = {\n name: 'data-recipes'\n properties: {\n recipes: {\n 'Radius.Data/redisCaches': {\n kind: 'bicep'\n source: 'ghcr.io/my-org/recipes/redis:latest'\n parameters: {\n sku: 'Standard'\n capacity: 1\n }\n }\n }\n }\n}\n```\n\n## Deploying a Recipe Pack\n\nDeploy the Bicep file with `rad deploy` to create the Recipe Pack resource. Once deployed, list and inspect Recipe Packs with the `rad recipe-pack list` and `rad recipe-pack show` commands.\n\n## Referencing a Recipe Pack from an Environment\n\nAn Environment references a Recipe Pack through its `recipePacks` property. When the Recipe Pack and the Environment are deployed to the same resource group, declare it as an `existing` resource and reference its `.id`:\n\n```bicep\nextension radius\n\nresource dataRecipes 'Radius.Core/recipePacks@2025-08-01-preview' existing = {\n name: 'data-recipes'\n}\n\nresource myEnvironment 'Radius.Core/environments@2025-08-01-preview' = {\n name: 'my-environment'\n properties: {\n recipePacks: [\n dataRecipes.id\n ]\n }\n}\n```\n\nTo reference a Recipe Pack in a different resource group, use its full resource ID instead:\n\n```bicep\nrecipePacks: [\n '/planes/radius/local/resourceGroups/shared/providers/Radius.Core/recipePacks/data-recipes'\n]\n```\n\nRadius is installed with a `default` Recipe Pack in the `default` resource group, which an Environment uses when `recipePacks` is not set.\n\nPrebuilt Recipe Packs and the Recipes they reference are published in the [resource-types-contrib](https://github.com/radius-project/resource-types-contrib) repository.\n\nFor more information, see the Radius documentation at https://docs.radapp.io.", "allOf": [ { "$ref": "#/definitions/Azure.ResourceManager.CommonTypes.TrackedResourceUpdate" @@ -2213,7 +2213,7 @@ "properties": { "secret": { "type": "string", - "description": "The ID of a secret resource containing the authentication token. Supported types: Radius.Security/secrets (recommended) or Applications.Core/secretStores. The secret must have a key named 'token'." + "description": "(Optional) The ID of a `Radius.Security/secrets` resource containing the authentication token. The secret must have a key named `token`." } } }, @@ -2223,14 +2223,14 @@ "properties": { "include": { "type": "array", - "description": "Provider address patterns to include for direct installation.", + "description": "(Optional) Provider address patterns to include for direct installation.", "items": { "type": "string" } }, "exclude": { "type": "array", - "description": "Provider address patterns to exclude from direct installation.", + "description": "(Optional) Provider address patterns to exclude from direct installation.", "items": { "type": "string" } @@ -2243,11 +2243,11 @@ "properties": { "networkMirror": { "$ref": "#/definitions/TerraformProviderMirror", - "description": "Network mirror configuration for downloading providers." + "description": "(Optional) A network mirror to install providers from instead of the public registry." }, "direct": { "$ref": "#/definitions/TerraformProviderDirect", - "description": "Direct provider installation configuration." + "description": "(Optional) Providers to install directly from the public registry rather than a mirror." } } }, @@ -2257,18 +2257,18 @@ "properties": { "url": { "type": "string", - "description": "The URL of the provider mirror." + "description": "(Optional) The URL of the provider mirror." }, "include": { "type": "array", - "description": "Provider address patterns to include from this mirror.", + "description": "(Optional) Provider address patterns to include from this mirror.", "items": { "type": "string" } }, "exclude": { "type": "array", - "description": "Provider address patterns to exclude from this mirror.", + "description": "(Optional) Provider address patterns to exclude from this mirror.", "items": { "type": "string" } @@ -2277,16 +2277,16 @@ }, "TerraformSettingsProperties": { "type": "object", - "description": "Terraform configuration properties.", + "description": "Terraform settings properties.", "properties": { "provisioningState": { "$ref": "#/definitions/ProvisioningState", - "description": "The status of the asynchronous operation.", + "description": "(Read Only) The status of the Terraform settings resource within the Radius control plane.", "readOnly": true }, "referencedBy": { "type": "array", - "description": "Environments that reference this Terraform configuration.", + "description": "(Read Only) Resource IDs of the Environments that reference this Terraform settings resource.", "items": { "type": "string" }, @@ -2294,11 +2294,11 @@ }, "terraformrc": { "$ref": "#/definitions/TerraformrcConfig", - "description": "Terraform CLI configuration file settings. Maps directly to the Terraform CLI configuration file (.terraformrc)." + "description": "(Optional) Settings for the Terraform CLI configuration file. Radius renders these into a `.terraformrc` file used when running Terraform Recipes." }, "env": { "type": "object", - "description": "Environment variables injected during Terraform recipe execution.", + "description": "(Optional) Environment variables injected into the Terraform process during Recipe execution.", "additionalProperties": { "type": "string" } @@ -2307,7 +2307,7 @@ }, "TerraformSettingsResource": { "type": "object", - "description": "The Terraform configuration resource, providing reusable Terraform recipe settings for environments.", + "description": "The `Radius.Core/terraformSettings` Resource Type holds reusable Terraform CLI settings that Environments apply when running Terraform Recipes. Its primary use is authenticating to private Terraform registries that host the modules referenced by a Recipe Pack, along with configuring provider installation and injecting environment variables during Recipe execution.\n\nPlatform engineers define a `Radius.Core/terraformSettings` resource once and reference it from any Environment whose Recipes pull modules from a private registry.\n\n## Defining Terraform settings\n\nConfigure `terraformrc.credentials`, keyed by registry hostname, to authenticate to a private Terraform registry. Each entry points to a secret whose `token` key holds the registry token:\n\n```bicep\nextension radius\n\n@description('The Radius Environment ID. Injected automatically by the rad CLI.')\nparam environment string\n\nresource registrySecret 'Radius.Security/secrets@2025-08-01-preview' = {\n name: 'terraform-registry-token'\n properties: {\n environment: environment\n data: {\n token: { value: 'my-registry-token' }\n }\n }\n}\n\nresource terraformRegistry 'Radius.Core/terraformSettings@2025-08-01-preview' = {\n name: 'private-registry'\n properties: {\n terraformrc: {\n credentials: {\n 'app.terraform.io': {\n secret: registrySecret.id\n }\n }\n }\n }\n}\n```\n\nTwo other settings are available: provider installation and environment variables.\n\n### Provider installation\n\nIn air-gapped or internal environments, use `terraformrc.providerInstallation` to install providers from a network mirror instead of the public registry. Set the mirror `url`, optionally narrow it with `include` or `exclude` provider address patterns, and use `direct` to control which providers are still downloaded directly:\n\n```bicep\nresource providerMirror 'Radius.Core/terraformSettings@2025-08-01-preview' = {\n name: 'internal-mirror'\n properties: {\n terraformrc: {\n providerInstallation: {\n networkMirror: {\n url: 'https://terraform.corp.example.com/providers/'\n include: ['*']\n }\n direct: {\n exclude: ['*']\n }\n }\n }\n }\n}\n```\n\n### Environment variables\n\nUse `env` to inject environment variables into every Terraform Recipe run, for example to raise the Terraform log level for troubleshooting or to tune CLI behavior:\n\n```bicep\nresource terraformLogging 'Radius.Core/terraformSettings@2025-08-01-preview' = {\n name: 'terraform-logging'\n properties: {\n env: {\n TF_LOG: 'TRACE'\n TF_REGISTRY_CLIENT_TIMEOUT: '15'\n }\n }\n}\n```\n\n## Deploying Terraform settings\n\nDeploy the settings resource with the `rad deploy` command:\n\n```bash\nrad deploy ./terraform-settings.bicep\n```\n\n## Referencing Terraform settings from an Environment\n\nReference the settings from an Environment by setting its `terraformSettings` property to the resource ID. Every Terraform Recipe run in that Environment then uses the configured registry credentials:\n\n```bicep\nextension radius\n\nresource terraformRegistry 'Radius.Core/terraformSettings@2025-08-01-preview' existing = {\n name: 'private-registry'\n}\n\nresource myEnvironment 'Radius.Core/environments@2025-08-01-preview' = {\n name: 'my-environment'\n properties: {\n terraformSettings: terraformRegistry.id\n }\n}\n```\n\nFor more information, see the Radius documentation at https://docs.radapp.io.", "properties": { "properties": { "$ref": "#/definitions/TerraformSettingsProperties", @@ -2351,7 +2351,7 @@ }, "TerraformSettingsResourceUpdate": { "type": "object", - "description": "The Terraform configuration resource, providing reusable Terraform recipe settings for environments.", + "description": "The `Radius.Core/terraformSettings` Resource Type holds reusable Terraform CLI settings that Environments apply when running Terraform Recipes. Its primary use is authenticating to private Terraform registries that host the modules referenced by a Recipe Pack, along with configuring provider installation and injecting environment variables during Recipe execution.\n\nPlatform engineers define a `Radius.Core/terraformSettings` resource once and reference it from any Environment whose Recipes pull modules from a private registry.\n\n## Defining Terraform settings\n\nConfigure `terraformrc.credentials`, keyed by registry hostname, to authenticate to a private Terraform registry. Each entry points to a secret whose `token` key holds the registry token:\n\n```bicep\nextension radius\n\n@description('The Radius Environment ID. Injected automatically by the rad CLI.')\nparam environment string\n\nresource registrySecret 'Radius.Security/secrets@2025-08-01-preview' = {\n name: 'terraform-registry-token'\n properties: {\n environment: environment\n data: {\n token: { value: 'my-registry-token' }\n }\n }\n}\n\nresource terraformRegistry 'Radius.Core/terraformSettings@2025-08-01-preview' = {\n name: 'private-registry'\n properties: {\n terraformrc: {\n credentials: {\n 'app.terraform.io': {\n secret: registrySecret.id\n }\n }\n }\n }\n}\n```\n\nTwo other settings are available: provider installation and environment variables.\n\n### Provider installation\n\nIn air-gapped or internal environments, use `terraformrc.providerInstallation` to install providers from a network mirror instead of the public registry. Set the mirror `url`, optionally narrow it with `include` or `exclude` provider address patterns, and use `direct` to control which providers are still downloaded directly:\n\n```bicep\nresource providerMirror 'Radius.Core/terraformSettings@2025-08-01-preview' = {\n name: 'internal-mirror'\n properties: {\n terraformrc: {\n providerInstallation: {\n networkMirror: {\n url: 'https://terraform.corp.example.com/providers/'\n include: ['*']\n }\n direct: {\n exclude: ['*']\n }\n }\n }\n }\n}\n```\n\n### Environment variables\n\nUse `env` to inject environment variables into every Terraform Recipe run, for example to raise the Terraform log level for troubleshooting or to tune CLI behavior:\n\n```bicep\nresource terraformLogging 'Radius.Core/terraformSettings@2025-08-01-preview' = {\n name: 'terraform-logging'\n properties: {\n env: {\n TF_LOG: 'TRACE'\n TF_REGISTRY_CLIENT_TIMEOUT: '15'\n }\n }\n}\n```\n\n## Deploying Terraform settings\n\nDeploy the settings resource with the `rad deploy` command:\n\n```bash\nrad deploy ./terraform-settings.bicep\n```\n\n## Referencing Terraform settings from an Environment\n\nReference the settings from an Environment by setting its `terraformSettings` property to the resource ID. Every Terraform Recipe run in that Environment then uses the configured registry credentials:\n\n```bicep\nextension radius\n\nresource terraformRegistry 'Radius.Core/terraformSettings@2025-08-01-preview' existing = {\n name: 'private-registry'\n}\n\nresource myEnvironment 'Radius.Core/environments@2025-08-01-preview' = {\n name: 'my-environment'\n properties: {\n terraformSettings: terraformRegistry.id\n }\n}\n```\n\nFor more information, see the Radius documentation at https://docs.radapp.io.", "allOf": [ { "$ref": "#/definitions/Azure.ResourceManager.CommonTypes.TrackedResourceUpdate" @@ -2364,11 +2364,11 @@ "properties": { "providerInstallation": { "$ref": "#/definitions/TerraformProviderInstallation", - "description": "Provider installation configuration. Specifies the location of providers via network mirrors or direct downloads." + "description": "(Optional) Controls where Terraform installs providers from, such as a network mirror instead of the public registry." }, "credentials": { "type": "object", - "description": "Credentials for authenticating to private Terraform registries (HTTP-based, e.g. app.terraform.io). Map of registry hostname to credential configuration. Rendered as native `credentials \"hostname\" {}` blocks in the generated .terraformrc. Note: this is for Terraform CLI registry auth (HTTP), not for Git-based module sources; Git auth is a separate mechanism.", + "description": "(Optional) Credentials for authenticating to private Terraform registries such as `app.terraform.io`. Maps a registry hostname to its credential configuration. This authenticates to Terraform CLI registries over HTTP and does not authenticate Git-based module sources, which use a separate mechanism.", "additionalProperties": { "$ref": "#/definitions/TerraformCredentialConfig" } diff --git a/typespec/Radius.Core/applications.tsp b/typespec/Radius.Core/applications.tsp index c1b74665cd..220537de25 100644 --- a/typespec/Radius.Core/applications.tsp +++ b/typespec/Radius.Core/applications.tsp @@ -35,7 +35,56 @@ using OpenAPI; namespace Radius.Core; -@doc("Radius Application resource") +@doc(""" + The `Radius.Core/applications` Resource Type represents a Radius Application: a logical grouping of the resources that make up a single Application, such as containers, databases, and message queues, along with the connections between them. Radius uses the Application to build the application graph, apply shared configuration, and manage its resources together throughout their lifecycle. + + ## Defining an Application + + An Application is always deployed to a Radius Environment, which is supplied through the `environment` property. To define an Application, add a `Radius.Core/applications` resource to your application definition Bicep file. + + ```bicep + extension radius + + @description('The Radius Environment ID. Injected automatically by the rad CLI.') + param environment string + + resource myApp 'Radius.Core/applications@2025-08-01-preview' = { + name: 'my-app' + properties: { + environment: environment + } + } + ``` + + ## Deploying an Application + + An Application is deployed with the `rad deploy` command, which deploys the Application together with the resources that belong to it: + + ```bash + rad deploy ./app.bicep + ``` + + ## Adding resources to an Application + + Resources are composed into an Application by setting their `application` property to the Application's ID. For example, to add a Container to this Application, add the following to the application definition Bicep file and set `application: myApp.id`: + + ```bicep + resource frontend 'Radius.Compute/containers@2025-08-01-preview' = { + name: 'frontend' + properties: { + environment: environment + application: myApp.id + containers: { + frontend: { + image: 'ghcr.io/my-org/frontend:latest' + } + } + } + } + ``` + + For more information, see the Radius documentation at https://docs.radapp.io. + """) model ApplicationResource is TrackedResourceRequired { @doc("The application name") @@ -48,14 +97,14 @@ model ApplicationResource @doc("Application properties") model ApplicationProperties { - @doc("The status of the asynchronous operation.") + @doc("(Read Only) The status of the Application resource within the Radius control plane. Does not include the other resources that compose the Application.") @visibility(Lifecycle.Read) provisioningState?: ProvisioningState; - @doc("Fully qualified resource ID for the environment that the application is linked to") + @doc("(Required) Fully qualified resource ID of the environment the application is deployed to") environment: string; - @doc("Status of a resource.") + @doc("(Read Only) Deployment details for the Application, including any output resources Radius created for it.") @visibility(Lifecycle.Read) status?: ResourceStatus; } diff --git a/typespec/Radius.Core/bicepSettings.tsp b/typespec/Radius.Core/bicepSettings.tsp index 33087d2433..139313c3e7 100644 --- a/typespec/Radius.Core/bicepSettings.tsp +++ b/typespec/Radius.Core/bicepSettings.tsp @@ -35,45 +35,114 @@ using OpenAPI; namespace Radius.Core; -@doc("The Bicep configuration resource, providing reusable Bicep recipe settings for environments.") +@doc(""" + The `Radius.Core/bicepSettings` Resource Type holds reusable Bicep engine settings that Environments apply when running Bicep Recipes. Its primary use is authenticating to private Bicep registries: OCI registries, such as Azure Container Registry, that host the Recipe templates referenced by a Recipe Pack. + + Platform engineers define a `Radius.Core/bicepSettings` resource once and reference it from any Environment whose Recipes pull templates from a private registry. + + ## Defining Bicep settings + + Configure `registryAuthentications`, keyed by registry hostname. When a Recipe template is pulled from a matching host, Radius authenticates using the configured method. The example below uses basic authentication, reading the username and password from a secret: + + ```bicep + extension radius + + @description('The Radius Environment ID. Injected automatically by the rad CLI.') + param environment string + + resource registrySecret 'Radius.Security/secrets@2025-08-01-preview' = { + name: 'registry-credentials' + properties: { + environment: environment + data: { + username: { value: 'my-username' } + password: { value: 'my-password' } + } + } + } + + resource bicepRegistry 'Radius.Core/bicepSettings@2025-08-01-preview' = { + name: 'private-registry' + properties: { + registryAuthentications: { + 'corp.azurecr.io': { + authenticationMethod: 'BasicAuth' + basicAuthSecretId: registrySecret.id + } + } + } + } + ``` + + Three authentication methods are supported: `BasicAuth` (username and password from a secret), `AwsIrsa` (AWS IAM Roles for Service Accounts, using `awsIamRoleArn`), and `AzureWI` (Azure Workload Identity, using `azureWiClientId` and `azureWiTenantId`). + + ## Deploying Bicep settings + + Deploy the settings resource with the `rad deploy` command: + + ```bash + rad deploy ./bicep-settings.bicep + ``` + + ## Referencing Bicep settings from an Environment + + Reference the settings from an Environment by setting its `bicepSettings` property to the resource ID. Every Bicep Recipe run in that Environment then uses the configured registry authentication: + + ```bicep + extension radius + + resource bicepRegistry 'Radius.Core/bicepSettings@2025-08-01-preview' existing = { + name: 'private-registry' + } + + resource myEnvironment 'Radius.Core/environments@2025-08-01-preview' = { + name: 'my-environment' + properties: { + bicepSettings: bicepRegistry.id + } + } + ``` + + For more information, see the Radius documentation at https://docs.radapp.io. + """) model BicepSettingsResource is TrackedResourceRequired { - @doc("Bicep configuration name") + @doc("Bicep settings name") @key("bicepSettingsName") @path @segment("bicepSettings") name: ResourceNameString; } -@doc("Bicep configuration properties.") +@doc("Bicep settings properties.") model BicepSettingsProperties { - @doc("The status of the asynchronous operation.") + @doc("(Read Only) The status of the Bicep settings resource within the Radius control plane.") @visibility(Lifecycle.Read) provisioningState?: ProvisioningState; - @doc("Environments that reference this Bicep configuration.") + @doc("(Read Only) Resource IDs of the Environments that reference this Bicep settings resource.") @visibility(Lifecycle.Read) referencedBy?: string[]; - @doc("Authentication configuration for private Bicep registries, keyed by registry hostname (e.g. 'corp.acr.io'). The Bicep driver looks up credentials by the host parsed from the recipe template path.") + @doc("(Optional) Authentication for private Bicep registries that host Recipe templates, keyed by registry hostname such as `corp.acr.io`. Radius matches a registry by the hostname in the Recipe source.") registryAuthentications?: Record; } @doc("Authentication configuration for a single private Bicep registry. When `authenticationMethod` is `BasicAuth`, `basicAuthSecretId` is required; the controller rejects configs that omit it.") model BicepRegistryAuthentication { - @doc("The authentication method to use. Supported values: BasicAuth, AzureWI, AwsIrsa.") + @doc("(Optional) How Radius authenticates to the registry.") authenticationMethod?: BicepAuthenticationMethod; - @doc("The ID of a secret resource containing username and password for BasicAuth. Supported types: Radius.Security/secrets (recommended) or Applications.Core/secretStores. Required when authenticationMethod is 'BasicAuth'.") + @doc("(Optional) The ID of a `Radius.Security/secrets` resource containing the username and password. Required when `authenticationMethod` is `BasicAuth`.") basicAuthSecretId?: string; - @doc("Azure Workload Identity client ID. Required when authenticationMethod is 'AzureWI'.") + @doc("(Optional) Azure Workload Identity client ID. Required when `authenticationMethod` is `AzureWI`.") azureWiClientId?: string; - @doc("Azure Workload Identity tenant ID. Required when authenticationMethod is 'AzureWI'.") + @doc("(Optional) Azure Workload Identity tenant ID. Required when `authenticationMethod` is `AzureWI`.") azureWiTenantId?: string; - @doc("AWS IAM Role ARN for IRSA authentication. Required when authenticationMethod is 'AwsIrsa'.") + @doc("(Optional) AWS IAM Role ARN for IRSA authentication. Required when `authenticationMethod` is `AwsIrsa`.") awsIamRoleArn?: string; } diff --git a/typespec/Radius.Core/environments.tsp b/typespec/Radius.Core/environments.tsp index 8a3d5a4eeb..be2ddf96af 100644 --- a/typespec/Radius.Core/environments.tsp +++ b/typespec/Radius.Core/environments.tsp @@ -6,7 +6,7 @@ you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 - + Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. @@ -35,7 +35,109 @@ using OpenAPI; namespace Radius.Core; -@doc("The environment resource") +@doc(""" + The `Radius.Core/environments` Resource Type represents a Radius Environment: the deployment target that platform engineers configure for their developers. Every Radius Application is deployed to an Environment through its `environment` property. + + An Environment defines three things for the Applications deployed to it: + + - **Where resources are deployed**: the target compute platform and cloud provider accounts, set through the `providers` property. + - **Which Recipes are used**: the Recipe Packs whose Recipes provision the infrastructure backing application resources, set through the `recipePacks` property. + - **Advanced Terraform and Bicep settings**: environment-wide Recipe parameters and Terraform or Bicep engine configuration applied when Recipes run. + + ## Defining an Environment + + The simplest Environment can be created directly with the `rad environment create` command, without a Bicep file: + + ```bash + rad environment create my-environment + ``` + + For more advanced configurations, define an Environment as a `Radius.Core/environments` resource in a Bicep file. For example: + + ```bicep + extension radius + + resource myEnvironment 'Radius.Core/environments@2025-08-01-preview' = { + name: 'my-environment' + properties: { + recipePacks: [ + myRecipePack.id + ] + providers: { + kubernetes: { + namespace: 'my-namespace' + } + } + } + } + + resource myRecipePack 'Radius.Core/recipePacks@2025-08-01-preview' existing = { + name: 'my-recipe-pack' + } + ``` + + Both properties have defaults. If `providers` is omitted, resources are deployed to Kubernetes in the `default` namespace. If `recipePacks` is omitted, the Environment uses the `default` Recipe Pack in the `default` resource group. + + ## Deploying an Environment + + Deploy a defined Environment with the `rad deploy` command: + + ```bash + rad deploy ./environment.bicep + ``` + + ## Cloud providers + + By default an Environment deploys to Kubernetes. To deploy cloud resources, configure the `providers` property with your cloud account. For AWS, set the account ID and region: + + ```bicep + extension radius + + resource myEnvironment 'Radius.Core/environments@2025-08-01-preview' = { + name: 'my-environment' + properties: { + providers: { + aws: { + accountId: '123456789012' + region: 'us-west-2' + } + } + } + } + ``` + + For Azure, set the subscription and resource group that resources are deployed into: + + ```bicep + extension radius + + resource myEnvironment 'Radius.Core/environments@2025-08-01-preview' = { + name: 'my-environment' + properties: { + providers: { + azure: { + subscriptionId: '00000000-0000-0000-0000-000000000000' + resourceGroupName: 'my-resource-group' + } + } + } + } + ``` + + The `providers` property selects the target account, but the credentials Radius uses to authenticate to AWS and Azure are configured separately with the `rad credential register` command. + + ## Recipe Packs + + A Recipe Pack is a collection of Recipes, defined as a separate `Radius.Core/recipePacks` resource. A Recipe is an infrastructure-as-code module, a Terraform module or Bicep template, that provisions the infrastructure backing an application resource. Reference one or more Recipe Packs by their resource IDs in the `recipePacks` property to control which Recipes are used. See the `Radius.Core/recipePacks` documentation for details. + + Use `recipeParameters` to pass environment-specific parameters to the Recipes defined in the referenced Recipe Packs, for example to standardize configuration such as SKUs or instance sizes across an Environment. + + ## Advanced Terraform and Bicep settings + + For advanced Terraform and Bicep settings, such as private module sources and registry authentication, reference a `Radius.Core/terraformSettings` or `Radius.Core/bicepSettings` resource from the `terraformSettings` and `bicepSettings` properties. + + For more information, see the Radius documentation at https://docs.radapp.io. + """) model EnvironmentResource is TrackedResourceRequired { @doc("environment name") @@ -47,26 +149,26 @@ model EnvironmentResource @doc("Environment properties") model EnvironmentProperties { - @doc("The status of the asynchronous operation.") + @doc("(Read Only) The status of the Environment resource within the Radius control plane. Does not include the resources deployed to the Environment.") @visibility(Lifecycle.Read) provisioningState?: ProvisioningState; - @doc("List of Recipe Pack resource IDs linked to this environment.") + @doc("(Optional) Resource IDs of the Recipe Packs this Environment uses to provision infrastructure for application resources. Defaults to the `default` Recipe Pack in the `default` resource group if not specified.") recipePacks?: string[]; - @doc("Recipe specific parameters that apply to all resources of a given type in this environment.") + @doc("(Optional) Parameters passed to Recipes when they run, keyed by resource type. Values here override the default parameters defined in the Recipe Pack for every resource of that type deployed to this Environment.") recipeParameters?: Record; - @doc("Cloud provider configuration for the environment.") + @doc("(Optional) Target compute platform and cloud provider accounts that resources are deployed into. Defaults to Kubernetes in the `default` namespace if not specified.") providers?: Providers; - @doc("Resource ID of a Radius.Core/terraformSettings resource providing Terraform recipe settings.") + @doc("(Optional) Resource ID of a `Radius.Core/terraformSettings` resource that supplies Terraform CLI settings, such as private registry credentials, used when running Terraform Recipes in this Environment.") terraformSettings?: string; - @doc("Resource ID of a Radius.Core/bicepSettings resource providing Bicep recipe settings.") + @doc("(Optional) Resource ID of a `Radius.Core/bicepSettings` resource that supplies Bicep engine settings, such as private registry authentication, used when running Bicep Recipes in this Environment.") bicepSettings?: string; - @doc("Simulated environment.") + @doc("(Optional) When true, the Environment is simulated and does not deploy real infrastructure. Recipes are evaluated but no resources are provisioned, which is useful for validating application definitions. Defaults to `false` if not specified.") simulated?: boolean; } @@ -77,38 +179,38 @@ model RecipeParameterValue { @doc("The Azure cloud provider definition.") model ProvidersAzure { - @doc("Azure subscription ID hosting deployed resources.") + @doc("(Required) ID of the Azure subscription that resources are deployed into.") subscriptionId: string; - @doc("Optional resource group name.") + @doc("(Optional) Name of the Azure resource group that resources are deployed into. Most Bicep and Terraform Recipes expect a resource group in the deployment context, so set this whenever deploying Azure resources.") resourceGroupName?: string; - @doc("External identity settings (moved from compute).") + @doc("(Optional) Managed or workload identity Radius uses to authenticate to Azure when deploying resources.") identity?: IdentitySettings; } model ProvidersKubernetes { - @doc("Kubernetes namespace to deploy workloads into.") + @doc("(Required) Kubernetes namespace that workloads are deployed into.") `namespace`: string; } @doc("The AWS cloud provider definition.") model ProvidersAws { - @doc("AWS account ID for AWS resources to be deployed into.") + @doc("(Required) ID of the AWS account that resources are deployed into.") accountId: string; - @doc("AWS region for AWS resources to be deployed into.") + @doc("(Required) AWS region that resources are deployed into.") region: string; } model Providers { - @doc("The Azure cloud provider configuration.") + @doc("(Optional) Configuration for deploying resources to Azure.") azure?: ProvidersAzure; - @doc("The Kubernetes provider configuration.") + @doc("(Optional) Configuration for deploying resources to Kubernetes.") kubernetes?: ProvidersKubernetes; - @doc("The AWS cloud provider configuration.") + @doc("(Optional) Configuration for deploying resources to AWS.") aws?: ProvidersAws; } diff --git a/typespec/Radius.Core/recipePacks.tsp b/typespec/Radius.Core/recipePacks.tsp index ab5a19f275..baaec48f28 100644 --- a/typespec/Radius.Core/recipePacks.tsp +++ b/typespec/Radius.Core/recipePacks.tsp @@ -31,7 +31,96 @@ using TypeSpec.Rest; namespace Radius.Core; -@doc("The recipe pack resource") +@doc(""" + The `Radius.Core/recipePacks` Resource Type represents a Recipe Pack: a named collection of Recipes that platform engineers assign to an Environment. A Recipe maps a resource type (such as `Radius.Data/redisCaches`) to an infrastructure-as-code module, a Terraform module or Bicep template, that provisions the infrastructure backing that resource when a developer deploys it. + + A Recipe Pack is defined as its own resource and referenced from an Environment's `recipePacks` property, so one Recipe Pack can be shared across many Environments. + + ## Defining a Recipe Pack + + Each entry in the `recipes` map is keyed by resource type. Set the recipe `kind` (`bicep` or `terraform`) and its `source` (an OCI registry reference for Bicep recipes, or a module source for Terraform recipes). + + ```bicep + extension radius + + resource dataRecipes 'Radius.Core/recipePacks@2025-08-01-preview' = { + name: 'data-recipes' + properties: { + recipes: { + 'Radius.Data/redisCaches': { + kind: 'bicep' + source: 'ghcr.io/my-org/recipes/redis:latest' + } + 'Radius.Data/postgreSqlDatabases': { + kind: 'terraform' + source: 'git::https://github.com/my-org/recipes//postgresql' + } + } + } + } + ``` + + ## Recipe parameters + + Each Recipe can declare default `parameters` that are passed to its module. Platform engineers set baseline values here, and developers get them automatically. An Environment can override these values per resource type through its `recipeParameters` property. + + ```bicep + resource dataRecipes 'Radius.Core/recipePacks@2025-08-01-preview' = { + name: 'data-recipes' + properties: { + recipes: { + 'Radius.Data/redisCaches': { + kind: 'bicep' + source: 'ghcr.io/my-org/recipes/redis:latest' + parameters: { + sku: 'Standard' + capacity: 1 + } + } + } + } + } + ``` + + ## Deploying a Recipe Pack + + Deploy the Bicep file with `rad deploy` to create the Recipe Pack resource. Once deployed, list and inspect Recipe Packs with the `rad recipe-pack list` and `rad recipe-pack show` commands. + + ## Referencing a Recipe Pack from an Environment + + An Environment references a Recipe Pack through its `recipePacks` property. When the Recipe Pack and the Environment are deployed to the same resource group, declare it as an `existing` resource and reference its `.id`: + + ```bicep + extension radius + + resource dataRecipes 'Radius.Core/recipePacks@2025-08-01-preview' existing = { + name: 'data-recipes' + } + + resource myEnvironment 'Radius.Core/environments@2025-08-01-preview' = { + name: 'my-environment' + properties: { + recipePacks: [ + dataRecipes.id + ] + } + } + ``` + + To reference a Recipe Pack in a different resource group, use its full resource ID instead: + + ```bicep + recipePacks: [ + '/planes/radius/local/resourceGroups/shared/providers/Radius.Core/recipePacks/data-recipes' + ] + ``` + + Radius is installed with a `default` Recipe Pack in the `default` resource group, which an Environment uses when `recipePacks` is not set. + + Prebuilt Recipe Packs and the Recipes they reference are published in the [resource-types-contrib](https://github.com/radius-project/resource-types-contrib) repository. + + For more information, see the Radius documentation at https://docs.radapp.io. + """) model RecipePackResource is TrackedResourceRequired { @doc("Recipe pack name") @@ -43,33 +132,33 @@ model RecipePackResource @doc("Recipe Pack properties") model RecipePackProperties { - @doc("The status of the asynchronous operation") + @doc("(Read Only) The status of the Recipe Pack resource within the Radius control plane.") @visibility(Lifecycle.Read) provisioningState?: ProvisioningState; - @doc("List of environment IDs that reference this recipe pack") + @doc("(Read Only) Resource IDs of the Environments that reference this Recipe Pack.") @visibility(Lifecycle.Read) referencedBy?: string[]; - @doc("Map of resource types to their recipe configurations") + @doc("(Required) The Recipes in this pack, keyed by the resource type each Recipe provisions. Each key is a resource type such as `Radius.Data/redisCaches`.") recipes: Record; } @doc("Recipe definition for a specific resource type") model RecipeDefinition { - @doc("The type of recipe (e.g., Terraform, Bicep)") + @doc("(Required) The kind of Recipe, which determines how Radius runs it.") kind: RecipeKind; - @doc("Connect to the source using HTTP (not HTTPS). This should be used when the source is known not to support HTTPS, for example in a locally hosted registry for Bicep recipes. Defaults to false (use HTTPS/TLS)") + @doc("(Optional) Connect to the source using HTTP instead of HTTPS. Use this only when the source does not support HTTPS such as a locally hosted registry for Bicep recipes. Defaults to `false` if not specified.") plainHttp?: boolean; - @doc("The source of the recipe. For Bicep recipes this is the OCI registry reference. For Terraform recipes this is the module source.") + @doc("(Required) Location of the Recipe. For Bicep Recipes this is an OCI registry reference. For Terraform Recipes this is the module source such as a Git URL or a Terraform registry module.") source: string; - @doc("Parameters to pass to the recipe") + @doc("(Optional) Default parameter values passed to the Recipe when it runs. An Environment can override these per resource type through its `recipeParameters` property.") parameters?: Record; - @doc("Maps the module's outputs onto the resource type's properties, for recipes that point directly at a Bicep or Terraform module. Each entry's value is either a string (the module output name for a non-secret property) or, under the reserved `secrets` key, a nested object mapping secret property names to module output names. A `secrets` entry always routes its module output to the resource's secret outputs regardless of how the module classified it (for example an AVM module's `primaryConnectionString`). Example: `{ host: 'name', secrets: { connectionString: 'primaryConnectionString' } }`.") + @doc("(Optional) Maps the module outputs onto the resource type properties for recipes that point directly at a Bicep or Terraform module. Each value is the module output name for a non-secret property. Under the reserved `secrets` key a nested object maps secret property names to module output names and always routes those outputs to the resource secret outputs.") outputs?: Record; } diff --git a/typespec/Radius.Core/terraformSettings.tsp b/typespec/Radius.Core/terraformSettings.tsp index 0e564b4aa0..8f223dffb4 100644 --- a/typespec/Radius.Core/terraformSettings.tsp +++ b/typespec/Radius.Core/terraformSettings.tsp @@ -35,75 +35,183 @@ using OpenAPI; namespace Radius.Core; -@doc("The Terraform configuration resource, providing reusable Terraform recipe settings for environments.") +@doc(""" + The `Radius.Core/terraformSettings` Resource Type holds reusable Terraform CLI settings that Environments apply when running Terraform Recipes. Its primary use is authenticating to private Terraform registries that host the modules referenced by a Recipe Pack, along with configuring provider installation and injecting environment variables during Recipe execution. + + Platform engineers define a `Radius.Core/terraformSettings` resource once and reference it from any Environment whose Recipes pull modules from a private registry. + + ## Defining Terraform settings + + Configure `terraformrc.credentials`, keyed by registry hostname, to authenticate to a private Terraform registry. Each entry points to a secret whose `token` key holds the registry token: + + ```bicep + extension radius + + @description('The Radius Environment ID. Injected automatically by the rad CLI.') + param environment string + + resource registrySecret 'Radius.Security/secrets@2025-08-01-preview' = { + name: 'terraform-registry-token' + properties: { + environment: environment + data: { + token: { value: 'my-registry-token' } + } + } + } + + resource terraformRegistry 'Radius.Core/terraformSettings@2025-08-01-preview' = { + name: 'private-registry' + properties: { + terraformrc: { + credentials: { + 'app.terraform.io': { + secret: registrySecret.id + } + } + } + } + } + ``` + + Two other settings are available: provider installation and environment variables. + + ### Provider installation + + In air-gapped or internal environments, use `terraformrc.providerInstallation` to install providers from a network mirror instead of the public registry. Set the mirror `url`, optionally narrow it with `include` or `exclude` provider address patterns, and use `direct` to control which providers are still downloaded directly: + + ```bicep + resource providerMirror 'Radius.Core/terraformSettings@2025-08-01-preview' = { + name: 'internal-mirror' + properties: { + terraformrc: { + providerInstallation: { + networkMirror: { + url: 'https://terraform.corp.example.com/providers/' + include: ['*'] + } + direct: { + exclude: ['*'] + } + } + } + } + } + ``` + + ### Environment variables + + Use `env` to inject environment variables into every Terraform Recipe run, for example to raise the Terraform log level for troubleshooting or to tune CLI behavior: + + ```bicep + resource terraformLogging 'Radius.Core/terraformSettings@2025-08-01-preview' = { + name: 'terraform-logging' + properties: { + env: { + TF_LOG: 'TRACE' + TF_REGISTRY_CLIENT_TIMEOUT: '15' + } + } + } + ``` + + ## Deploying Terraform settings + + Deploy the settings resource with the `rad deploy` command: + + ```bash + rad deploy ./terraform-settings.bicep + ``` + + ## Referencing Terraform settings from an Environment + + Reference the settings from an Environment by setting its `terraformSettings` property to the resource ID. Every Terraform Recipe run in that Environment then uses the configured registry credentials: + + ```bicep + extension radius + + resource terraformRegistry 'Radius.Core/terraformSettings@2025-08-01-preview' existing = { + name: 'private-registry' + } + + resource myEnvironment 'Radius.Core/environments@2025-08-01-preview' = { + name: 'my-environment' + properties: { + terraformSettings: terraformRegistry.id + } + } + ``` + + For more information, see the Radius documentation at https://docs.radapp.io. + """) model TerraformSettingsResource is TrackedResourceRequired { - @doc("Terraform configuration name") + @doc("Terraform settings name") @key("terraformSettingsName") @path @segment("terraformSettings") name: ResourceNameString; } -@doc("Terraform configuration properties.") +@doc("Terraform settings properties.") model TerraformSettingsProperties { - @doc("The status of the asynchronous operation.") + @doc("(Read Only) The status of the Terraform settings resource within the Radius control plane.") @visibility(Lifecycle.Read) provisioningState?: ProvisioningState; - @doc("Environments that reference this Terraform configuration.") + @doc("(Read Only) Resource IDs of the Environments that reference this Terraform settings resource.") @visibility(Lifecycle.Read) referencedBy?: string[]; - @doc("Terraform CLI configuration file settings. Maps directly to the Terraform CLI configuration file (.terraformrc).") + @doc("(Optional) Settings for the Terraform CLI configuration file. Radius renders these into a `.terraformrc` file used when running Terraform Recipes.") terraformrc?: TerraformrcConfig; - @doc("Environment variables injected during Terraform recipe execution.") + @doc("(Optional) Environment variables injected into the Terraform process during Recipe execution.") env?: Record; } @doc("Terraform CLI configuration file (.terraformrc) settings. See https://developer.hashicorp.com/terraform/cli/config for details.") model TerraformrcConfig { - @doc("Provider installation configuration. Specifies the location of providers via network mirrors or direct downloads.") + @doc("(Optional) Controls where Terraform installs providers from, such as a network mirror instead of the public registry.") providerInstallation?: TerraformProviderInstallation; - @doc("Credentials for authenticating to private Terraform registries (HTTP-based, e.g. app.terraform.io). Map of registry hostname to credential configuration. Rendered as native `credentials \"hostname\" {}` blocks in the generated .terraformrc. Note: this is for Terraform CLI registry auth (HTTP), not for Git-based module sources; Git auth is a separate mechanism.") + @doc("(Optional) Credentials for authenticating to private Terraform registries such as `app.terraform.io`. Maps a registry hostname to its credential configuration. This authenticates to Terraform CLI registries over HTTP and does not authenticate Git-based module sources, which use a separate mechanism.") credentials?: Record; } @doc("Provider installation configuration for Terraform CLI.") model TerraformProviderInstallation { - @doc("Network mirror configuration for downloading providers.") + @doc("(Optional) A network mirror to install providers from instead of the public registry.") networkMirror?: TerraformProviderMirror; - @doc("Direct provider installation configuration.") + @doc("(Optional) Providers to install directly from the public registry rather than a mirror.") direct?: TerraformProviderDirect; } @doc("Network mirror configuration for Terraform providers.") model TerraformProviderMirror { - @doc("The URL of the provider mirror.") + @doc("(Optional) The URL of the provider mirror.") url?: string; - @doc("Provider address patterns to include from this mirror.") + @doc("(Optional) Provider address patterns to include from this mirror.") include?: string[]; - @doc("Provider address patterns to exclude from this mirror.") + @doc("(Optional) Provider address patterns to exclude from this mirror.") exclude?: string[]; } @doc("Direct provider installation configuration.") model TerraformProviderDirect { - @doc("Provider address patterns to include for direct installation.") + @doc("(Optional) Provider address patterns to include for direct installation.") include?: string[]; - @doc("Provider address patterns to exclude from direct installation.") + @doc("(Optional) Provider address patterns to exclude from direct installation.") exclude?: string[]; } @doc("Credential configuration for a Terraform registry or module source host.") model TerraformCredentialConfig { - @doc("The ID of a secret resource containing the authentication token. Supported types: Radius.Security/secrets (recommended) or Applications.Core/secretStores. The secret must have a key named 'token'.") + @doc("(Optional) The ID of a `Radius.Security/secrets` resource containing the authentication token. The secret must have a key named `token`.") secret?: string; }