pipedv1 Terraform plugin fails to parse plans that invoke actions

Đang mở Phù hợp với người mới
#7,676 0 bình luận 0 reaction 0 người được giao Xem trên GitHub

Maintainer thường phản hồi trong vòng 1 ngày

@abhiraj75 đang làm issue này rồi.

Từ ngày 27/11/2026.

  • #7677 của @abhiraj75 — đang mở

Đánh giá

Độ khó
2/5
Thời gian dự kiến
1-3 giờ
Mức phù hợp với người mới
78/100
Loại issue
Lỗi
Độ rõ ràng
Đặc tả rõ ràng
Mức độ hoạt động
Sôi nổi
Công nghệ
go, terraform
Lĩnh vực
devops, infrastructure

Hướng nghiên cứu

Bắt đầu với pkg/app/pipedv1/plugin/terraform/provider/terraform.go và kiểm tra planHasChangeRegex cùng parsePlanResult; sau đó tìm các bài kiểm thử liên quan đến việc phân tích đầu ra của Terraform plan. Tái hiện lỗi bằng một dòng tóm tắt có Actions: 1 to invoke. và kiểm tra xem các bản tóm tắt có và không có hậu tố này đều được phân tích thành công.

Do mô hình lập chỉ mục viết ra từ nội dung của issue.

Mô tả

What happened:

Since Terraform v1.14.0, a plan that triggers action blocks prints the summary as

Plan: 1 to add, 0 to change, 0 to destroy. Actions: 1 to invoke.

planHasChangeRegex in pkg/app/pipedv1/plugin/terraform/provider/terraform.go ends with to destroy\.$, so it does not match this line. parsePlanResult returns unable to parse plan output, and the TERRAFORM_PLAN stage and plan preview fail.

What you expected to happen:

The plan is parsed as before (1 to add), and the stage continues.

How to reproduce it:

  1. Use Terraform 1.14.0 or later with this config:
terraform {
  required_providers {
    local = { source = "hashicorp/local", version = "2.9.1" }
  }
}

action "local_command" "notify" {
  config {
    command   = "echo"
    arguments = ["deployed"]
  }
}

resource "terraform_data" "app" {
  input = "v1"
  lifecycle {
    action_trigger {
      events  = [after_create, after_update]
      actions = [action.local_command.notify]
    }
  }
}
  1. Run a TERRAFORM_PLAN stage, or call provider.Terraform.Plan on the directory. It fails with Failed to plan (unable to parse plan output).

Checked with 1.14.0 and 1.17.2. 1.13.5 prints no Actions: suffix and parses fine. pipedv0 has the same regex.

Environment:

  • piped version: pipedv1 at master (2080402c2)
  • control-plane version: not relevant
  • Others: Terraform v1.14.0+, hashicorp/local v2.9.1

I'd like to work on this. The fix is to allow an optional Actions: N to invoke. suffix in the regex, with test cases.

Ngôn ngữ chính
Go
Star
1.4k
Fork
403
Merge trung bình
2 ngày 9 giờ
Pull request đã merge (30 ngày)
40

Chuẩn bị môi trường

Bắt đầu từ đâu

  1. Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
  2. Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
  3. Fork repository và làm thay đổi trên một nhánh.
  4. Mở pull request có tham chiếu số hiệu của issue.

Issue khác của pipe-cd/pipecd

Tất cả issue của pipe-cd/pipecd

Issue tương tự

Thêm issue về Go

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.