Answer – D
The optional Conditions section includes statements that define when a resource is created or when a property is defined. For example, you can compare whether a value is equal to another value. Based on the result of that condition, you can conditionally create resources. If you have multiple conditions, separate them with commas.
For more information on Cloudformation conditions, please visit the below link-
http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/conditions-section-structure.html
Note:
As per AWS documentation,
You might use conditions when you want to reuse a template that can create resources in different contexts, such as a test environment versus a production environment. In your template, you can add an EnvironmentType input parameter, which accepts either prod or test as inputs. For the production environment, you might include Amazon EC2 instances with certain capabilities. However, for the test environment, you want to use reduced capabilities to save money. With conditions, you can define which resources are created and how they`re configured for each environment type.
Refer to page 276 on the link: https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/cfn-ug.pdf
Conditions are evaluated based on input parameter values that you specify when you create or update a stack. Within each condition, you can reference another condition, a parameter value, or a mapping. After you define all your conditions, you can associate them with resources and resource properties in the Resources and outputs sections of a template.
Options A, B, C are incorrect because they cannot define the circumstances under which entities are created or configured or not.
For more details, please check the below AWS Docs.
https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/conditions-section-structure.html