policy_id
Unique identifier for the policy. This is the policy's internal AWS ID, distinct from the ARN.
The unique identifier for the policy. This is the policy’s internal AWS ID, distinct from the ARN.
Example Value
ANPAJQABLZS4A3QDU576Q
Common Use Cases
Tracking and Auditing
output "policy_tracking" {
description = "Policy identifiers for audit trail"
value = {
id = module.developer_policy.policy_id
arn = module.developer_policy.policy_arn
name = "developer-access"
}
}
Policy Lifecycle Management
resource "aws_ssm_parameter" "policy_metadata" {
name = "/policies/developer-access/id"
type = "String"
value = module.developer_policy.policy_id
}
Cross-Reference in Logs
Use the policy ID to correlate IAM events in CloudTrail with your Terraform-managed policies.
Usage
module "access_policy" {
source = "registry.patterneddesigns.ca/governance/access-policy/aws"
version = "0.1.0"
# ... inputs
}
# Access this output
output "policy_id" {
value = module.access_policy.policy_id
}