Terraform module for access-policy on aws
module "access-policy" {
source = "registry.patterneddesigns.ca/governance/access-policy/aws"
version = "0.1.0"
}policy_name
requiredName of the access policy. Must be unique within your AWS account. Can contain alphanumeric characters, plus (+), equal (=), comma (,), period (.), at (@), underscore (_), and hyphen (-). Maximum 128 characters.
policy_typeType of policy to create. Valid values: iam (standard IAM policy), scp (Service Control Policy for Organizations), boundary (Permission Boundary).
allowed_servicesList of allowed AWS services (e.g., ec2, s3, lambda, dynamodb). Define which AWS services the policy permits access to for least-privilege design.
denied_actionsExplicitly denied actions that should never be performed, regardless of other permissions (e.g., iam:CreateUser, organizations:*).
resource_restrictionsResource-level restrictions by service. A map where keys are service names and values are lists of ARN patterns. Example: { s3 = ["arn:aws:s3:::company-data-*/*"] dynamodb = ["arn:aws:dynamodb:*:*:table/users-*"] }
policy_arnARN of the created policy. Use this for attaching the policy to IAM entities or referencing in other resources.
policy_documentJSON-formatted policy document generated by the module. Useful for debugging, auditing, or using in contexts that require raw policy JSON.
policy_idUnique identifier for the policy. This is the policy's internal AWS ID, distinct from the ARN.