Plugin for the SLS 1.x branch to provide support for adding API Gateway stage tags (not currently supported by CloudFormation)
npm install @silvermine/serverless-plugin-apigateway-stage-tags



This is a plugin for the Serverless framework that adds support for setting tags on an API
Gateway stage.
Normally CloudFormation supports tagging for resources created by a CloudFormation
template. Unfortunately, API Gateway stages are not one of those resources. AWS does
provided support for tagging via the [AWS Console][tagging-via-console],
[aws-cli][tagging-via-cli], and the [API Gateway REST API][tagging-via-api]. This plugin
uses this support to automate the creation of the tags for the API Gateway stages in the
service.
This plugin will mimic the stack tag propagation that
[CloudFormation automatically performs][automatic-stack-tags]. There is not currently
support for adding additional tags to a API Gateway stage. If this is a feature you need,
feel free to submit a PR!
Once CloudFormation supports adding tags to an API Gateway stage and
serverless/serverless#4644 is completed, this plugin will be obsolete.
There are two steps:
``bash`
npm install --save-dev --save-exact @silvermine/serverless-plugin-apigateway-stage-tags
Simply add this plugin to the list of plugins in your serverless.yml file:
`yml``
plugins:
- '@silvermine/serverless-plugin-apigateway-stage-tags'
We genuinely appreciate external contributions. See [our extensive
documentation][contributing] on how to contribute.
This software is released under the MIT license. See the license file for more
details.
[tagging-via-console]: https://docs.aws.amazon.com/apigateway/latest/developerguide/set-up-tags.html#set-up-tags-using-console
[tagging-via-cli]: https://docs.aws.amazon.com/cli/latest/reference/apigateway/tag-resource.html
[tagging-via-api]: https://docs.aws.amazon.com/apigateway/latest/developerguide/set-up-tags.html#set-up-tags-using-api
[automatic-stack-tags]: https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-resource-tags.html
[contributing]: https://github.com/silvermine/silvermine-info#contributing