-
Notifications
You must be signed in to change notification settings - Fork 120
feat: Add rad terraform CLI commands #11049
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: features/terraform-bicep-settings
Are you sure you want to change the base?
feat: Add rad terraform CLI commands #11049
Conversation
There was a problem hiding this 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 adds new rad terraform CLI commands to manage Terraform installation within Radius. The feature allows users to install, uninstall, and check the status of Terraform, which is used for executing Terraform recipes.
Changes:
- Introduces three new subcommands under
rad terraform: install, uninstall, and status - Implements a shared HTTP client for communicating with the Terraform installer API
- Adds comprehensive test coverage including unit tests and validation tests
Reviewed changes
Copilot reviewed 11 out of 11 changed files in this pull request and generated no comments.
Show a summary per file
| File | Description |
|---|---|
| pkg/cli/cmd/terraform/terraform.go | Parent command definition for rad terraform |
| pkg/cli/cmd/terraform/install/install.go | Install command with support for version/URL, wait, TLS options |
| pkg/cli/cmd/terraform/install/install_test.go | Comprehensive tests for install command including validation and integration scenarios |
| pkg/cli/cmd/terraform/uninstall/uninstall.go | Uninstall command with wait support and status tracking |
| pkg/cli/cmd/terraform/uninstall/uninstall_test.go | Tests for uninstall command covering various scenarios |
| pkg/cli/cmd/terraform/status/status.go | Status command to display current Terraform installation info |
| pkg/cli/cmd/terraform/status/status_test.go | Tests for status command |
| pkg/cli/cmd/terraform/status/objectformats.go | Table formatting for status output |
| pkg/cli/cmd/terraform/status/objectformats_test.go | Tests for output formatting |
| pkg/cli/cmd/terraform/common/client.go | Shared HTTP client for installer API interactions |
| cmd/rad/cmd/root.go | Registration of new terraform commands in CLI |
| deadline := time.Now().Add(r.Timeout) | ||
| pollInterval := r.PollInterval | ||
|
|
||
| for { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The success check requires both the version state to be "succeeded" AND CurrentVersion == r.Version. This could cause the loop to continue indefinitely if the version succeeds but isn't set as current. We should return an error in this case unless server side has guarantees that install will never succeed without changing current.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Checking
0d57464 to
42f3802
Compare
d752abe to
44ad765
Compare
42f3802 to
ecfe23d
Compare
47b62db to
b41ae3d
Compare
ecfe23d to
f2b10c9
Compare
Signed-off-by: ytimocin <ytimocin@microsoft.com>
f2b10c9 to
2d39529
Compare
Radius functional test overviewClick here to see the test run details
Test Status⌛ Building Radius and pushing container images for functional tests... |
Description
Please explain the changes you've made.
Type of change
Fixes: #issue_number
Contributor checklist
Please verify that the PR meets the following requirements, where applicable: