Skip to content

Instantly share code, notes, and snippets.

@Wintus
Last active June 6, 2023 15:12
Show Gist options
  • Save Wintus/c09dbeaaf6e661127f23ede1e4dde05d to your computer and use it in GitHub Desktop.
Save Wintus/c09dbeaaf6e661127f23ede1e4dde05d to your computer and use it in GitHub Desktop.
GCP IAM model diagram
digraph IAM {
rankdir="LR";
node [shape="component"];
subgraph cluster_iam {
cluster="true";
style="dashed";
label="IAM";
role [label="Role"];
perm [label="Permission"];
pol [label="Allow Policy",
URL="https://cloud.google.com/iam/docs/policies";
URL="https://cloud.google.com/resource-manager/reference/rest/Shared.Types/Policy";
];
binding;
condition;
}
subgraph cluster_members {
style="dashed";
label="Principals";
URL="https://cloud.google.com/iam/docs/principal-identifiers";
member [shape="box"];
sa [label="Service Account",
URL="https://cloud.google.com/iam/docs/service-account-overview";
];
member -> {
sa;
user;
} [dir="back", arrowtail="empty"];
}
subgraph svc {
cluster="true";
style="dashed";
label="Service";
res [label="Resource"];
}
subgraph composition {
edge [dir="back", arrowtail="diamond"];
pol -> binding -> {
role;
member;
/* optional */
condition;
};
role -> perm;
}
perm -> res [label="verb"];
subgraph cluster_resource_manager {
style="dashed";
label="Resource Manager";
parent [shape="box", label="container"];
parent -> {
project;
folder;
org;
} [dir="back", arrowtail="empty"];
subgraph hierarchy {
URL="https://cloud.google.com/resource-manager/docs/cloud-platform-resource-hierarchy";
URL="https://cloud.google.com/iam/docs/resource-hierarchy-access-control";
org -> folder -> project -> res
[dir="back", arrowtail="diamond", label="contains"];
}
}
sa -> res [arrowhead="empty", label="is-a"];
res -> parent [arrowhead="empty", label="inherit"];
subgraph policy_bindings {
URL="https://cloud.google.com/iam/docs/manage-access-other-resources";
URL="https://cloud.google.com/resource-manager/reference/rest/Shared.Types/Binding";
edge [label="policy binding", dir="both"];
pol -> {
res;
parent;
};
}
}
Display the source blob
Display the rendered blob
Raw
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@Wintus
Copy link
Author

Wintus commented Jun 6, 2023

rendered

GCP-IAM

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment