feat: Terraform controller for install/uninstall/status#11014
Conversation
There was a problem hiding this comment.
Pull request overview
This pull request introduces a comprehensive Terraform binary installer API for the Universal Control Plane (UCP). The implementation provides HTTP endpoints for installing, uninstalling, and checking the status of Terraform binaries, with support for version management, mirrored downloads, and robust error handling.
Key Changes
- New installer API with dedicated endpoints (
/installer/terraform/install,/uninstall,/status) for managing Terraform binary installations - Worker service for asynchronous processing of install/uninstall operations using a dedicated queue, isolated from ARM operations
- Configuration support for mirrored downloads via
sourceBaseUrloption, enabling air-gapped and custom mirror scenarios
Reviewed changes
Copilot reviewed 18 out of 19 changed files in this pull request and generated 11 comments.
Show a summary per file
| File | Description |
|---|---|
| pkg/ucp/server/server.go | Registers the new installer worker service in the UCP host |
| pkg/ucp/frontend/api/routes.go | Registers installer HTTP endpoints on the UCP router |
| pkg/ucp/config.go | Adds Terraform configuration options to UCP config |
| pkg/terraform/installer/worker.go | Implements worker service that consumes installer queue messages |
| pkg/terraform/installer/routes.go | Defines HTTP handlers for install, uninstall, and status endpoints |
| pkg/terraform/installer/handler.go | Core business logic for downloading, extracting, and managing Terraform binaries |
| pkg/terraform/installer/types.go | Type definitions for requests, responses, status, and enums |
| pkg/terraform/installer/status_store.go | Database-backed persistence for installer status metadata |
| pkg/terraform/installer/queue_status.go | Helper for updating queue information in status |
| pkg/terraform/installer/validation.go | Input validation including path traversal protection |
| pkg/terraform/installer/constants.go | Queue and storage ID constants |
| pkg/terraform/installer/job.go | Queue message payload definition |
| pkg/terraform/installer/handler_test.go | Comprehensive test suite covering install/uninstall scenarios |
| pkg/terraform/installer/validation_test.go | Tests for version and checksum validation |
| pkg/server/apiservice.go | Refactors handler registration to use shared base options |
| pkg/armrpc/hostoptions/providerconfig.go | Adds sourceBaseUrl configuration field |
| docs/ucp/terraform/terraform-installer.md | API documentation for the installer endpoints |
| docs/ucp/readme.md | Adds link to Terraform installer documentation |
| .gitignore | Adds .gocache/ to ignored files |
64d4da6 to
972251e
Compare
ba6912b to
6cc1ccd
Compare
e32b94d to
968531a
Compare
972251e to
b5adc33
Compare
968531a to
51932d8
Compare
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 56 out of 61 changed files in this pull request and generated no new comments.
Files not reviewed (2)
- hack/bicep-types-radius/src/autorest.bicep/package-lock.json: Language not supported
- hack/bicep-types-radius/src/generator/package-lock.json: Language not supported
b5adc33 to
89ebbc4
Compare
89ebbc4 to
b4d9452
Compare
b4d9452 to
cc4362f
Compare
d752abe to
44ad765
Compare
44ad765 to
27413a7
Compare
sylvainsf
left a comment
There was a problem hiding this comment.
only two issues, queue_status.go and validation.go are missing copyright and license. other files should have date 2026 not 2023
27413a7 to
8386ceb
Compare
45c1a6a to
f61aa49
Compare
8386ceb to
47b62db
Compare
Signed-off-by: ytimocin <ytimocin@microsoft.com>
47b62db to
b41ae3d
Compare
sylvainsf
left a comment
There was a problem hiding this comment.
approved thanks for the good work
thanks :) |
Radius functional test overviewClick here to see the test run details
Test Status⌛ Building Radius and pushing container images for functional tests... |
# Description This pull request introduces a new API and supporting backend for installing, uninstalling, and tracking the status of Terraform binaries in the Universal Control Plane (UCP). It includes new documentation, API endpoints, configuration options, and backend logic for managing Terraform installations, with a focus on supporting mirrored downloads and robust status tracking. The most important changes are: **API and Documentation Enhancements:** * Added a new section to the UCP documentation and created `terraform-installer.md` describing the Terraform Installer API, including endpoints for install, uninstall, and status, as well as usage notes. [[1]](diffhunk://#diff-314cc86e95eed998ca73d6e14e038dd28b57ab90a3e427d5850865329af88325L6-R16) [[2]](diffhunk://#diff-9463bcacbdcc18c9cdff7c3094700cd9756b440dddb69177fc6a04341f0a8867R1-R8) **Installer API Endpoints and Handlers:** * Implemented new HTTP endpoints under `/installer/terraform` for installing, uninstalling, and querying the status of Terraform binaries, with handlers for request validation, queueing, and status response. (`pkg/terraform/installer/routes.go`) * Introduced request/response types, status models, and enums for installer operations, version states, health, and API response formatting. (`pkg/terraform/installer/types.go`) **Installer Backend and Status Management:** * Added a persistent status store for installer metadata, including current/previous versions, per-version status, queue info, and error tracking, with database-backed implementation. (`pkg/terraform/installer/status_store.go`) * Added helper for updating queue information in the installer status (e.g., incrementing pending operations). (`pkg/terraform/installer/queue_status.go`) **Configuration and Constants:** * Added a new configuration option `sourceBaseUrl` in `TerraformOptions` to allow downloading Terraform from a mirror, supporting air-gapped setups. (`pkg/armrpc/hostoptions/providerconfig.go`) * Defined installer queue and status storage constants for consistent resource naming. (`pkg/terraform/installer/constants.go`) **Server Integration:** * Updated API service initialization to support the new handler registration pattern, improving clarity and maintainability. (`pkg/server/apiservice.go`) ## 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>
# Description This pull request introduces a new API and supporting backend for installing, uninstalling, and tracking the status of Terraform binaries in the Universal Control Plane (UCP). It includes new documentation, API endpoints, configuration options, and backend logic for managing Terraform installations, with a focus on supporting mirrored downloads and robust status tracking. The most important changes are: **API and Documentation Enhancements:** * Added a new section to the UCP documentation and created `terraform-installer.md` describing the Terraform Installer API, including endpoints for install, uninstall, and status, as well as usage notes. [[1]](diffhunk://#diff-314cc86e95eed998ca73d6e14e038dd28b57ab90a3e427d5850865329af88325L6-R16) [[2]](diffhunk://#diff-9463bcacbdcc18c9cdff7c3094700cd9756b440dddb69177fc6a04341f0a8867R1-R8) **Installer API Endpoints and Handlers:** * Implemented new HTTP endpoints under `/installer/terraform` for installing, uninstalling, and querying the status of Terraform binaries, with handlers for request validation, queueing, and status response. (`pkg/terraform/installer/routes.go`) * Introduced request/response types, status models, and enums for installer operations, version states, health, and API response formatting. (`pkg/terraform/installer/types.go`) **Installer Backend and Status Management:** * Added a persistent status store for installer metadata, including current/previous versions, per-version status, queue info, and error tracking, with database-backed implementation. (`pkg/terraform/installer/status_store.go`) * Added helper for updating queue information in the installer status (e.g., incrementing pending operations). (`pkg/terraform/installer/queue_status.go`) **Configuration and Constants:** * Added a new configuration option `sourceBaseUrl` in `TerraformOptions` to allow downloading Terraform from a mirror, supporting air-gapped setups. (`pkg/armrpc/hostoptions/providerconfig.go`) * Defined installer queue and status storage constants for consistent resource naming. (`pkg/terraform/installer/constants.go`) **Server Integration:** * Updated API service initialization to support the new handler registration pattern, improving clarity and maintainability. (`pkg/server/apiservice.go`) ## 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>
# Description This pull request introduces a new API and supporting backend for installing, uninstalling, and tracking the status of Terraform binaries in the Universal Control Plane (UCP). It includes new documentation, API endpoints, configuration options, and backend logic for managing Terraform installations, with a focus on supporting mirrored downloads and robust status tracking. The most important changes are: **API and Documentation Enhancements:** * Added a new section to the UCP documentation and created `terraform-installer.md` describing the Terraform Installer API, including endpoints for install, uninstall, and status, as well as usage notes. [[1]](diffhunk://#diff-314cc86e95eed998ca73d6e14e038dd28b57ab90a3e427d5850865329af88325L6-R16) [[2]](diffhunk://#diff-9463bcacbdcc18c9cdff7c3094700cd9756b440dddb69177fc6a04341f0a8867R1-R8) **Installer API Endpoints and Handlers:** * Implemented new HTTP endpoints under `/installer/terraform` for installing, uninstalling, and querying the status of Terraform binaries, with handlers for request validation, queueing, and status response. (`pkg/terraform/installer/routes.go`) * Introduced request/response types, status models, and enums for installer operations, version states, health, and API response formatting. (`pkg/terraform/installer/types.go`) **Installer Backend and Status Management:** * Added a persistent status store for installer metadata, including current/previous versions, per-version status, queue info, and error tracking, with database-backed implementation. (`pkg/terraform/installer/status_store.go`) * Added helper for updating queue information in the installer status (e.g., incrementing pending operations). (`pkg/terraform/installer/queue_status.go`) **Configuration and Constants:** * Added a new configuration option `sourceBaseUrl` in `TerraformOptions` to allow downloading Terraform from a mirror, supporting air-gapped setups. (`pkg/armrpc/hostoptions/providerconfig.go`) * Defined installer queue and status storage constants for consistent resource naming. (`pkg/terraform/installer/constants.go`) **Server Integration:** * Updated API service initialization to support the new handler registration pattern, improving clarity and maintainability. (`pkg/server/apiservice.go`) ## 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>
# Description This pull request introduces a new API and supporting backend for installing, uninstalling, and tracking the status of Terraform binaries in the Universal Control Plane (UCP). It includes new documentation, API endpoints, configuration options, and backend logic for managing Terraform installations, with a focus on supporting mirrored downloads and robust status tracking. The most important changes are: **API and Documentation Enhancements:** * Added a new section to the UCP documentation and created `terraform-installer.md` describing the Terraform Installer API, including endpoints for install, uninstall, and status, as well as usage notes. [[1]](diffhunk://#diff-314cc86e95eed998ca73d6e14e038dd28b57ab90a3e427d5850865329af88325L6-R16) [[2]](diffhunk://#diff-9463bcacbdcc18c9cdff7c3094700cd9756b440dddb69177fc6a04341f0a8867R1-R8) **Installer API Endpoints and Handlers:** * Implemented new HTTP endpoints under `/installer/terraform` for installing, uninstalling, and querying the status of Terraform binaries, with handlers for request validation, queueing, and status response. (`pkg/terraform/installer/routes.go`) * Introduced request/response types, status models, and enums for installer operations, version states, health, and API response formatting. (`pkg/terraform/installer/types.go`) **Installer Backend and Status Management:** * Added a persistent status store for installer metadata, including current/previous versions, per-version status, queue info, and error tracking, with database-backed implementation. (`pkg/terraform/installer/status_store.go`) * Added helper for updating queue information in the installer status (e.g., incrementing pending operations). (`pkg/terraform/installer/queue_status.go`) **Configuration and Constants:** * Added a new configuration option `sourceBaseUrl` in `TerraformOptions` to allow downloading Terraform from a mirror, supporting air-gapped setups. (`pkg/armrpc/hostoptions/providerconfig.go`) * Defined installer queue and status storage constants for consistent resource naming. (`pkg/terraform/installer/constants.go`) **Server Integration:** * Updated API service initialization to support the new handler registration pattern, improving clarity and maintainability. (`pkg/server/apiservice.go`) ## 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>
# Description This pull request introduces a new API and supporting backend for installing, uninstalling, and tracking the status of Terraform binaries in the Universal Control Plane (UCP). It includes new documentation, API endpoints, configuration options, and backend logic for managing Terraform installations, with a focus on supporting mirrored downloads and robust status tracking. The most important changes are: **API and Documentation Enhancements:** * Added a new section to the UCP documentation and created `terraform-installer.md` describing the Terraform Installer API, including endpoints for install, uninstall, and status, as well as usage notes. [[1]](diffhunk://#diff-314cc86e95eed998ca73d6e14e038dd28b57ab90a3e427d5850865329af88325L6-R16) [[2]](diffhunk://#diff-9463bcacbdcc18c9cdff7c3094700cd9756b440dddb69177fc6a04341f0a8867R1-R8) **Installer API Endpoints and Handlers:** * Implemented new HTTP endpoints under `/installer/terraform` for installing, uninstalling, and querying the status of Terraform binaries, with handlers for request validation, queueing, and status response. (`pkg/terraform/installer/routes.go`) * Introduced request/response types, status models, and enums for installer operations, version states, health, and API response formatting. (`pkg/terraform/installer/types.go`) **Installer Backend and Status Management:** * Added a persistent status store for installer metadata, including current/previous versions, per-version status, queue info, and error tracking, with database-backed implementation. (`pkg/terraform/installer/status_store.go`) * Added helper for updating queue information in the installer status (e.g., incrementing pending operations). (`pkg/terraform/installer/queue_status.go`) **Configuration and Constants:** * Added a new configuration option `sourceBaseUrl` in `TerraformOptions` to allow downloading Terraform from a mirror, supporting air-gapped setups. (`pkg/armrpc/hostoptions/providerconfig.go`) * Defined installer queue and status storage constants for consistent resource naming. (`pkg/terraform/installer/constants.go`) **Server Integration:** * Updated API service initialization to support the new handler registration pattern, improving clarity and maintainability. (`pkg/server/apiservice.go`) ## 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>
# Description This pull request introduces a new API and supporting backend for installing, uninstalling, and tracking the status of Terraform binaries in the Universal Control Plane (UCP). It includes new documentation, API endpoints, configuration options, and backend logic for managing Terraform installations, with a focus on supporting mirrored downloads and robust status tracking. The most important changes are: **API and Documentation Enhancements:** * Added a new section to the UCP documentation and created `terraform-installer.md` describing the Terraform Installer API, including endpoints for install, uninstall, and status, as well as usage notes. [[1]](diffhunk://#diff-314cc86e95eed998ca73d6e14e038dd28b57ab90a3e427d5850865329af88325L6-R16) [[2]](diffhunk://#diff-9463bcacbdcc18c9cdff7c3094700cd9756b440dddb69177fc6a04341f0a8867R1-R8) **Installer API Endpoints and Handlers:** * Implemented new HTTP endpoints under `/installer/terraform` for installing, uninstalling, and querying the status of Terraform binaries, with handlers for request validation, queueing, and status response. (`pkg/terraform/installer/routes.go`) * Introduced request/response types, status models, and enums for installer operations, version states, health, and API response formatting. (`pkg/terraform/installer/types.go`) **Installer Backend and Status Management:** * Added a persistent status store for installer metadata, including current/previous versions, per-version status, queue info, and error tracking, with database-backed implementation. (`pkg/terraform/installer/status_store.go`) * Added helper for updating queue information in the installer status (e.g., incrementing pending operations). (`pkg/terraform/installer/queue_status.go`) **Configuration and Constants:** * Added a new configuration option `sourceBaseUrl` in `TerraformOptions` to allow downloading Terraform from a mirror, supporting air-gapped setups. (`pkg/armrpc/hostoptions/providerconfig.go`) * Defined installer queue and status storage constants for consistent resource naming. (`pkg/terraform/installer/constants.go`) **Server Integration:** * Updated API service initialization to support the new handler registration pattern, improving clarity and maintainability. (`pkg/server/apiservice.go`) ## 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>
Description
This pull request introduces a new API and supporting backend for installing, uninstalling, and tracking the status of Terraform binaries in the Universal Control Plane (UCP). It includes new documentation, API endpoints, configuration options, and backend logic for managing Terraform installations, with a focus on supporting mirrored downloads and robust status tracking.
The most important changes are:
API and Documentation Enhancements:
terraform-installer.mddescribing the Terraform Installer API, including endpoints for install, uninstall, and status, as well as usage notes. [1] [2]Installer API Endpoints and Handlers:
/installer/terraformfor installing, uninstalling, and querying the status of Terraform binaries, with handlers for request validation, queueing, and status response. (pkg/terraform/installer/routes.go)pkg/terraform/installer/types.go)Installer Backend and Status Management:
pkg/terraform/installer/status_store.go)pkg/terraform/installer/queue_status.go)Configuration and Constants:
sourceBaseUrlinTerraformOptionsto allow downloading Terraform from a mirror, supporting air-gapped setups. (pkg/armrpc/hostoptions/providerconfig.go)pkg/terraform/installer/constants.go)Server Integration:
pkg/server/apiservice.go)Type of change
Fixes: #issue_number
Contributor checklist
Please verify that the PR meets the following requirements, where applicable: