CloudFormation提供了用于参数的AllowedValues,该参数指示该参数的可能值可以来自此列表。如何使用Terraform变量实现这一目标?列表的变量类型不提供此功能。因此,如果我希望变量仅具有两个可能的值,那么如何使用Terraform实现此目的。我要复制的CloudFormation脚本是:
"ParameterName": {
"Description": "desc",
"Type": "String",
"Default": true,
"AllowedValues": [
"true",
"false"
]
}
Run Code Online (Sandbox Code Playgroud) variables amazon-web-services aws-cloudformation terraform terraform-provider-aws