AWS docs and references online don't seem to suggest it's possible to allow a CloudFormation template key (YAML in my case) to be populated by a Parameter.
I need to create IAM policies which lock down the AssumeRoleWithWebIdentity to only EKS Service Accounts to the EKS OIDC provider.
Effect: "Allow"
Principal:
Federated:
- !Ref MasterARN
Condition:
StringLike:
!Ref MasterOIDC: !Ref ServiceAccount
Action:
- "sts:AssumeRoleWithWebIdentity"
I can see why CloudFormation wouldn't allow this as you can abuse the 'template' but I think this is an edge case.
Tags (key: value) get around this by making you pass the key under a 'Name' key (e.g. Name: key; Value: value).