Problem
When running commands in Sentinel, you may observe the following output:
$ sentinel apply policy-name.sentinel
1 warning occurred:
* /home/sentinel-example/sentinel.hcl:7,1-26: Deprecation warning: "module" block; module "tfplan-functions" uses the deprecated "module" block, which is being removed in a future release. Please update your configuration.
Cause
- Due to changes being made in preparation to allow customers to pin their Sentinel runtime versions, the module block is being deprecated in favor of the import block. The associated documentation can be found here:
https://docs.hashicorp.com/sentinel/configuration#import-modules
Solution
Update your configuration to utilize the import syntax:
import "module" "foo" { source = "modules/foo.sentinel" }
Additional Information
- For additional assistance please contact HashiCorp Support.