Skip to content

Commit acc1ce3

Browse files
sai-sunder-slsirac
andauthored
docs: update wif documentation with enable-imdsv2 flag (#940)
Co-authored-by: Leo <[email protected]>
1 parent 22f37aa commit acc1ce3

File tree

1 file changed

+9
-3
lines changed

1 file changed

+9
-3
lines changed

README.md

+9-3
Original file line numberDiff line numberDiff line change
@@ -195,10 +195,16 @@ Where the following variables need to be substituted:
195195

196196
This generates the configuration file in the specified output file.
197197

198-
If you want to use the AWS IMDSv2 flow, you can add the field below to the credential_source in your AWS ADC configuration file:
199-
"imdsv2_session_token_url": "http://169.254.169.254/latest/api/token"
198+
If you are using [AWS IMDSv2](https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/configuring-instance-metadata-service.html), an additional flag `--enable-imdsv2` needs to be added to the `gcloud iam workload-identity-pools create-cred-config` command:
200199

201-
The gcloud create-cred-config command will be updated to support this soon.
200+
```bash
201+
gcloud iam workload-identity-pools create-cred-config \
202+
projects/$PROJECT_NUMBER/locations/global/workloadIdentityPools/$POOL_ID/providers/$AWS_PROVIDER_ID \
203+
--service-account $SERVICE_ACCOUNT_EMAIL \
204+
--aws \
205+
--output-file /path/to/generated/config.json \
206+
--enable-imdsv2
207+
```
202208

203209
You can now [use the Auth library](#using-external-identities) to call Google Cloud
204210
resources from AWS.

0 commit comments

Comments
 (0)