AWS Cloudformation- How to do string Uppercase or lowercase in json/yaml template

后端 未结 4 846
北恋
北恋 2021-02-19 11:18

I am working on AWS CloudFormation and I created one template in which I asked user to select Environment.

On the basis of selected value I created the resources.

4条回答
  •  温柔的废话
    2021-02-19 12:18

    I got the answer of this question. For this I have used Mappings JSON in which I have added values like If Selected value is DEV then use dev, If QA then qa like this, and used below JSON which used Fn:FindInMap

    [ { "Fn::FindInMap": [ "Enviroment", "PlatformName", { "Ref": "selectedEnv" } ] }, "clientname" ]

    Below is the Mappings JSON:

    "Mappings" : { "Enviroment" : { "PlatformName" : { "DEV" : "dev", "QA" : "qa", "UAT" : "uat", "PROD" : "prod" } } }

提交回复
热议问题