I am trying to mock the Vault provider in my Terraform tests, but I am facing difficulties in configuring the mock correctly. Here is an example from my provider.tf file:
terraform {
required_providers {
vault = {
source = "hashicorp/vault"
version = "~> 3.4"
}
}
}
data “vault_generic_secret” “some_name” {
path = “my/path/test”
}
And here is an example from my test file some.tftest.hcl
:
mock_provider “vault” {
…
}
Could someone help me understand how to properly configure the mock for the Vault provider? Any examples or documentation would be very helpful.
Thank you!