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.
You can do this with a CloudFormation macro.
Parameters:
InputString:
Default: "This is a test input string"
Type: String
Resources:
S3Bucket:
Type: "AWS::S3::Bucket"
Properties:
Tags:
- Key: Upper
Value:
'Fn::Transform':
- Name: 'String'
Parameters:
InputString: !Ref InputString
Operation: Upper
https://github.com/awslabs/aws-cloudformation-templates/tree/master/aws/services/CloudFormation/MacrosExamples/StringFunctions