Skip to content

Fn::FindInMap support Fn conditions #79

Closed
@cmckni3

Description

@cmckni3

Currently Fn::FindInMap function only supports Fn::FindInMap and Ref.

2. Scope of request

e) other coverage-related issue with the resource/attribute/option

3. Expected behavior

Should be able use condition functions such as Fn::If. This can help specify a default key in the map. Currently Fn::If is not supported so trying to use a default key in a map results in an error stating the key was not found in the mapping.

4. Suggest specific test cases

Fn::FindInMap:
  - DNS
  - !If ["HasSpecialDNS", !Ref country, "default" ]
  - "dns"

5. Helpful Links to speed up research and evaluation

https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/intrinsic-function-reference-findinmap.html#w2ab1c25c28c26c13

https://stackoverflow.com/questions/35904204/default-value-on-mappings-aws-cloudformation

6. Category (required) - Will help with tagging and be easier to find by other users to +1

Use the categories as displayed in the AWS Management Console (simplified):

  1. Management (CloudTrail, Config...)

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions