You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Using fake credentials in your provider in the testfile does not always work, the newly implemented mock provider by Terraform has a broader usecase, as it allows faking data sources etc.
cube2222
added
accepted
This issue has been accepted for implementation.
and removed
pending-decision
This issue has not been accepted for implementation nor rejected. It's still open to discussion.
labels
Jan 22, 2024
We've agreed that this makes sense for compatibility purposes, and the core team will pick it up with the goal being a release of this alongside 1.7.0.
When taking this task, and if deciding to use the same syntax as Terraform does (.tfmock.hcl files), make sure these files would be included in the tofu fmt command run - hashicorp/terraform#34577
OpenTofu Version
Use Cases
Test OpenTofu code offline.
Attempted Solutions
Using fake credentials in your provider in the testfile does not always work, the newly implemented mock provider by Terraform has a broader usecase, as it allows faking data sources etc.
https://developer.hashicorp.com/terraform/language/tests/mocking
For example, using fake credentials and trying to retrieve an AMI with
Returns the following error
Proposal
Add support for mocking providers, resources, and data sources.
References
No response
The text was updated successfully, but these errors were encountered: