Learn how to fetch Secrets From Infisical With Terraform.
infisical
in the required_providers
block within the terraform
block of your configuration file. If you would like to use a specific version of the provider, uncomment and replace <latest version>
with the version of the Infisical provider that you want to use.
host
and service_token
. Replace <>
in service_token
with your actual token. The host
is only required if you are using a self-hosted instance of Infisical.
infisical_secrets
data source to fetch your secrets. In this block, you must set the env_slug
and folder_path
to scope the secrets you want.
env_slug
is the slug of the environment name. This slug name can be found under the project settings page on the Infisical dashboard.
folder_path
is the path to the folder in a given environment. The path /
for root of the environment where as /folder1
is the folder at the root of the environment.
SECRET-NAME
with the actual name of your secret.
For a single secret: