Skip to content

feat: Terraform controller for install/uninstall/status#11014

Merged
ytimocin merged 1 commit into
features/terraform-bicep-settingsfrom
ytimocin/terraform-bicep-settings/terraform-controller
Jan 24, 2026
Merged

feat: Terraform controller for install/uninstall/status#11014
ytimocin merged 1 commit into
features/terraform-bicep-settingsfrom
ytimocin/terraform-bicep-settings/terraform-controller

Conversation

@ytimocin
Copy link
Copy Markdown
Contributor

@ytimocin ytimocin commented Jan 7, 2026

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] [2]

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:

  • An overview of proposed schema changes is included in a linked GitHub issue.
    • Yes
    • Not applicable
  • A design document PR is created in the design-notes repository, if new APIs are being introduced.
    • Yes
    • Not applicable
  • The design document has been reviewed and approved by Radius maintainers/approvers.
    • Yes
    • Not applicable
  • A PR for the samples repository is created, if existing samples are affected by the changes in this PR.
    • Yes
    • Not applicable
  • A PR for the documentation repository is created, if the changes in this PR affect the documentation or any user facing updates are made.
    • Yes
    • Not applicable
  • A PR for the recipes repository is created, if existing recipes are affected by the changes in this PR.
    • Yes
    • Not applicable

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 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 sourceBaseUrl option, 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

Comment thread pkg/terraform/installer/handler.go Outdated
Comment thread pkg/terraform/installer/handler.go Outdated
Comment thread pkg/terraform/installer/handler.go
Comment thread pkg/terraform/installer/validation_test.go Outdated
Comment thread pkg/terraform/installer/handler.go Outdated
Comment thread pkg/terraform/installer/handler_test.go Outdated
Comment thread pkg/terraform/installer/worker.go Outdated
Comment thread pkg/terraform/installer/handler.go Outdated
Comment thread pkg/terraform/installer/routes.go
Comment thread pkg/terraform/installer/handler.go
@ytimocin ytimocin force-pushed the ytimocin/terraform-bicep-settings/terraform-controller branch from 64d4da6 to 972251e Compare January 14, 2026 16:53
@ytimocin ytimocin force-pushed the ytimocin/terraform-bicep-settings/env-typespec-datamodel branch from ba6912b to 6cc1ccd Compare January 14, 2026 16:55
@ytimocin ytimocin requested a review from a team as a code owner January 14, 2026 16:55
Base automatically changed from ytimocin/terraform-bicep-settings/env-typespec-datamodel to features/terraform-bicep-settings January 20, 2026 18:11
@ytimocin ytimocin force-pushed the features/terraform-bicep-settings branch from e32b94d to 968531a Compare January 21, 2026 00:54
@ytimocin ytimocin force-pushed the ytimocin/terraform-bicep-settings/terraform-controller branch from 972251e to b5adc33 Compare January 21, 2026 01:52
@ytimocin ytimocin temporarily deployed to functional-tests January 21, 2026 01:52 — with GitHub Actions Inactive
@ytimocin ytimocin force-pushed the features/terraform-bicep-settings branch from 968531a to 51932d8 Compare January 21, 2026 07:17
@ytimocin ytimocin requested a review from Copilot January 21, 2026 07:23
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

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

@ytimocin ytimocin force-pushed the ytimocin/terraform-bicep-settings/terraform-controller branch from b5adc33 to 89ebbc4 Compare January 21, 2026 07:34
@ytimocin ytimocin force-pushed the ytimocin/terraform-bicep-settings/terraform-controller branch from 89ebbc4 to b4d9452 Compare January 21, 2026 07:45
@ytimocin ytimocin temporarily deployed to functional-tests January 21, 2026 07:45 — with GitHub Actions Inactive
@ytimocin ytimocin requested a review from Copilot January 21, 2026 07:45
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

Copilot reviewed 18 out of 19 changed files in this pull request and generated 20 comments.

Comment thread pkg/terraform/installer/validation_test.go
Comment thread pkg/terraform/installer/job.go Outdated
Comment thread pkg/terraform/installer/handler.go Outdated
Comment thread pkg/terraform/installer/handler.go Outdated
Comment thread pkg/terraform/installer/constants.go Outdated
Comment thread pkg/terraform/installer/worker.go Outdated
Comment thread pkg/terraform/installer/types.go Outdated
Comment thread pkg/terraform/installer/handler_test.go Outdated
Comment thread pkg/terraform/installer/handler.go
Comment thread pkg/terraform/installer/handler.go
@ytimocin ytimocin force-pushed the ytimocin/terraform-bicep-settings/terraform-controller branch from b4d9452 to cc4362f Compare January 21, 2026 20:27
@ytimocin ytimocin force-pushed the ytimocin/terraform-bicep-settings/terraform-controller branch from d752abe to 44ad765 Compare January 23, 2026 00:34
@ytimocin ytimocin force-pushed the ytimocin/terraform-bicep-settings/terraform-controller branch from 44ad765 to 27413a7 Compare January 23, 2026 20:45
Copy link
Copy Markdown
Contributor

