Skip to content

Commit 64bcf61

Browse files
committed
Update plan_path documentation
1 parent 50cee51 commit 64bcf61

File tree

4 files changed

+48
-26
lines changed

4 files changed

+48
-26
lines changed

terraform-apply/README.md

Lines changed: 15 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -159,9 +159,22 @@ These input values must be the same as any [`dflook/terraform-plan`](https://git
159159

160160
* `plan_path`
161161

162-
Path to a plan file to apply. This would have been generated by a previous [`dflook/terraform-plan`](https://github.com/dflook/terraform-github-actions/tree/main/terraform-plan) action.
162+
Path to a plan file to apply. This would have been generated by a previous [`dflook/terraform-plan`](https://github.com/dflook/terraform-github-actions/tree/main/terraform-plan) action.
163163

164-
When not supplied, a new plan will be generated.
164+
The default behaviour when this is not set is to generate a plan from the current configuration and compare it to the plan attached to the PR comment.
165+
If it is logically the same, the plan will be applied.
166+
167+
When this is set to a plan file, the plan will not be generated again. If it is the exact same plan as the one attached to the PR comment, it will be applied.
168+
This will be faster than generating a new plan.
169+
170+
There are downsides to applying a stored plan:
171+
- The plan may contain sensitive information so must be stored securely, possibly outside of GitHub.
172+
- It does not account for any changes that have occurred since it was generated, and may no longer be correct.
173+
- Plans must be generated and applied in strict order. Multiple open PRs will cause conflicts if they are applied out of order.
174+
- Plans are not portable between platforms.
175+
- Terraform and provider versions must match between the plan generation and apply.
176+
177+
When `auto_approve` is set to `true`, the plan will be applied without checking if it is the same as the one attached to the PR comment.
165178

166179
- Type: string
167180
- Optional

terraform-plan/README.md

Lines changed: 9 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -313,13 +313,19 @@ The [dflook/terraform-apply](https://github.com/dflook/terraform-github-actions/
313313
This is the path to the generated plan in an opaque binary format.
314314
The path is relative to the Actions workspace.
315315

316+
The plan can be used as the `plan_file` input to the [dflook/terraform-apply](https://github.com/dflook/terraform-github-actions/tree/main/terraform-apply) action.
317+
318+
Terraform plans often contain sensitive information, so this output should be treated with care.
319+
316320
- Type: string
317321

318322
* `json_plan_path`
319323

320324
This is the path to the generated plan in [JSON Output Format](https://www.terraform.io/docs/internals/json-format.html)
321325
The path is relative to the Actions workspace.
322326

327+
Terraform plans often contain sensitive information, so this output should be treated with care.
328+
323329
- Type: string
324330

325331
* `text_plan_path`
@@ -330,20 +336,12 @@ The [dflook/terraform-apply](https://github.com/dflook/terraform-github-actions/
330336
- Type: string
331337

332338
* `to_add`
333-
334-
The number of resources that would be added by this plan.
335-
336-
- Type: number
337-
338339
* `to_change`
339-
340-
The number of resources that would be changed by this plan.
341-
342-
- Type: number
343-
344340
* `to_destroy`
341+
* `to_move`
342+
* `to_import`
345343

346-
The number of resources that would be destroyed by this plan.
344+
The number of resources that would be affected by each type of operation.
347345

348346
- Type: number
349347

tofu-apply/README.md

Lines changed: 15 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -159,9 +159,22 @@ These input values must be the same as any [`dflook/tofu-plan`](https://github.c
159159

160160
* `plan_path`
161161

162-
Path to a plan file to apply. This would have been generated by a previous [`dflook/tofu-plan`](https://github.com/dflook/terraform-github-actions/tree/main/tofu-plan) action.
162+
Path to a plan file to apply. This would have been generated by a previous [`dflook/tofu-plan`](https://github.com/dflook/terraform-github-actions/tree/main/tofu-plan) action.
163163

164-
When not supplied, a new plan will be generated.
164+
The default behaviour when this is not set is to generate a plan from the current configuration and compare it to the plan attached to the PR comment.
165+
If it is logically the same, the plan will be applied.
166+
167+
When this is set to a plan file, the plan will not be generated again. If it is the exact same plan as the one attached to the PR comment, it will be applied.
168+
This will be faster than generating a new plan.
169+
170+
There are downsides to applying a stored plan:
171+
- The plan may contain sensitive information so must be stored securely, possibly outside of GitHub.
172+
- It does not account for any changes that have occurred since it was generated, and may no longer be correct.
173+
- Plans must be generated and applied in strict order. Multiple open PRs will cause conflicts if they are applied out of order.
174+
- Plans are not portable between platforms.
175+
- OpenTofu and provider versions must match between the plan generation and apply.
176+
177+
When `auto_approve` is set to `true`, the plan will be applied without checking if it is the same as the one attached to the PR comment.
165178

166179
- Type: string
167180
- Optional

tofu-plan/README.md

Lines changed: 9 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -313,13 +313,19 @@ The [dflook/tofu-apply](https://github.com/dflook/terraform-github-actions/tree/
313313
This is the path to the generated plan in an opaque binary format.
314314
The path is relative to the Actions workspace.
315315

316+
The plan can be used as the `plan_file` input to the [dflook/tofu-apply](https://github.com/dflook/terraform-github-actions/tree/main/tofu-apply) action.
317+
318+
OpenTofu plans often contain sensitive information, so this output should be treated with care.
319+
316320
- Type: string
317321

318322
* `json_plan_path`
319323

320324
This is the path to the generated plan in [JSON Output Format](https://www.terraform.io/docs/internals/json-format.html)
321325
The path is relative to the Actions workspace.
322326

327+
OpenTofu plans often contain sensitive information, so this output should be treated with care.
328+
323329
- Type: string
324330

325331
* `text_plan_path`
@@ -330,20 +336,12 @@ The [dflook/tofu-apply](https://github.com/dflook/terraform-github-actions/tree/
330336
- Type: string
331337

332338
* `to_add`
333-
334-
The number of resources that would be added by this plan.
335-
336-
- Type: number
337-
338339
* `to_change`
339-
340-
The number of resources that would be changed by this plan.
341-
342-
- Type: number
343-
344340
* `to_destroy`
341+
* `to_move`
342+
* `to_import`
345343

346-
The number of resources that would be destroyed by this plan.
344+
The number of resources that would be affected by each type of operation.
347345

348346
- Type: number
349347

0 commit comments

Comments
 (0)