Skip to content

Commit f61aa49

Browse files
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

40 files changed

+7189
-174
lines changed

hack/bicep-types-radius/generated/index.json

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -48,11 +48,17 @@
4848
"Radius.Core/applications@2025-08-01-preview": {
4949
"$ref": "radius/radius.core/2025-08-01-preview/types.json#/44"
5050
},
51+
"Radius.Core/bicepSettings@2025-08-01-preview": {
52+
"$ref": "radius/radius.core/2025-08-01-preview/types.json#/66"
53+
},
5154
"Radius.Core/environments@2025-08-01-preview": {
52-
"$ref": "radius/radius.core/2025-08-01-preview/types.json#/67"
55+
"$ref": "radius/radius.core/2025-08-01-preview/types.json#/89"
5356
},
5457
"Radius.Core/recipePacks@2025-08-01-preview": {
55-
"$ref": "radius/radius.core/2025-08-01-preview/types.json#/89"
58+
"$ref": "radius/radius.core/2025-08-01-preview/types.json#/111"
59+
},
60+
"Radius.Core/terraformSettings@2025-08-01-preview": {
61+
"$ref": "radius/radius.core/2025-08-01-preview/types.json#/147"
5662
}
5763
},
5864
"resourceFunctions": {},

0 commit comments

Comments
 (0)