liveBook · Manning

IAM policy

As explained in Infrastructure as Code, Patterns and Practices: With examples in Python and Terraform

An IAM policy is a declarative access-control specification that grants or denies identities permission to perform actions on resources.

An IAM policy declaratively assigns roles to identities and resources. During infrastructure refactoring, isolate these assignments without changing active permissions or dependencies. section 10.2.1

Separating project IAM

A GCP project assigns viewer, editor, and owner roles to service accounts. Moving those assignments into a dedicated sundew-production-iam configuration preserves live resources when imported state matches the configuration.

How Infrastructure as Code, Patterns and Practices: With examples in Python and Terraform covers it

How deep it goes
Shows copying, generating, importing, removing, and planning, stopping at implementation rather than policy-design theory.
Examples
Uses GCP service accounts with viewer, editor, and owner roles, plus Python-generated JSON and Terraform commands.
What it assumes
Assumes an existing monolithic IaC configuration, live GCP resources, and familiarity with Terraform state operations.
What you can do after
Operate/configure Terraform IAM resources by separating configuration, importing existing state, and verifying zero-change plans.
How it connects
Connects IAM policies with infrastructure as code, Terraform state, service accounts, IAM roles, and idempotent refactoring.

Also explained in

Compare how 3 books explain IAM policy →

Related concepts

This explainer was generated by Manning's knowledge graph from the text of Infrastructure as Code, Patterns and Practices: With examples in Python and Terraform. The section links point to the parts of the book it draws on.