Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

cfn-resources

Package Overview
Dependencies
Maintainers
0
Versions
1005
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

cfn-resources

> Prints the list of resource types and logical IDs from a CloudFormation > template.

  • 1.0.1080
  • latest
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
419
decreased by-18.64%
Maintainers
0
Weekly downloads
 
Created
Source

cfn-resources

Prints the list of resource types and logical IDs from a CloudFormation template.

Installation

Install globally:

npm i -g cfn-resources

Usage

$ cat my-template.json | cfn-resources
AWS::AutoScaling::AutoScalingGroup        WebServerGroup
AWS::AutoScaling::LaunchConfiguration     LaunchConfig
AWS::AutoScaling::ScalingPolicy           WebServerScaleUpPolicy
AWS::AutoScaling::ScalingPolicy           WebServerScaleDownPolicy
AWS::CloudWatch::Alarm                    CPUAlarmHigh
AWS::CloudWatch::Alarm                    CPUAlarmLow
AWS::EC2::SecurityGroup                   InstanceSecurityGroup
AWS::ElasticLoadBalancingV2::Listener     ALBListener
AWS::ElasticLoadBalancingV2::LoadBalancer ApplicationLoadBalancer
AWS::ElasticLoadBalancingV2::TargetGroup  ALBTargetGroup
AWS::SNS::Topic                           NotificationTopic

To print the number of resources in a template:

$ cat test/fixtures/sample.json | node lib/cli.js | wc -l
      11

To print only resource types:

$ cat my-template.json | cfn-resources | cut -d" " -f1 | uniq
AWS::AutoScaling::AutoScalingGroup
AWS::AutoScaling::LaunchConfiguration
AWS::AutoScaling::ScalingPolicy
AWS::CloudWatch::Alarm
AWS::EC2::SecurityGroup
AWS::ElasticLoadBalancingV2::Listener
AWS::ElasticLoadBalancingV2::LoadBalancer
AWS::ElasticLoadBalancingV2::TargetGroup
AWS::SNS::Topic

Contributions

All contributions are celebrated.

License

Distributed under the Apache 2.0 license.

FAQs

Package last updated on 07 Jan 2025

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc