Skip to content

Output of Terraform CLI Plan Difference During Acceptance Testing #698

@bflad

Description

@bflad

SDK version

v2.4.2

Use-cases

This issue is created by request as part of a series of related acceptance test feature requests that will be cross-referenced to each other for discoverability.

The previous acceptance testing framework included the generated plan differences (e.g. resource create, update, destroy) in debug logging output before actually performing the apply operations with the provider. This was helpful for provider developers to quickly understand what differences "Terraform" (emulated back then) saw between TestStep and how that was mapped to the plans that practitioners would see along with the actual operations performed by the provider. For example, this could help debug unexpected test configuration changes between steps or CustomizeDiff behaviors.

Attempted Solutions

None at the moment, since the temporary directory used by the binary acceptance testing framework (and therefore any potential plan files) cannot be retained. Separate feature request for that incoming.

Proposal

Add the human-readable output of terraform show plan.out (wd.SavedPlanRawStdout) to the debug logging of the acceptance testing framework after generating the saved plan.

While adding the ability to retain the temporary directory would enable provider developers to get at this information eventually, it would require a lot more steps and knowing which saved plan occurred when.

References

Metadata

Metadata

Assignees

Labels

enhancementNew feature or requestsubsystem/testsIssues and feature requests related to the testing framework.

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions