I basically want to check if the environment is env or dev, and if it is then enable versioning. If not, do nothing. I used the example for the AWS documentation:
I am getting an error though in my stack
Value of property VersioningConfiguration must be an object
My Condition Cloudformation
Conditions:
EnvCheck: !Or [!Equals [!Ref environment, test], !Equals [!Ref environment, dev]]
Bucket Cloudformation
Resources:
SecurityS3Bucket:
Type: AWS::S3::Bucket
Properties:
...
VersioningConfiguration:
!If
- EnvCheck
-
Status: Enabled
- !Ref "AWS::NoValue"