-
Notifications
You must be signed in to change notification settings - Fork 18
Open
Labels
enhancementNew feature or requestNew feature or request
Description
terraform-plugin-testing version
github.com/hashicorp/terraform-plugin-testing v1.13.3
Use cases
Currently, to test an action with Config mode, you can only do so with the lifecycle.action_trigger field. If there isn't a natural choice for a managed resource to add this to, you can use a terraform_data managed resource as a workaround (which is a null resource that does nothing but take up space in the graph π ):
- https://developer.hashicorp.com/terraform/language/invoke-actions#trigger-an-action-when-applying-a-configuration
local_commandaction using this pattern
Proposal
We should consider adding the CLI flag pass-throughs for invoking an action directly, to provide a more direct test:
- https://developer.hashicorp.com/terraform/language/invoke-actions#invoke-an-action-from-the-cli
- https://github.com/hashicorp/terraform-plugin-testing/blob/main/helper/resource/additional_cli_options.go
We already have a place to put CLI options in terraform-plugin-testing, but we'll need to update terraform-exec to accept the flag (if it hasn't been updated already):
References
remyleone
Metadata
Metadata
Assignees
Labels
enhancementNew feature or requestNew feature or request