This repository was archived by the owner on Apr 6, 2026. It is now read-only.
Additions to devbox definitions#18
Merged
raffertyuy merged 7 commits intomicrosoft:mainfrom Jun 18, 2025
Merged
Conversation
- Upgrade azurecaf provider version to 1.2.29. - Enhance SKU configuration to support both simple name and full object. - Introduce os_storage_type variable for OS disk configuration. - Simplify hibernate_support to a boolean value. - Enable schema validation for azapi resource. - Add new outputs for image validation status and details. - Create comprehensive unit tests for Dev Box Definition module. - Update README with test coverage and instructions.
Contributor
There was a problem hiding this comment.
Pull Request Overview
This PR enhances Dev Center Dev Box Definitions by adding flexible SKU configurations, introducing an os_storage_type property, simplifying hibernate_support, and updating provider versions and tests.
- Support for both simple
sku_nameand structuredskuobject with validations - Added optional
os_storage_typewith pattern enforcement - Simplified
hibernate_supportto a boolean and updated tests accordingly - Upgraded
azurecafprovider across modules and added lifecycle ignores for system tags
Reviewed Changes
Copilot reviewed 21 out of 21 changed files in this pull request and generated 1 comment.
Show a summary per file
| File | Description |
|---|---|
| variables.tf | Updated dev_center_dev_box_definitions variable to support new fields and validations |
| modules/dev_center_dev_box_definition/variables.tf | Added sku object, os_storage_type, simplified hibernate_support, and validations |
| modules/dev_center_dev_box_definition/module.tf | Built sku_object, merged new fields into resource body, enabled schema validation |
| modules/dev_center_dev_box_definition/output.tf | Added outputs for os_storage_type, validation status, and image details |
| tests/unit/dev_center_dev_box_definition/devbox_definition_test.tftest.hcl | Expanded tests for new fields: storage type, advanced SKU, multiple definitions |
| tests/unit/dev_center_dev_box_definition/README.md | Documented the new test scenarios |
| tests/run_tests.sh | Included the new test directory in the unit test run list |
| provider.tf, modules//module.tf, modules//README.md | Upgraded azurecaf provider version and adjusted resource_type values |
Comments suppressed due to low confidence (3)
modules/dev_center_dev_box_definition/variables.tf:110
- Add a negative unit test for invalid
os_storage_typevalues (e.g., "hdd_100gb") to ensure the new validation block rejects unsupported patterns.
validation {
modules/dev_center_dev_box_definition/variables.tf:74
- Consider adding tests for invalid SKU configurations (missing
name, unsupportedtier, or non-positivecapacity) to verify each validation rule.
validation {
variables.tf:79
- [nitpick] Removing the TFLint ignore may surface unused declaration warnings; if variables remain intentionally declared but unused, consider updating or reintroducing the directive.
-# tflint-ignore: terraform_unused_declarations
Comment on lines
+96
to
+102
| local.sku_object != null ? { | ||
| sku = local.sku_object | ||
| } : var.dev_box_definition.sku_name != null ? { | ||
| sku = { | ||
| name = var.dev_box_definition.sku_name | ||
| } | ||
| }, | ||
| } : {}, |
There was a problem hiding this comment.
[nitpick] Wrap the nested ternary (?:) expressions in parentheses for the SKU block to improve readability and avoid ambiguity.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This pull request introduces enhancements to the Dev Center modules and examples, focusing on improved configuration flexibility, updated dependencies, and refined resource handling. Key changes include support for advanced SKU configurations, addition of new properties like
osStorageType, and updates to provider versions.Enhancements to Dev Box Definitions:
hibernate_supportproperty to use a boolean instead of nested objects for easier configuration. [1] [2]os_storage_typeproperty to specify the storage type for the operating system disk. [1] [2]tier,capacity, andfamily. [1] [2]Updates to Modules:
resource_typevalues inazurecaf_nameresources to align with Azure-specific types (e.g.,azurerm_dev_center,azurerm_dev_center_catalog). [1] [2] [3]ignore_changesfor system-managed tags in thedev_centermodule to handle Azure-added tags gracefully.Provider Version Upgrades:
azurecafprovider version from~> 1.2.0to~> 1.2.29across all modules for compatibility and feature improvements. [1] [2] [3] [4]Validation Enhancements:
skuobject fields, ensuring proper configuration and preventing invalid values (e.g.,tiermust be one of "Free", "Basic", "Standard", "Premium"). [1] [2]os_storage_typeto enforce a specific pattern (e.g.,ssd_256gb).Output Improvements:
os_storage_type,image_validation_status, and other validation-related properties to provide better insight into the configuration and status of Dev Box Definitions.