mercredi 19 juin 2019

Cloudformation:: Condition to the ManagedPolicyArns based on the Environment

I am trying to add a condition to the ManagedPolicyArns based on the environment, it has to run a specify policy

Here's my code: Conditions: IsEnvProd: Fn::Equals [!Ref Env, 'prod']

ManagedPolicyArns: - Fn::If: - IsEnvProd: - "arn:aws:iam::111111111111:policy/prod_policy" - "arn:aws:iam::111111111111:policy/staging_policy"

Getting the following error: ValidateTemplate operation: Template error: Fn::If requires a list argument with three elements

Aucun commentaire:

Enregistrer un commentaire