Skip to content
This repository was archived by the owner on Apr 6, 2026. It is now read-only.

Move to AzApi to get full exposure to devbox features#16

Merged
raffertyuy merged 18 commits intomicrosoft:mainfrom
arnaudlh:azapi-update
May 30, 2025
Merged

Move to AzApi to get full exposure to devbox features#16
raffertyuy merged 18 commits intomicrosoft:mainfrom
arnaudlh:azapi-update

Conversation

@arnaudlh
Copy link
Copy Markdown
Collaborator

This pull request introduces significant updates to the Terraform configurations, workflows, and documentation to improve compatibility, add features, and enhance testing capabilities. The most notable changes include transitioning to the AzAPI provider, implementing the 2025-04-01-preview API for Azure DevCenter, enhancing workflows for testing, and updating documentation and best practices.

Provider Migration and Azure DevCenter Module Enhancements:

  • Migrated from AzureRM v4.26 to AzAPI v2.4.0 across all configurations and documentation (.github/copilot-instructions.md). Updated references to provider documentation and resource creation examples accordingly. [1] [2]
  • Updated the Azure DevCenter module to support the 2025-04-01-preview API version, adding new features like devBoxProvisioningSettings, networkSettings, and customer-managed key encryption. Ensured backward compatibility and improved identity block handling. [1] [2] [3]

Workflow Improvements:

  • Updated the Terraform testing workflow to use terraform v1.12.1 and introduced a new comprehensive-tests job that consolidates unit and integration tests. Deprecated the example-tests job for simplicity. [1] [2]
  • Added support for running test scripts (tests/run_tests.sh) and made them executable in the workflow. [1] [2]

Documentation and Testing Enhancements:

  • Expanded documentation in .github/copilot-instructions.md and README.md to include detailed guidance on Azure API property naming conventions, testing instructions, and enhanced examples for new features. [1] [2]
  • Added a comprehensive change summary in CHANGES_SUMMARY.md, detailing all updates to the Azure DevCenter module and their testing results.

Pre-Commit and Task Configuration:

  • Replaced the terraform_tfsec pre-commit hook with terraform_trivy for improved security scanning.
  • Added a new task in .vscode/tasks.json to run all Terraform tests using the provided script.

These updates ensure the project is aligned with the latest Azure API standards, enhances developer productivity, and maintains robust testing practices.

arnaudlh and others added 15 commits May 26, 2025 13:02
…including enhanced identity support, new properties, and comprehensive documentation.
… update resource definitions to use AzAPI provider, and improve README documentation.
…ntity management, and add comprehensive configuration options. Update README and examples for clarity and completeness.
… features sections, improve usage examples, and ensure consistency across documentation.
…viders, modules, resources, inputs, and outputs sections for clarity and completeness.
- Removed azurerm provider configuration from provider.tf.
- Deleted obsolete test files: test.tftest.hcl, README.md, and example tests.
- Updated integration tests to check for resource existence instead of specific properties.
- Enhanced unit tests for dev centers, projects, and resource groups with more comprehensive assertions.
- Introduced a new testing guide in docs/testing.md for better clarity on test structure and execution.
- Improved run_tests.sh script for better output and error handling.
- Consolidated test cases for dev centers to cover various identity configurations.
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
…ps support

- Introduced new variable `dev_center_catalogs` to define catalog configurations.
- Implemented validation rules for catalog inputs, ensuring either GitHub or Azure DevOps configuration is specified.
- Created a new module for Dev Center Catalogs with comprehensive tagging and sync type options.
- Enhanced integration tests to validate catalog creation and configurations.
- Added examples for both simple and enhanced catalog setups, demonstrating various use cases.
- Updated run_tests.sh to include new unit test directories for catalog testing.
@arnaudlh arnaudlh added enhancement New feature or request devbox labels May 27, 2025
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull Request Overview

This PR migrates the project from the AzureRM provider to AzAPI, updates the Azure DevCenter module to use the 2025-04-01-preview API with new dev box and network settings, and enhances testing workflows and documentation.

  • Migrated provider references and module implementations to AzAPI v2.4.0 and updated API version to 2025-04-01-preview.
  • Expanded examples (simple and enhanced) with new DevCenter project and catalog settings.
  • Consolidated and improved Terraform testing workflow and updated supporting documentation.

Reviewed Changes

Copilot reviewed 54 out of 54 changed files in this pull request and generated 3 comments.

Show a summary per file
File Description
examples/dev_center_project/simple_case/configuration.tfvars Added minimal example configuration for DevCenter project
examples/dev_center_project/simple_case/README.md Documented usage of the simple-case DevCenter project example
examples/dev_center_project/enhanced_case/configuration.tfvars Added enhanced example with full 2025-04-01-preview features
examples/dev_center_project/configuration.tfvars Updated default example to include new project settings
examples/dev_center_environment_type/configuration.tfvars Added display_name to environment type example
examples/dev_center_catalog/simple_case/configuration.tfvars Added simple catalog example using GitHub and Azure DevOps
examples/dev_center_catalog/simple_case/README.md Documented simple catalog example
examples/dev_center_catalog/enhanced_case/configuration.tfvars Added enterprise-ready catalog example with tagging and secrets
examples/dev_center_catalog/enhanced_case/README.md Documented enhanced catalog example
examples/dev_center/enhanced_case/configuration.tfvars Added DevCenter example with preview API features
docs/testing.md Introduced a comprehensive testing guide
dev_center_projects.tf Switched to resource_group_id and updated module call
dev_center_catalogs.tf Instantiated catalog module with AzAPI patterns
README.md Added new Testing section and instructions
CHANGES_SUMMARY.md Summarized API update and new features
.vscode/tasks.json Added VS Code task to run all Terraform tests
.pre-commit-config.yaml Swapped terraform_tfsec for terraform_trivy in hooks
.github/workflows/terraform-tests.yml Upgraded Terraform version and consolidated test jobs
.github/copilot-instructions.md Updated Copilot instructions to reference AzAPI v2.4.0 and naming conventions
Comments suppressed due to low confidence (1)

tests/unit/dev_center_project/project_test.tftest.hcl:1

  • Add test cases covering the new properties (azure_ai_services_settings, catalog_settings, customization_settings, etc.) introduced in the enhanced example to ensure the module handles these settings correctly.
// run tests for dev_center_project module

Comment thread dev_center_projects.tf
Comment thread README.md
Comment thread examples/dev_center_project/enhanced_case/configuration.tfvars
@arnaudlh arnaudlh self-assigned this May 30, 2025
Copy link
Copy Markdown
Contributor

@LaurentLesle LaurentLesle left a comment

Choose a reason for hiding this comment

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

LGTM with all tests passing

@raffertyuy raffertyuy merged commit 0388085 into microsoft:main May 30, 2025
15 checks passed
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

devbox enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants