Had*_*ous 8 amazon-web-services aws-cloudformation aws-ssm
以下代码片段:
AWSTemplateFormatVersion: '2010-09-09'
Description: Some CloudFormation template
Resources:
MyResourceName:
Type: AWS::SSM::Parameter
Properties:
Name: myParameterName
Type: String
Value: "somevalue"
Tags:
- Key: firstTagName
Value: firstTagValue
- Key: secondTagName
Value: secondTagValue
Run Code Online (Sandbox Code Playgroud)
在 CloudFormation 中生成以下错误:
我应该如何正确构建 Tags 属性?
Had*_*ous 10
如https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-ssm-parameter.html的示例所示。Tags 属性的结构因资源而异(请参阅https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-resource-tags.html)。对于AWS::SSM::Parameter使用键值对而不是映射:
AWSTemplateFormatVersion: '2010-09-09'
Description: Some CloudFormation template
Resources:
MyResourceName:
Type: AWS::SSM::Parameter
Properties:
Name: myParameterName
Type: String
Value: "somevalue"
Tags:
firstTagName: firstTagValue
secondTagName: secondTagValue
Run Code Online (Sandbox Code Playgroud)
这解决了我的问题。
| 归档时间: |
|
| 查看次数: |
5629 次 |
| 最近记录: |