Created
January 12, 2022 03:14
-
-
Save bil9000/21ebf790a969e26571f4de3104bdcfbe to your computer and use it in GitHub Desktop.
create oidc provider in boto3
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import boto3 | |
oidc_uri = "https://oidc.eks.us-west-2.amazonaws.com/id/STRING_GOES_HERE" | |
thumbprint = "THUMBRPRINT_GOES_HERE" | |
audience = "sts.amazonaws.com" | |
tag_key0 = "ApplicationShortName" | |
tag_value0 = "foo" | |
print(oidc_uri) | |
print("---") | |
print(thumbprint) | |
print("---") | |
print(audience) | |
client = boto3.client('iam') | |
response = client.create_open_id_connect_provider( | |
Url=oidc_uri, | |
ClientIDList=[ | |
audience, | |
], | |
ThumbprintList=[ | |
thumbprint, | |
], | |
Tags=[ | |
{ | |
'Key': tag_key0, | |
'Value': tag_value0 | |
}, | |
] | |
) | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment