【发布时间】:2022-02-28 15:56:31
【问题描述】:
我正在尝试使用 Cloud Formation 模板创建 Amazon DynamoDB 表。所以我的问题是我可以使用参考在多个表中使用相同的标签吗?
"AWSTemplateFormatVersion": "2010-09-09",
"Resources": {
"Status": {
"Type": "AWS::DynamoDB::Table",
"Properties": {
"AttributeDefinitions": [
{
"AttributeName": "SId",
"AttributeType": "S"
}
],
"KeySchema": [
{
"AttributeName": "SId",
"KeyType": "HASH"
}
],
"ProvisionedThroughput": {
"ReadCapacityUnits": "1",
"WriteCapacityUnits": "1"
},
"TableName": "Statuscf",
"Tags": [
{
"Key": "Application",
"Value": "BFMS"
},
{
"Key": "Name",
"Value": "EventSourcingDataStore"
}
]
}
},
"BMSHSData": {
"Type": "AWS::DynamoDB::Table",
"Properties": {
"TableName": "Billing.FmsDatacf",
"Tags": [{"Ref":"/Status/Tags"}]
}
}
}
请建议我如何在另一个表中使用相同的标签。我正在使用这样的“标签”:[{“Ref”:“/Status/Tags”}]。
【问题讨论】:
-
抱歉,问题不清楚。您当前的模板有什么问题?你想完成什么?
-
我只想在多个 cloudformation 模板表中使用相同的标签。示例:- "Tags": [ { "Key": "Application", "Value": "BFMS" }, { "Key": "Name", "Value": "EventSourcingDataStore" } ] 想要使用这个标签同一资源的多个表。
标签: amazon-web-services amazon-dynamodb amazon-cloudformation