Code Monkey home page Code Monkey logo

serverless-plugin-resource-tagging's People

Contributors

ilayanambi86 avatar realityctrl avatar thongle91 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

serverless-plugin-resource-tagging's Issues

Conditional Props with Deploy-time Eval

I'll create a pull request to skip applying resource tags in this scenario. Documenting issue here for reference.

Issue: When an AWS resource has a root Properties-level CloudFormation conditional, this plugin still applies the Tags property, which breaks at deploy-time.

Sample in serverless.yml

provider:
  name: aws
  # ...
  stackTags:
    MyOrg:Name: github issue sample

custom:
  bucketProps:
    Fn::If:
      - IsOtherRegionDeployed
      - ${file(additional.yml):BucketProps.withReplication}
      - ${file(additional.yml):BucketProps.noReplication}

resources:
  # ...
  Resources:
    Bucket:
      Type: AWS::S3::Bucket
      Properties: ${self:custom.bucketProps}

Sample in cloudformation-template-update-stack.json

"Bucket": {
  "Type": "AWS::S3::Bucket",
  "Properties": {
    "Fn::If": [ // CloudFormation conditional evaluated at deploy-time
      "IsOtherRegionDeployed",
      {
        // with replication...
      },
      {
        // no replication
      }
    ],
    "Tags": [ // breaks the CloudFormation deploy due to conditional Fn::If
      {
        "Key": "MyOrg:Name",
        "Value": "github issue sample"
      }
    ]
  }
},

Plugin does not support to Dynamo Tables

This plugin works for every supported AWS resource listed here except Dynamo Tables. Any workaround to make it work against Dyanamo Tables?

I am using this plugin under the provider section of serverless like below.

plugins:
  - serverless-plugin-resource-tagging
  
provider:
  name: aws
  stackTags:
        STACK: "${self:service}"
        PRODUCT: "Produuct"
        PRODUCT_VERSION: "1.0"   

Although it works as expected with an S3 Bucket, CloudFormation, Kinesis, Lambda and API GATEWAYS.

Support for more resources

Would it be possible to add support for some more common AWS resources, some possibilities might be:

  • SNS Topics (AWS::SNS::Topic)
  • Glue Jobs (AWS::Glue::Job)
  • Glue Crawlers (AWS::Glue::Crawler)
  • Glue ML Transform (AWS::Glue::MLTransform)
  • Glue Trigger (AWS::Glue::Trigger)
  • Glue Workflow (AWS::Glue::Workflow)

Error if API Gateway Stage is not created

With multi-stack repository we have ApiGateway created in one stack and used in other stacks. So the "API" stack looks like this:

service: api

plugins:
  - serverless-plugin-resource-tagging

provider:
  name: aws
  stage: ${opt:stage}
  stackTags: ${file(../config.json):tags}

resources:
  Resources:

    ApiGateway:
      Type: AWS::ApiGateway::RestApi
      Properties:
        Name: ${self:custom.baseName}

After deployment process fails with error:

Stage dev on RestApi xxxxxxxxxx was not found

This looks like the plugin find that stack contains API Gateway and tries to find the Stage in it, and fails if it does not exist. Instead, it should just ignore it and not throw an error.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.