Skip to content

Commit f333560

Browse files
save file
1 parent be2e8a9 commit f333560

File tree

1 file changed

+38
-39
lines changed

1 file changed

+38
-39
lines changed

blog/25-07-29/gcloud-grant-admin-priviledges-to-service-account/gcloud-grant-admin-priviledges-to-service-account.html

Lines changed: 38 additions & 39 deletions
Original file line numberDiff line numberDiff line change
@@ -6,19 +6,19 @@
66

77
<head>
88
<meta charset=utf-8>
9-
9+
1010
<title>
1111
gcloud Grant Admin Priviledges To Service Account
1212
</title>
13-
13+
1414
<meta name=description content='Learn how to grant admin privileges to a Google Cloud service account using the gcloud console. This guide walks you through assigning IAM roles, managing permissions, and securing access for cloud resources.'>
1515
<link rel=icon type='image/png' href='/blog/image/blog-30.png'>
1616
<meta name=viewport content='width=device-width, initial-scale=1'>
17-
17+
1818
<base href='https://javascript-2020.github.io/blog/25-07-29/gcloud-grant-admin-priviledges-to-service-account/'>
1919
<link rel=canonical href='https://ext-code.com/blog/25-07-29/gcloud-grant-admin-priviledges-to-service-account/gcloud-grant-admin-priviledges-to-service-account.html'>
20-
21-
20+
21+
2222
<script type='application/ld+json'>
2323

2424
{
@@ -32,16 +32,15 @@
3232
"mainEntityOfPage" : {"@type":"WebPage","@id":"https://ext-code.com/blog/25-07-29/gcloud-grant-admin-priviledges-to-service-account/gcloud-grant-admin-priviledges-to-service-account.html"},
3333
"publisher" : {"@type":"Organization","name":"ext-code.com","logo":{"@type":"ImageObject","url":"https://ext-code.com/favicon.ico"}},
3434
}
35-
35+
3636
</script>
37-
38-
39-
<script src='https://libs.ext-code.com/js/dom/component/component.js'></script>
40-
<script src='https://libs.ext-code.com/js/dom/init-hdr/init-hdr.js'></script>
41-
42-
37+
38+
39+
<script src='https://libs.ext-code.com/js/dom/component/v3.0/component.js?hdr'></script>
40+
41+
4342
<link rel=stylesheet href='/blog/css/blog.css'>
44-
43+
4544
<style>
4645

4746
html
@@ -56,50 +55,50 @@
5655
[component]
5756
{display:none}
5857

59-
.description
58+
.description
6059
{max-width:1000px;text-align:justify;border-left:4px solid #4a90e2;padding:1rem;
6160
background-color:#f9f9f9;font-family:system-ui,sans-serif;font-size:1rem;line-height:1.6;color:#333}
6261
.description>p
6362
{margin:0}
6463
.description > p+p
6564
{margin:10px 0}
66-
65+
6766
code
6867
{font-family:monospace;background:whitesmoke}
6968
code.inline
7069
{display:inline;padding:5px 10px}
71-
70+
7271
a
7372
{color:#4a90e2;text-decoration:none;font-weight:500}
74-
a:hover
73+
a:hover
7574
{text-decoration:underline}
7675
.link-domain
7776
{font-size:0.85rem;color:#777;margin-left:0.25rem}
78-
.link-domain::before
77+
.link-domain::before
7978
{content:'['}
8079
.link-domain::after
8180
{content:']'}
8281
.link-txt
8382
{}
84-
83+
8584
input
8685
{font-size:16px;padding:5px 7px;box-sizing:border-box;}
8786
input[type=button]
8887
{cursor:pointer}
89-
90-
91-
88+
89+
90+
9291
code
9392
{background:whitesmoke;border:1px solid gray;padding:10px;font-size:16px}
94-
95-
93+
94+
9695
</style>
9796

9897
</head>
9998

10099

101100
<body>
102-
101+
103102
<blog-hdr component=grp1>
104103
<h1 class=title>
105104
gcloud Grant Admin Priviledges To Service Account
@@ -108,44 +107,44 @@ <h1 class=title>
108107
22 Oct 2025
109108
</time>
110109
</blog-hdr>
111-
112-
110+
111+
113112
<div class=description>
114113
<p>
115114
Learn how to grant admin privileges to a Google Cloud service account using the gcloud console. This guide walks you through
116115
assigning IAM roles, managing permissions, and securing access for cloud resources.
117116
</p>
118117
</div>
119-
120-
121-
122-
118+
119+
120+
121+
123122

124123
<code>
125-
126-
127-
124+
125+
126+
128127
// list roles
129128

130129
gcloud projects get-iam-policy [ project ] `
131130
--flatten="bindings[].members" `
132131
--filter="bindings.members:[ service account email ]" `
133132
--format="table(bindings.role)"
134-
135-
133+
134+
136135
// set roles
137136

138137
gcloud projects add-iam-policy-binding [ project ] `
139138
--member="serviceAccount:[ service account email ]" `
140139
--role="roles/run.admin"
141-
140+
142141
gcloud projects add-iam-policy-binding [ project ] `
143142
--member="serviceAccount:[ service account email ]" `
144143
--role="roles/iam.securityAdmin"
145144

146-
145+
147146
</code>
148-
147+
149148

150149
</body>
151150

0 commit comments

Comments
 (0)