Skip to content

Speckit Prototype - direct module support implement#11969

Draft
Reshrahim wants to merge 25 commits into
radius-project:mainfrom
Reshrahim:feature/direct-module-support-implement
Draft

Speckit Prototype - direct module support implement#11969
Reshrahim wants to merge 25 commits into
radius-project:mainfrom
Reshrahim:feature/direct-module-support-implement

Conversation

@Reshrahim
Copy link
Copy Markdown
Contributor

Description

Please explain the changes you've made.

Type of change

  • This pull request fixes a bug in Radius and has an approved issue (issue link required).
  • This pull request adds or changes features of Radius and has an approved issue (issue link required).
  • This pull request is a minor refactor, code cleanup, test improvement, or other maintenance task and doesn't change the functionality of Radius (issue link optional).
  • This pull request is a design document and only includes files in the eng/design-notes directory.

Fixes: #issue_number

Contributor checklist

Please verify that the PR meets the following requirements, where applicable:

  • An overview of proposed schema changes is included in a linked GitHub issue.
    • Yes
    • Not applicable
  • A design document is added or updated under eng/design-notes/ in this repository, if new APIs are being introduced.
    • Yes
    • Not applicable
  • The design document has been reviewed and approved by Radius maintainers/approvers.
    • Yes
    • Not applicable
  • A PR for resource-types-contrib is created, if resource types or recipes are affected by the changes in this PR.
    • Yes
    • Not applicable
  • A PR for dashboard is created, if the Radius Dashboard is affected by the changes in this PR.
    • Yes
    • Not applicable
  • A PR for the documentation repository is created, if the changes in this PR affect the documentation or any user facing updates are made.
    • Yes
    • Not applicable

Copilot AI and others added 25 commits April 23, 2026 22:40
…eters in RecipeDefinition

Agent-Logs-Url: https://github.com/radius-project/radius/sessions/31e3b677-4d45-408c-9577-3b2566d6fdbd

Co-authored-by: Reshrahim <61033581+Reshrahim@users.noreply.github.com>
…RecipeDefinition

Agent-Logs-Url: https://github.com/radius-project/radius/sessions/0ce85ee7-0a61-465f-a997-c744c2fa54b9

Co-authored-by: Reshrahim <61033581+Reshrahim@users.noreply.github.com>
…lainHTTP→plainHttp in converter test

Agent-Logs-Url: https://github.com/radius-project/radius/sessions/410491d9-ec66-4c56-a4bd-c827e37e10b0

Co-authored-by: Reshrahim <61033581+Reshrahim@users.noreply.github.com>
…ate swagger/typespec/bicep-types JSON files

Agent-Logs-Url: https://github.com/radius-project/radius/sessions/087df2c3-04e0-472e-b069-2843e058fa1c

Co-authored-by: Reshrahim <61033581+Reshrahim@users.noreply.github.com>
…d fetchRecipeDefinition

Agent-Logs-Url: https://github.com/radius-project/radius/sessions/0899830b-632d-4a0e-8f45-65d39a9f85e6

Co-authored-by: Reshrahim <61033581+Reshrahim@users.noreply.github.com>
Signed-off-by: Reshma Abdul Rahim <61033581+Reshrahim@users.noreply.github.com>
… module support

Phase 2 - Foundational utilities:
- Add paramresolver package with ResolveParameterExpressions() for {{context.*}} template
  expression resolution including single-level ternary evaluation
- Add util.ApplyOutputsMapping() for mapping module outputs to resource properties
- Add util.ShallowMergeParameters() for merging recipe parameters
- Add Outputs field to EnvironmentDefinition in types.go

