Skip to content

Support stop using plan files when applying changes #2057

Open
@suzuki-shunsuke

Description

Feature Overview

Support running terraform apply without a plan file.

Why is the feature needed?

You can't pass input variables to terraform apply when you use a plan file.

$ terraform apply -var foo=foo plan.out

│ Error: Can't set variables when applying a saved plan

│ The -var and -var-file options cannot be used when applying a saved plan file, because a saved plan includes the variable
│ values that were set when it was created.

This is inconvenient if you want to use input variables to change provider's authentication settings.
For example, if you want to change AWS IAM Role by terraform plan and apply dynamically, this issue would be a blocker.

Example Code

tfaction.yaml

apply_with_plan_file: false

Note

No response

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions