Reference Parameter Value in UserData in AWS Cloudformation

后端 未结 2 1694
粉色の甜心
粉色の甜心 2021-01-22 13:16

I have this under parameter section ,

Parameters:
  PlatformSelect:
    Description: Cockpit platform Select.
    Type: String
    Default: qa-1
    AllowedValue         


        
2条回答
  •  心在旅途
    2021-01-22 13:40

    What about a combination of Fn::Join and Ref

    UserData:
            Fn::Base64:
              Fn::Join:
                - ''
                - - '#!/bin/bash\n'
                  - 'print: echo'
                  - !Ref 'PlatformSelect' 
                  - '>>test.txt\n'
    

提交回复
热议问题