When using this provider, I'd expect the ssh-tunnel to be opened during the plan and the apply-step, when using those separately.
Actual Behavior
The tunnel opens on terraform plan -out planfile but doesn't open again during terraform apply planfile
Steps to Reproduce
Configure the plugin to your needs
Run terraform plan -out planfile
Run terraform apply planfile
Important Factoids
This issue is actually with the general design of terraform and probably can't be solved in a provider. The problem is, that terraform only refreshes data-resources in the plan-step and then uses the values from there during apply. This is in line of how I'd expect data-resources to work in general. The whole reason for the separate plan/apply-steps is that apply should produce the result laid out in the planfile.
It would be nice to add a warning in the README and documentation of this provider though, since it's a bit of an annoying error to analyze and this way it'd be clear to users right away.
Terraform Version
1.6.6
Affected Resource(s)
Expected Behavior
When using this provider, I'd expect the ssh-tunnel to be opened during the
plan
and theapply
-step, when using those separately.Actual Behavior
The tunnel opens on
terraform plan -out planfile
but doesn't open again duringterraform apply planfile
Steps to Reproduce
terraform plan -out planfile
terraform apply planfile
Important Factoids
This issue is actually with the general design of terraform and probably can't be solved in a provider. The problem is, that terraform only refreshes data-resources in the plan-step and then uses the values from there during apply. This is in line of how I'd expect data-resources to work in general. The whole reason for the separate plan/apply-steps is that
apply
should produce the result laid out in the planfile.It would be nice to add a warning in the README and documentation of this provider though, since it's a bit of an annoying error to analyze and this way it'd be clear to users right away.