pipedv1 Terraform plugin fails to parse plans that invoke actions

オープン 初心者向け
#7,676 コメント 0 件 リアクション 0 件 担当者 0 名 GitHub で見る

メンテナーはふだん 1 日以内に返信

@abhiraj75 がすでに取り組んでいます。

2026年11月27日 から。

  • #7677 @abhiraj75 による — オープン

評価

難易度
2/5
見積もり時間
1〜3時間
初心者へのやさしさ
78/100
issue の種類
バグ
明瞭さ
明確に書かれている
活発さ
活発
技術スタック
go, terraform

調査の方向性

pkg/app/pipedv1/plugin/terraform/provider/terraform.goから始めて、planHasChangeRegexとparsePlanResultを調べます。次に、Terraformのplan出力の解析に関連するテストを探します。Actions: 1 to invoke.を含むサマリー行で失敗を再現し、この接尾辞がある場合とない場合の両方でサマリーが正常に解析されることを確認します。

索引モデルが issue の本文から書いたものです。

説明

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.

主要言語
Go
スター
1.4k
フォーク
403
平均マージ
2日 9時間
マージ済み PR(30日)
40

環境構築

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

pipe-cd/pipecd のほかの issue

pipe-cd/pipecd の issue をすべて見る

似ている issue

Go の issue をもっと見る

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。