@a-cloud-guru/serverless-import-tags 中文文档教程
serverless-import-tags
Serverless stackTags
会在 template(*) 中标记大部分资源,并支持从外部文件导入。 尽管如此,它不支持从多个文件导入,因此您不能指定全局标签与堆栈标签和资源标签。 . 该插件将通过在生成模板之前将全局标签文件合并到 stackTags 中来解决该问题。
Notes:
- (*) Except CW Logs and any other resource where AWS Cloudformation doesn't support tagging:(
Using this pluging
# Via yarn
$ yarn add @a-cloud-guru/serverless-import-tags
# Via npm
$ npm install @a-cloud-guru/serverless-import-tags
serverless.yml
custom:
globalTags: ${file(./team_tags.yml)}
plugins:
- @a-cloud-guru/serverless-import-tags
为了支持标记指南中的最佳实践,您可以重复使用合规性来自单个文件的标记行。 这 使用自定义参数 globalTags
指定的 yaml 模板必须是 Key
:Value
标签的数组,例如:
"info:owner": an_awesome_guru
alliance: operations
cc_feature: ${opt:stage,self:provider.stage}-zone-labs
cc_company_usage: acg
serverless-import-tags
Serverless stackTags
will tag most resources in the template(*) , and supports importing from an external file. Nonetheless, it doesn't support importing from more than one file, therefore you can't specify global tags in tandem with stack tags and resource tags. . This plugin will solve that issue by merging the global tags file into the stackTags prior to the template being generated.
Notes:
- (*) Except CW Logs and any other resource where AWS Cloudformation doesn't support tagging:(
Using this pluging
# Via yarn
$ yarn add @a-cloud-guru/serverless-import-tags
# Via npm
$ npm install @a-cloud-guru/serverless-import-tags
serverless.yml
custom:
globalTags: ${file(./team_tags.yml)}
plugins:
- @a-cloud-guru/serverless-import-tags
In order to support best practices in Tagging guidelines, you can reuse compliance tag lines from a single file. This yaml template especified with the custom parameter globalTags
must be an array of Key
:Value
tags, e.g.:
"info:owner": an_awesome_guru
alliance: operations
cc_feature: ${opt:stage,self:provider.stage}-zone-labs
cc_company_usage: acg