{"_id":"serverless-plugin-nametag","_rev":"3-7d6df861d14e4716885903b286f804cc","time":{"1.0.0":"2018-10-25T00:03:22.676Z","created":"2018-10-26T16:28:21.971Z","1.1.0":"2018-10-26T16:28:22.158Z","modified":"2022-05-17T13:11:08.054Z"},"name":"serverless-plugin-nametag","dist-tags":{"latest":"1.1.0"},"versions":{"1.1.0":{"name":"serverless-plugin-nametag","homepage":"https://github.com/washingtonpost/serverless-plugin-nametag#readme","repository":{"type":"git","url":"git+https://github.com/washingtonpost/serverless-plugin-nametag.git"},"bugs":{"url":"https://github.com/washingtonpost/serverless-plugin-nametag/issues"},"keywords":["serverless","aws","lambda","tags"],"version":"1.1.0","description":"Serverless framework plugin for applying a standard identification tag to AWS Lambda functions","author":{"name":"Tyler Hendrickson","email":"hendrickson.tsh@gmail.com"},"license":"MIT","main":"src/index.js","scripts":{"test":"node tests/test.*.js"},"dependencies":{"lodash":"^4.17.11"},"devDependencies":{"chai":"^4.2.0","expect":"^23.6.0"},"directories":{"lib":"src","test":"tests","example":"example"},"gitHead":"0bf2c02108e58e0395f2fe9e576c418a8afb466c","_id":"serverless-plugin-nametag@1.1.0","_npmVersion":"6.4.1","_nodeVersion":"8.12.0","_npmUser":{"name":"tylerhendrickson","email":"hendrickson.tsh@gmail.com"},"dist":{"integrity":"sha512-IfpnWvDHZ/Ku4DU+124CiDXmZPR3G3Cp5dCpd2wHf6Nzgi/39s/8W/cg+XHfq6hDp+ogTNpaSmQx0+7q81RWSQ==","shasum":"7640e7fc2eef336f5e3f7e493607b0a101193cbe","tarball":"https://registry.npmjs.org/serverless-plugin-nametag/-/serverless-plugin-nametag-1.1.0.tgz","fileCount":5,"unpackedSize":11392,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJb00CmCRA9TVsSAnZWagAA4k8P/3uM4F83yqZi+F5Irq/c\nqv4C1uYP50RddQqc/7DCDYHGGZnhvM7waGGFxIFCEyTt7PHLXrYNKxEEc4DY\ndyUarx1JkmmTdXhPUmVv5evAye2+9ZwrkBXU/RbU9JVSjzH40F6X8N6vHnW+\n6qDm3YT596RSGCCjnsD1SQzP1KrOwTm66XS4OFf5BVZKJXmd2TX7i7ZehgnO\nnevQkL11C4uoy3Q11I6Nst+07xDRBWadsZ7CDWhLpGrpYnrXKTMkPwP8nNW9\npCp/OdNa/QMFJ/6XJ5QTvuP+cKaakyOUexQWavjxTlHlSA5IQ/RKe7mlePi8\nV5I9v5sWH+3LeeeEXe7IpEYldSRqUrzeUQugWx/DbAQx99vHFKq9PRLAm1IR\nfcKkiPnkPhc2dSxH9MLeFy2/O2hw4xuAKK0KA+RT+75jcl34onUGtWBGVpG9\nniAwszAaocMNuyzsdX5gAr5+A5QP1TNJntwxaTyNq0E9SBV3QiNi6lAx6Xlt\nTKk13kOlY8hdoJmKSEhDCaKzqPwTJ3PczPPCaoGSoRihuUadUZ9xNpbDzxLn\nbDsdL0fWqwHk3qqNG6AvdWic0DTZweCsU4Ljo6Tm2zDQW99f9fpbMlDrwCEu\nuqDVrG4E+/7yxqSnFCh/l6frpHxlvsuIjxOp2sV3RSikSqkIA4ikjHBm77Ae\nu3kw\r\n=mIcq\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIEHz8XNtXAtS8zxqUzq4n+o1PhEt20QRfR0VP6MVaPlwAiAUt4p6vCuAIeS5la1M+dBNT0OWE97laTs22+ZpvlAqOw=="}]},"maintainers":[{"name":"tylerhendrickson","email":"hendrickson.tsh@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/serverless-plugin-nametag_1.1.0_1540571301971_0.07358543992561506"},"_hasShrinkwrap":false}},"maintainers":[{"name":"tylerhendrickson","email":"hendrickson.tsh@gmail.com"}],"description":"Serverless framework plugin for applying a standard identification tag to AWS Lambda functions","homepage":"https://github.com/washingtonpost/serverless-plugin-nametag#readme","keywords":["serverless","aws","lambda","tags"],"repository":{"type":"git","url":"git+https://github.com/washingtonpost/serverless-plugin-nametag.git"},"author":{"name":"Tyler Hendrickson","email":"hendrickson.tsh@gmail.com"},"bugs":{"url":"https://github.com/washingtonpost/serverless-plugin-nametag/issues"},"license":"MIT","readme":"# serverless-plugin-nametag\n\n[![serverless](http://public.serverless.com/badges/v3.svg)](http://www.serverless.com)\n\nA Serverless framework plugin for tagging AWS Lambda functions with the logical ID of the Lambda function resource.\n\n\n## Usage\n\n\n### Installation\n\n[Install via NPM](https://npmjs.com/package/serverless-plugin-nametag)\n\n\n### A Basic Example\n\nThe following Serverless configuration will apply a `Name` tag to the `MyFunction` Lambda function \nresource that evaluates to its configured `FunctionName` (physical ID):\n\n```yaml\nservice: my-service\n\nplugins:\n  - serverless-plugin-nametag\n\nprovider:\n  name: aws\n  stage: dev\n  region: us-east-1\n  runtime: python3.6\n\ncustom:\n  nametag:\n  tag: true\n\nfunctions:\n  MyFunction:\n    handler: handlers.my_function\n```\n\nIn the case of most normal setups, the resulting function will be tagged with `Name: my-service-dev-MyFunction`.\n\n\n### Advanced Configuration\n\n```yaml\nservice: my-service\n\nplugins:\n  - serverless-plugin-nametag\n\nprovider:\n  name: aws\n  stage: dev\n  region: us-east-1\n  runtime: python3.6\n\ncustom:\n  nametag:\n    tag: true\n    tagName: FunctionName\n\nfunctions:\n  MyFunction:\n    handler: handlers.my_function\n  SpecialFunction:\n    handler: handlers.special_function\n    tags:\n      Foo: bar\n    nametag:\n      tagName: Special\n  UntaggedFunction:\n    handler: handlers.untagged_function\n    nametag:\n      tag: false\n```\n\nIn the case of most normal setups, the resulting functions will be tagged as-follows:\n\n* `MyFunction`:\n    * `FunctionName: my-service-dev-MyFunction`\n* `SpecialFunction`:\n    * `Foo: bar`\n    * `Special: my-service-dev-SpecialFunction`\n* `UntaggedFunction`:\n    * Nothing!\n\n\n## Configuration Options\n\nThe following properties can be set on a `nametag` object within `custom` and/or each function described in your\nServerless configuration. Options set in `custom` define the default behavior for each function; options set\nat the function level override `custom` options for that function.\n\n| Option        | Type    | Default  | Description                                                        |\n| ------------- | ------- | -------- | ------------------------------------------------------------------ |\n| `custom.nametag.tag`         | boolean | `false`  | Whether all function(s) should be tagged by default | \n| `custom.nametag.tagName`     | string  | `\"Name\"` | The name of the tag that will be created on all functions by default |\n| `functions[].nametag.tag` | boolean | (set by `custom.nametag.tag`) | Whether this function should be tagged |\n| `functions[].nametag.tagName` | string | (set by `custom.nametag.tagName`) | The name of the tag that will be created on this function | \n\nNote that the `tagName` option is for setting the name of the _tag_, not its value! \n\n\n## How It Works\n\nThis plugin is executed during the Serverless framework's `before:package:compileFunctions` hook event.\nIt copies the value that Serverless plans to use as the `FunctionName` property for each function's resulting\nCloudFormation configuration object and applies it as the value of a tag (called `Name` by default, but can be\ncustomized to whatever you like) on the same function.\n\n\n## Contributing\n\n- Have an idea or a problem? Create an issue! It's usually best to start by doing this.\n- Fork this repository and submit a pull request if you have a fix or feature you want to be considered.\n","readmeFilename":"README.md"}