From b11b54e142a7fa67c33b1a5f31e87f78e41ab79b Mon Sep 17 00:00:00 2001 From: Sarah French <15078782+SarahFrench@users.noreply.github.com> Date: Tue, 26 Aug 2025 14:40:25 +0100 Subject: [PATCH] Add code comment to make in-progress migration from Ui to View more obvious (#37492) --- internal/command/meta.go | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/internal/command/meta.go b/internal/command/meta.go index d1d0bbb513..0dc89ecdd0 100644 --- a/internal/command/meta.go +++ b/internal/command/meta.go @@ -72,11 +72,18 @@ type Meta struct { // do some default behavior instead if so, rather than panicking. Streams *terminal.Streams - View *views.View + // View is the newer abstraction used for output from Terraform operations. + // View allows output to be rendered differently, depending on CLI settings. + // Currently the only non-default option is machine-readable output using the`-json` flag. + // We are slowly migrating Terraform operations away from using `cli.Ui` and towards + // using `views.View`, and so far only the commands with machine-readable output features are + // migrated. + // For more information see: https://github.com/hashicorp/terraform/issues/37439 + View *views.View // View for output Color bool // True if output should be colored GlobalPluginDirs []string // Additional paths to search for plugins - Ui cli.Ui // Ui for output + Ui cli.Ui // Ui for output. See View above. // Services provides access to remote endpoint information for // "terraform-native' services running at a specific user-facing hostname.