You need to automate remediation of Compute Engine instances by resizing disks and tagging the instance for audit. Which IAM pattern is safest and least privilege for this automation?

Answer

Grant only the required permissions for specific operations (e.g., disk resize and instance tagging) and scope resource access using least-privilege roles

Explanation

Least privilege reduces blast radius and aligns permissions with the exact API calls required. Scoping roles to necessary permissions limits impact if the automation is compromised.

Last reviewed: October 2026

Reviewed by FirstInTest Editorial Team

Report an error
QuestionBack to list