tfnotify icon indicating copy to clipboard operation
tfnotify copied to clipboard

terraform 0.12 planfile support

Open frealmyr opened this issue 5 years ago • 2 comments

WHAT

Running terraform plan -out=planfile, and then in a later step terraform plan planfile | tfnotify plan no longer works in Terraform >=0.12

WHY

After Terraform 0.12 #19235 it is no longer possible to pass a saved plan file to terraform plan. When attempting to pass terraform plan planfile to tfnotify, terraform throws the following error:

Error: Invalid configuration directory

Cannot pass a saved plan file to the 'terraform plan' command. To apply a
saved plan, use: terraform apply terraform-shared.plan

frealmyr avatar Jul 30 '19 17:07 frealmyr

Support for parsing the terraform show planfile command could fix this, however it seems like the output will be limited to the module names and the corresponding action.

Attempt to run terraform show planfile | tfnotify plan results in:

  + module.gcp.google_storage_bucket_iam_member.users_docker_pull[4]

cannot parse plan result
Exited with code 1

frealmyr avatar Jul 30 '19 17:07 frealmyr

Any thoughts on supporting Terraform v0.12 @b4b4r07 ?

Starefossen avatar Nov 26 '19 21:11 Starefossen