apiVersion: iam.aws.crossplane.io/v1beta1
kind: Role
metadata:
  name: example
spec:
  deletionPolicy: Delete
  forProvider:
    assumeRolePolicyDocument: |
      {
        "Version": "2012-10-17",
        "Statement": [
            {
                "Sid": "",
                "Effect": "Allow",
                "Principal": {
                    "Federated": "arn:aws:iam::123:oidc-provider/oidc.eks.eu-north-1.amazonaws.com/id/123ABC"
                },
                "Action": "sts:AssumeRoleWithWebIdentity",
                "Condition": {
                    "StringEquals": {
                        "oidc.eks.eu-north-1.amazonaws.com/id/123ABC:sub": "system:serviceaccount:ABC:example",
                        "oidc.eks.eu-north-1.amazonaws.com/id/123ABC:aud": "sts.amazonaws.com"
                    }
                }
            }
        ]
      }
    description: example
    maxSessionDuration: 3600
    path: /
    tags:
    - key: crossplane-kind
      value: role.iam.aws.crossplane.io
    - key: crossplane-name
      value: example
    - key: crossplane-providerconfig
      value: provider-aws
  providerConfigRef:
    name: provider-aws
status:
  atProvider:
    arn: arn:aws:iam::123:role/example
    roleID: ABC123
  conditions:
  - lastTransitionTime: "2024-07-11T07:49:50Z"
    reason: Available
    status: "True"
    type: Ready
  - lastTransitionTime: "2024-07-11T07:49:49Z"
    reason: ReconcileSuccess
    status: "True"
    type: Synced
