@@ -10,19 +10,19 @@ the relevant service account assigned.
10
10
11
11
## 1. Get your Google service account OAuth Client ID
12
12
13
- > (Optional): If you do not yet have a service account,
14
- > [ here is the Google IAM documentation on creating a service account] ( https://cloud.google.com/iam/docs/service-accounts-create ) .
15
-
16
13
Navigate to the Google Cloud console, and select ** IAM & Admin** > ** Service
17
14
Accounts** . View the service account you want to use, and copy the ** OAuth 2
18
15
Client ID** value shown on the right-hand side of the row.
19
16
20
- ## 1. Create AWS role
17
+ > (Optional): If you do not yet have a service account,
18
+ > [ here is the Google IAM documentation on creating a service account] ( https://cloud.google.com/iam/docs/service-accounts-create ) .
19
+
20
+ ## 2. Create AWS role
21
21
22
22
Create an AWS role that is configured for Web Identity Federation, with Google
23
23
as the identity provider, as shown below:
24
24
25
- ![ AWS Create Role] ( ../images/guides/aws-create-role.png )
25
+ ![ AWS Create Role] ( ../images/guides/gcp-to-aws/ aws-create-role.png )
26
26
27
27
Once created, edit the ** Trust Relationship** section to look like the
28
28
following:
@@ -47,7 +47,7 @@ following:
47
47
}
48
48
```
49
49
50
- ## 1 . Assign permissions to the AWS role
50
+ ## 3 . Assign permissions to the AWS role
51
51
52
52
In this example, Coder will need permissions to create the EC2 instance. Add the
53
53
following policy to the role:
@@ -101,7 +101,7 @@ following policy to the role:
101
101
}
102
102
```
103
103
104
- ## 1 . Generate the identity token for the service account
104
+ ## 4 . Generate the identity token for the service account
105
105
106
106
Run the following ` gcloud ` command to generate the service account identity
107
107
token. This is a JWT token with a payload that includes the service account
@@ -115,7 +115,7 @@ veloper.gserviceaccount.com --include-email
115
115
> Note: Your ` gcloud ` client may needed elevated permissions to run this
116
116
> command.
117
117
118
- ## 1 . Set identity token in Coder control plane
118
+ ## 5 . Set identity token in Coder control plane
119
119
120
120
You will need to set the token created in the previous step on a location in the
121
121
Coder control plane. Follow the below steps for your specific deployment type:
@@ -143,17 +143,18 @@ running.
143
143
- Mount the token file into the Coder pod using the values below:
144
144
145
145
``` yaml
146
- volumes :
147
- - name : " gcp-identity-mount"
148
- secret :
149
- secretName : " gcp-identity-token"
150
- volumeMounts :
151
- - name : " gcp-identity-mount"
152
- mountPath : " /home/coder/.aws/gcp-identity-token"
153
- readOnly : true
146
+ coder :
147
+ volumes :
148
+ - name : " gcp-identity-mount"
149
+ secret :
150
+ secretName : " gcp-identity-token"
151
+ volumeMounts :
152
+ - name : " gcp-identity-mount"
153
+ mountPath : " /home/coder/.aws/gcp-identity-token"
154
+ readOnly : true
154
155
` ` `
155
156
156
- ## 1 . Configure the AWS Terraform provider
157
+ ## 6 . Configure the AWS Terraform provider
157
158
158
159
Navigate to your EC2 workspace template in Coder, and configure the AWS provider
159
160
using the block below:
0 commit comments