Skip to content

Pulumi のリソース作成が途中でタイムアウトしてしまった際のリカバリー手順 #117

@mziyut

Description

@mziyut

これはなに

  • pulumi up 等で指定インフラ上にリソースを作成中に何らかの理由で実行タスクが失敗した際に発生する事象とそのリカバリー手順をまとめた物
    • 私の場合は、CIのタイムアウト時間を設定しており、実行時間が長くなり途中でJobがキャンセルされてしまった。

リカバリー手順

リカバリーの手順を簡単に記載すると以下のように実行します

  • Pulumi の state を export する
  • Export した state ファイルを編集する (手動)
  • 編集した state ファイルを import する

リカバリーの実行

Pulumi の state を export する

error: the current deployment has 3 resource(s) with pending operations:
  * urn:pulumi:xxxxx::xxxxx::aws:rds/clusterInstance:ClusterInstance::xxxxx-xxxxx, interrupted while creating

These resources are in an unknown state because the Pulumi CLI was interrupted while
waiting for changes to these resources to complete. You should confirm whether or not the
operations listed completed successfully by checking the state of the appropriate provider.
For example, if you are using AWS, you can confirm using the AWS Console.

Once you have confirmed the status of the interrupted operations, you can repair your stack
using 'pulumi stack export' to export your stack to a file. For each operation that succeeded,
remove that operation from the "pending_operations" section of the file. Once this is complete,
use 'pulumi stack import' to import the repaired stack.

refusing to proceed

Metadata

Metadata

Assignees

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions