This data source is used to represent configuration files on a local filesystem intended to be uploaded to HCP Terraform and Terraform Enterprise, in lieu of those files being sourced from a configured VCS provider.
A unique checksum is generated for the specified local directory, which allows
resources such as tfe_policy_set
track the files and upload a new gzip compressed
tar file containing configuration files (a Terraform "slug") when those files change.
Tracking a local directory to upload the Sentinel configuration and policies:
data "tfe_slug" "test" {
source_path = "policies/my-policy-set"
}
resource "tfe_policy_set" "test" {
name = "my-policy-set"
organization = "my-org-name"
// reference the tfe_slug data source.
slug = data.tfe_slug.test
}
The following arguments are supported:
source_path
- (Required) The path to the directory where the files are located.