Phase 3 - Terraform driver integration:
- Wire expression resolution and shallow merge into generateConfig for direct modules
- Add result vs outputs precedence logic in prepareRecipeResponse (FR-015)
- Add collectFlatOutputs helper for direct module output collection
- Add comprehensive tests for all new functionality

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
- Detect direct modules via absence of 'context' parameter
- Add expression resolution and shallow merge for direct module params
- Add outputs mapping with result/outputs precedence (FR-015)
- Add collectARMOutputValues() and wrapARMParameters() helpers
- Update prepareRecipeResponse signature to accept EnvironmentDefinition
- Add 6 new test cases for direct module scenarios

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
…ameter-naming' into feature/direct-module-support-implement
…ipeline

- Add outputs (Record<string>) to RecipeDefinition in recipePacks.tsp
- Update parameters description to mention {{context.*}} expression support
- Add Outputs field to datamodel RecipeDefinition and internal RecipeDefinition
- Wire outputs through API conversion (toRecipesDataModel/fromRecipesDataModel)
- Propagate Outputs from RecipeDefinition to EnvironmentDefinition in config loader
- Add outputs to test data for round-trip conversion validation
- Regenerate API client code from updated TypeSpec model
- Merge PR radius-project#11760 (standardize recipe parameter naming)

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
- Add Test_DirectModule_Terraform: validates TF direct module with outputs
  mapping and {{context.*}} expression resolution in parameters
- Add Test_DirectModule_BackwardCompat: regression test verifying wrapped
  recipes (context variable + result output) work unchanged
- Add Bicep templates for both test scenarios
- Tests follow existing recipepacks_test.go patterns (namespace creation,
  resource type registration, deploy executor, post-step verification)

Note: These tests require a running Radius cluster to execute.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
- Add outputs property to RecipeDefinition in Bicep type definitions
  so Bicep files can reference the outputs field without squiggles
- Add env.bicep example showing terraform-aws-modules/rds/aws as a
  direct module with {{context.*}} expressions and outputs mapping
- Add main.tf example showing the refactored direct module pattern
- Fix gofmt formatting in resolver_test.go

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Signed-off-by: Reshma Abdul Rahim <reshmarahim.abdul@microsoft.com>
@radius-functional-tests
Copy link
Copy Markdown

radius-functional-tests Bot commented May 20, 2026

Radius functional test overview

🔍 Go to test action run

Click here to see the test run details
Name Value
Repository Reshrahim/radius
Commit ref fb2a0fc
Unique ID funcfd146accd3
Image tag pr-funcfd146accd3
  • gotestsum 1.13.0
  • KinD: v0.29.0
  • Dapr: 1.14.4
  • Azure KeyVault CSI driver: 1.4.2
  • Azure Workload identity webhook: 1.3.0
  • Bicep recipe location ghcr.io/radius-project/dev/test/testrecipes/test-bicep-recipes/<name>:pr-funcfd146accd3
  • Terraform recipe location http://tf-module-server.radius-test-tf-module-server.svc.cluster.local/<name>.zip (in cluster)
  • applications-rp test image location: ghcr.io/radius-project/dev/applications-rp:pr-funcfd146accd3
  • dynamic-rp test image location: ghcr.io/radius-project/dev/dynamic-rp:pr-funcfd146accd3
  • controller test image location: ghcr.io/radius-project/dev/controller:pr-funcfd146accd3
  • ucp test image location: ghcr.io/radius-project/dev/ucpd:pr-funcfd146accd3
  • deployment-engine test image location: ghcr.io/radius-project/deployment-engine:latest

Test Status

⌛ Building Radius and pushing container images for functional tests...
✅ Container images build succeeded
⌛ Publishing Bicep Recipes for functional tests...
✅ Recipe publishing succeeded
⌛ Starting ucp-cloud functional tests...
⌛ Starting corerp-cloud functional tests...
✅ ucp-cloud functional tests succeeded
✅ corerp-cloud functional tests succeeded

@Reshrahim
Copy link
Copy Markdown
Contributor Author

@willdavsmith - Here is the prototype for the Direct Recipe Module support which also has
#11760

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

changes to /driver contains the direct Recipe module support

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants