-
-
Notifications
You must be signed in to change notification settings - Fork 112
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
Implement pipeform
for Terraform Operations
#926
Comments
This sounds like a bug in pipeform. Per the docs, it says it's supported.
This would definitely be a welcome enhancement. It would likely benefit your tooling for terraform as well. We can sponsor this development in pipeform, if you're interested.
Yes, this is not good. It should probably work the way you described above, allowing individual resources to be expanded. They shouldn't "disappear". Ideal World
|
Really? I can't find the docs. |
@suzuki-shunsuke here is what I am referring to. Are we talking about the same thing? |
I think it means pipeform can provide TUI for these commands, but it doesn't mean pipeform can output Terraform's conventional outoputs to stdout. |
For pipeform to output the conventional Terraform command output, pipeform needs to convert the output of I checked the output of For instance, {
"@level": "info",
"@message": "github_issue_label.fooo: Plan to create",
"@module": "terraform.ui",
"@timestamp": "2025-01-15T22:33:03.343780+09:00",
"change": {
"resource": {
"addr": "github_issue_label.fooo",
"module": "",
"resource": "github_issue_label.fooo",
"implied_provider": "github",
"resource_type": "github_issue_label",
"resource_name": "fooo",
"resource_key": null
},
"action": "create"
},
"type": "planned_change"
} We can see the resource github_issue_label.fooo is created, but we can't see the attributes of the resource. # github_issue_label.fooo will be created
+ resource "github_issue_label" "fooo" {
+ color = "FF0000"
+ description = "foo"
+ etag = (known after apply)
+ id = (known after apply)
+ name = "fooo"
+ repository = "hoge"
+ url = (known after apply)
} |
So unfortunately, to provide both TUI and the conventional output, we need to run |
TUI has no meaning if you run |
@suzuki-shunsuke if the objective is to also support the regular terraform output, I think that could still be accomplished.
Isn't the workaround as simple as:
|
Oh, I see. Sounds good. |
We need to improve pipeform.
We need to discuss these problems with pipeform's maintainers. |
I'll get the conversation started by opening an issue in the project and linking to this topic. |
@suzuki-shunsuke the terraform plan handling was just resolved in: |
I'm working on it. |
When So I'm wondering if this should be enabled by default.
|
I've created a pull request. This is still work in progress. |
How to install pipeformThere are several options:
You would prefer 3. About 3, this is what you mentioned at magodo/pipeform#9 .
|
I tried to replace pipeform command with Go package. |
This workaround is unavailable for |
I tried it: go install .
cd examples/quick-start-simple
~/go/bin/atmos tf plan station -s dev |
@suzuki-shunsuke Yes, I agree with you. Something is off with this from the DX for Instead, maybe we should strictly focus on apply for now. Also, the two-key press for |
About apply, we need to think about this. #926 (comment)
|
Using pipeform as Go library makes atmos depend on CGO. |
I'm concerned that UI of pipeform may confuse users who aren't familiar with it. |
Problems (Discussion topics)There are some problems, so let's manage the list in this comment.
|
Ugh! Yes, I agree with the implications on long term maintainability for a noncore feature. I am surprised by this! I assumed it was just a thin charmbracelet veneer. What about it depends on CGO? |
Ah, that's unfortunate, I didn't think about that. 🤦♂️ so there are a few things though, and I am not sure this is a deal breaker by itself. In a CI context the UI would be disabled, and tools like tfcmt would work well. You've raised some big concerns and the scope may be larger than initially anticipated, in which case will reevaluate what we do. At this point let me do some more research and get back to you. |
I'm sorry but depending on CGO was my misunderstanding.
In general, CGO is enabled by default. //go:build cgo
package clipboard
import cb "golang.design/x/clipboard"
https://github.com/golang-design/clipboard?tab=readme-ov-file#dependency
On Linux, it depends on X11 dev package. That's why build failed as X11 dev package wasn't installed. To solve the issue, I tried to disable CGO in Makefile. b8c0cac |
Describe the Feature
Improve the console DX of terraform operations by presenting the user with a friendly UI to show terrafom progress.
https://github.com/magodo/pipeform
Expected Behavior
Running
atmos terraform plan
andatmos terraform apply
will launch the pipeform UI. Note, this does not requirepipeform
to be installed, as it will be used as a native Go module.Use Case
On the command line, the output from terraform is overwhelming and doesn't convey the overall progress of the operation. Terraform will feel much friendlier if we present the user with a progress indicator.
Describe Ideal Solution
The UI would be enabled by default, but can be disabled via the
atmos.yaml
configuration.pipeform.mp4
Requirements:
CI=true
environment variable is set, then UI should be automatically disabled--no-ui
flag is explicitly passed, then the UI should be disabled.Alternatives Considered
No response
Additional Context
The pipeform library is licensed MPL2 and is not currently implemented as a Go module. We've contacted the @magodo (author) and he said he would accept a PR converting it to a library. As part of this implementation, we will need to first open a PR for that work.
The text was updated successfully, but these errors were encountered: