Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

CloudFormation optional parameters

I would like to have some conditional parameters in cloud formation that are showed in AWS Console only in particular case.

Parameters:
  A:
    Type: String
    AllowedValues:
    - x
    - y
  B:
    Type: Number
    Default: 3

Expected result during stack creation in browser AWS Console (CloudFormation -> Stacks -> Create Stack).

If parameter A is set to x then show parameter B, else do not show parameter B.

Is that something I can achieve?

like image 785
Dawid Fieluba Avatar asked Aug 17 '26 01:08

Dawid Fieluba


1 Answers

Not directly. Usually I just write in the description: "B will be ignored if A is set to x". Then I use a condition and a !If statement in the resource to use B if A is set to y and use 3 if A is set to x.

like image 72
Laurent Jalbert Simard Avatar answered Aug 18 '26 20:08

Laurent Jalbert Simard