You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Description: | Creates a IAM OIDCProvider and a IAM role to grant CircleCI jobs access to AWS resourcesParameters:
OrgId:
Type: StringDescription: CircleCI organization id (UUID)MinLength: 36# must be formatted with hyphensMaxLength: 36CertificateThumbprint:
Type: StringDescription: Thumbprint of the Certificate for oidc.circleci.com (SHA1)AllowedPattern: ^[0-9a-fA-F]*$ # hexadecimalMinLength: 40MaxLength: 40Resources:
IdentityProvider:
Type: AWS::IAM::OIDCProviderProperties:
ClientIdList:
- !RefOrgIdUrl: !Sub 'https://oidc.circleci.com/org/${OrgId}'ThumbprintList:
- !RefCertificateThumbprintJobRole:
Type: AWS::IAM::RoleProperties:
RoleName: !Sub 'CircleCIJobRole_${OrgId}'Description: Allow CircleCI jobs authenticated through OIDC to manage AWS resources# Note this document allows ANY job in the given org to assume the AWS role.# See https://circleci.com/docs/openid-connect-tokens/#advanced-usage on how to further# restrict access, e.g. based on project or branchAssumeRolePolicyDocument: !Sub
- | { "Version": "2012-10-17", "Statement": [ { "Effect": "Allow", "Principal": { "Federated": "${IdPArn}" }, "Action": "sts:AssumeRoleWithWebIdentity", "Condition": { "StringLike": { "oidc.circleci.com/org/${OrgId}:sub": "org/${OrgId}/project/*/user/*" } } } ] }
- IdPArn: !Ref IdentityProviderOrgId: !Ref OrgIdManagedPolicyArns:
# FIXME: You probably want to restrict this policy!
- arn:aws:iam::aws:policy/AdministratorAccess
Give us a short description of the config kind
CircleCI OIDC provider on AWS
Body Area
This Cloudformation template generates two resources.
An OIDC Provider that allows jobs in the specified CircleCI org to authenticate with IAM
An IAM role these jobs can assume
Make sure to restrict the policy to the resources the job needs to access!
What is the name of the config kind?
aws-cloudformation.yaml
Config Tip
Give us a short description of the config kind
CircleCI OIDC provider on AWS
Body Area
This Cloudformation template generates two resources.
Make sure to restrict the policy to the resources the job needs to access!
Anything Else?
No response