Hi@akhtar,
You can find one resource in Terraform named aws_efs_file_system_policy. This has the capability to create a policy as shown below.
resource "aws_efs_file_system_policy" "policy" {
file_system_id = aws_efs_file_system.fs.id
policy = <<POLICY
{
"Version": "2012-10-17",
"Id": "ExamplePolicy01",
"Statement": [
{
"Sid": "ExampleSatement01",
"Effect": "Allow",
"Principal": {
"AWS": "*"
},
"Resource": "${aws_efs_file_system.test.arn}",
"Action": [
"elasticfilesystem:ClientMount",
"elasticfilesystem:ClientWrite"
],
"Condition": {
"Bool": {
"aws:SecureTransport": "true"
}
}
}
]
}
POLICY
}