Commit f61aa49
committed
Add env terraform/bicep settings schema (#11013)
# Description
This pull request introduces conversion logic and related tests for the
new `BicepSettingsResource` type in the `v20250801preview` API version,
enabling seamless translation between versioned API models and internal
datamodel representations. Additionally, it updates the
`EnvironmentResource` conversion to include `BicepSettings` and
`TerraformSettings`, and marks several dependencies as peer dependencies
in package lock files.
**API resource conversion logic:**
* Added `bicepsettings_conversion.go` in
`pkg/corerp/api/v20250801preview` to implement bidirectional conversion
between `BicepSettingsResource` (versioned API type) and its internal
datamodel, including detailed mapping for authentication registry
settings.
* Updated `environment_conversion.go` to support conversion of
`BicepSettings` and `TerraformSettings` properties in
`EnvironmentResource`.
**Testing:**
* Added comprehensive unit tests in `bicepsettings_conversion_test.go`
to verify conversion logic for `BicepSettingsResource`, including
authentication scenarios and error handling for invalid types.
**Dependency management:**
* Marked several dependencies as peer dependencies in
`package-lock.json` for both `autorest.bicep` and `generator` packages
to improve dependency resolution and avoid duplication.
[[1]](diffhunk://#diff-075b4bbd5a7ae383d7c25934867346d6019accb02b5c5830c2fe6854ce420203R160)
[[2]](diffhunk://#diff-075b4bbd5a7ae383d7c25934867346d6019accb02b5c5830c2fe6854ce420203R1661)
[[3]](diffhunk://#diff-075b4bbd5a7ae383d7c25934867346d6019accb02b5c5830c2fe6854ce420203R1696)
[[4]](diffhunk://#diff-075b4bbd5a7ae383d7c25934867346d6019accb02b5c5830c2fe6854ce420203R1731)
[[5]](diffhunk://#diff-075b4bbd5a7ae383d7c25934867346d6019accb02b5c5830c2fe6854ce420203R1888)
[[6]](diffhunk://#diff-075b4bbd5a7ae383d7c25934867346d6019accb02b5c5830c2fe6854ce420203R2205)
[[7]](diffhunk://#diff-075b4bbd5a7ae383d7c25934867346d6019accb02b5c5830c2fe6854ce420203R2658)
[[8]](diffhunk://#diff-075b4bbd5a7ae383d7c25934867346d6019accb02b5c5830c2fe6854ce420203R3612)
[[9]](diffhunk://#diff-075b4bbd5a7ae383d7c25934867346d6019accb02b5c5830c2fe6854ce420203R5345)
[[10]](diffhunk://#diff-075b4bbd5a7ae383d7c25934867346d6019accb02b5c5830c2fe6854ce420203R5426)
[[11]](diffhunk://#diff-2c80cff24f8409b4ace1d93aae9e72fe0245398a137e056279b4fba9a788b99eR672)
[[12]](diffhunk://#diff-2c80cff24f8409b4ace1d93aae9e72fe0245398a137e056279b4fba9a788b99eR741)
[[13]](diffhunk://#diff-2c80cff24f8409b4ace1d93aae9e72fe0245398a137e056279b4fba9a788b99eR898)
[[14]](diffhunk://#diff-2c80cff24f8409b4ace1d93aae9e72fe0245398a137e056279b4fba9a788b99eR1265)
[[15]](diffhunk://#diff-2c80cff24f8409b4ace1d93aae9e72fe0245398a137e056279b4fba9a788b99eR2564)
## Type of change
- This pull request adds or changes features of Radius and has an
approved issue (issue link required).
Fixes: #issue_number
## Contributor checklist
Please verify that the PR meets the following requirements, where
applicable:
<!--
This checklist uses "TaskRadio" comments to make certain options
mutually exclusive.
See:
https://github.com/mheap/require-checklist-action?tab=readme-ov-file#radio-groups
For details on how this works and why it's required.
-->
- An overview of proposed schema changes is included in a linked GitHub
issue.
- [ ] Yes <!-- TaskRadio schema -->
- [x] Not applicable <!-- TaskRadio schema -->
- A design document PR is created in the [design-notes
repository](https://github.com/radius-project/design-notes/), if new
APIs are being introduced.
- [ ] Yes <!-- TaskRadio design-pr -->
- [x] Not applicable <!-- TaskRadio design-pr -->
- The design document has been reviewed and approved by Radius
maintainers/approvers.
- [ ] Yes <!-- TaskRadio design-review -->
- [x] Not applicable <!-- TaskRadio design-review -->
- A PR for the [samples
repository](https://github.com/radius-project/samples) is created, if
existing samples are affected by the changes in this PR.
- [ ] Yes <!-- TaskRadio samples-pr -->
- [x] Not applicable <!-- TaskRadio samples-pr -->
- A PR for the [documentation
repository](https://github.com/radius-project/docs) is created, if the
changes in this PR affect the documentation or any user facing updates
are made.
- [ ] Yes <!-- TaskRadio docs-pr -->
- [x] Not applicable <!-- TaskRadio docs-pr -->
- A PR for the [recipes
repository](https://github.com/radius-project/recipes) is created, if
existing recipes are affected by the changes in this PR.
- [ ] Yes <!-- TaskRadio recipes-pr -->
- [x] Not applicable <!-- TaskRadio recipes-pr -->
---------
Signed-off-by: ytimocin <ytimocin@microsoft.com>1 parent e0bdf0a commit f61aa49
File tree
40 files changed
+7189
-174
lines changed- hack/bicep-types-radius/generated
- radius/radius.core/2025-08-01-preview
- pkg/corerp
- api/v20250801preview
- fake
- datamodel
- converter
- frontend/controller
- bicepsettings
- terraformsettings
- setup
- swagger/specification/radius/resource-manager/Radius.Core/preview/2025-08-01-preview
- typespec/Radius.Core
40 files changed
+7189
-174
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
48 | 48 | | |
49 | 49 | | |
50 | 50 | | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
51 | 54 | | |
52 | | - | |
| 55 | + | |
53 | 56 | | |
54 | 57 | | |
55 | | - | |
| 58 | + | |
| 59 | + | |
| 60 | + | |
| 61 | + | |
56 | 62 | | |
57 | 63 | | |
58 | 64 | | |
| |||
0 commit comments