@sylvainsf sylvainsf left a comment

Choose a reason for hiding this comment

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

only two issues, queue_status.go and validation.go are missing copyright and license. other files should have date 2026 not 2023

@ytimocin ytimocin force-pushed the ytimocin/terraform-bicep-settings/terraform-controller branch from 27413a7 to 8386ceb Compare January 24, 2026 03:45
@ytimocin ytimocin temporarily deployed to functional-tests January 24, 2026 03:45 — with GitHub Actions Inactive
@ytimocin ytimocin requested a review from sylvainsf January 24, 2026 03:46
@ytimocin ytimocin force-pushed the features/terraform-bicep-settings branch from 45c1a6a to f61aa49 Compare January 24, 2026 04:08
@ytimocin ytimocin force-pushed the ytimocin/terraform-bicep-settings/terraform-controller branch from 8386ceb to 47b62db Compare January 24, 2026 05:11
Signed-off-by: ytimocin <ytimocin@microsoft.com>
@ytimocin ytimocin force-pushed the ytimocin/terraform-bicep-settings/terraform-controller branch from 47b62db to b41ae3d Compare January 24, 2026 05:13
@ytimocin ytimocin temporarily deployed to functional-tests January 24, 2026 05:13 — with GitHub Actions Inactive
Copy link
Copy Markdown
Contributor

@sylvainsf sylvainsf left a comment

Choose a reason for hiding this comment

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

approved thanks for the good work

@ytimocin
Copy link
Copy Markdown
Contributor Author

approved thanks for the good work

thanks :)

@radius-functional-tests
Copy link
Copy Markdown

radius-functional-tests Bot commented Jan 24, 2026

Radius functional test overview

🔍 Go to test action run

Click here to see the test run details
Name Value
Repository radius-project/radius
Commit ref b41ae3d
Unique ID func52bf96e00d
Image tag pr-func52bf96e00d
  • gotestsum 1.13.0
  • KinD: v0.29.0
  • Dapr: 1.14.4
  • Azure KeyVault CSI driver: 1.4.2
  • Azure Workload identity webhook: 1.3.0
  • Bicep recipe location ghcr.io/radius-project/dev/test/testrecipes/test-bicep-recipes/<name>:pr-func52bf96e00d
  • Terraform recipe location http://tf-module-server.radius-test-tf-module-server.svc.cluster.local/<name>.zip (in cluster)
  • applications-rp test image location: ghcr.io/radius-project/dev/applications-rp:pr-func52bf96e00d
  • dynamic-rp test image location: ghcr.io/radius-project/dev/dynamic-rp:pr-func52bf96e00d
  • controller test image location: ghcr.io/radius-project/dev/controller:pr-func52bf96e00d
  • ucp test image location: ghcr.io/radius-project/dev/ucpd:pr-func52bf96e00d
  • deployment-engine test image location: ghcr.io/radius-project/deployment-engine:latest

Test Status

⌛ Building Radius and pushing container images for functional tests...
✅ Container images build succeeded
⌛ Publishing Bicep Recipes for functional tests...
✅ Recipe publishing succeeded
⌛ Starting corerp-cloud functional tests...
⌛ Starting ucp-cloud functional tests...
✅ ucp-cloud functional tests succeeded
✅ corerp-cloud functional tests succeeded

@ytimocin ytimocin merged commit 2f83c6b into features/terraform-bicep-settings Jan 24, 2026
28 checks passed
@ytimocin ytimocin deleted the ytimocin/terraform-bicep-settings/terraform-controller branch January 24, 2026 05:29
ytimocin added a commit that referenced this pull request Jan 27, 2026
# 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>
ytimocin added a commit that referenced this pull request Jan 27, 2026
# 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>
ytimocin added a commit that referenced this pull request Jan 27, 2026
# 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>
ytimocin added a commit that referenced this pull request Jan 28, 2026
# 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>
ytimocin added a commit that referenced this pull request Jan 29, 2026
# 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>
ytimocin added a commit that referenced this pull request Jan 29, 2026
# 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>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants