Hello there,
We want to create a Sentinel policy that checks whether the region for the AWS provider belongs to a list of approved regions (like eu-west-1, eu-west-2 but not us-east-1). Policy works like a charm when the region attribute is a static string or a variable but it is not possible to evaluate it when it is a local value.
How do you suggest making sure we are able to evaluate local values in Sentinel? Is that even possible?
tfplan-v2.sentinel extract:
"module.creds:aws.local": {
"alias": "local",
"expressions": {
"region": {
"references": [
"local.aws_region",
],
},
},
"full_name": "registry.terraform.io/hashicorp/aws",
"module_address": "module.creds",
"name": "aws",
},