Package to help keep track of what resources are managed by Terraform in the AWS account
Last updated 2 days ago by lfrederick .
Apache-2.0 · Original npm · Tarball · package.json
$ cnpm install @cumulus/tf-inventory 
SYNC missed versions from official npm registry.


@cumulus/tf-inventory provides utilities for monitoring Terraform deployments and resources across an AWS account.

About Cumulus

Cumulus is a cloud-based data ingest, archive, distribution and management prototype for NASA's future Earth science data streams.

Cumulus Documentation


npm install @cumulus/tf-inventory

Command Line Interface

The following utilities are provided via the CLI. For help run tf-inventory --help

Usage: tf-inventory TYPE COMMAND [options]

  -V, --version                output the version number
  -h, --help                   output usage information

  list-deployments [options]   List Terraform Cumulus deployments in the account
  deployment-report [options]  List each Cumulus deployment with files, number of resources, and last update date
  list-orphaned-resources      List resources not associated with a Terraform deployment, currently supports ECS, EC2, and Elasticsearch

list-deployments and deployment-report take an optional --regex parameter to specify the regular expression used to extract the deployment name. For example, if state files are stored in the format bucket/deployment-name/terraform.tfstate, the regular expression '.*\/(.*)\/terraform.tfstate' could be specified to extract the deployment name. Or the regular expression '(.*)' could be specified to view all state files as their own deployment.


  • Terraform state files are configured for remote state storage in S3 using DynamoDB for locks. Follow the instructions in the deployment documentation for proper setup.

  • State files keys are in the format: .*/data-persistence.*/terraform.tfstate or .*/cumulus.*/terraform.tfstate or an extraction regex is specified for the list-deployments and deployment-report commands.


Error extracting deployment name from file ...

An Error extracting deployment name will be printed to the console if a Terraform state file is detected that does not match the specified deployment regular expression, or the default regular expression if none is specified.

Error reading <filename>: The specified key does not exist.

This indicates that there is a Terraform state entry in your DynamoDB locks table pointing to a state file that does not exist. terraform destroy empties your state file of resources, but does not remove the file from S3 nor the entry from DynamoDB. It's possible that the state file was manually deleted, but not the DynamoDB entry.


To make a contribution, please see our contributing guidelines.

Current Tags

  • 1.24.0                                ...           latest (2 days ago)

10 Versions

  • 1.24.0                                ...           2 days ago
  • 1.23.2                                ...           12 days ago
  • 1.23.1                                ...           12 days ago
  • 1.23.0                                ...           16 days ago
  • 1.22.1                                ...           a month ago
  • 1.22.0                                ...           a month ago
  • 1.21.0                                ...           2 months ago
  • 1.20.0                                ...           3 months ago
  • 1.19.0                                ...           3 months ago
  • 1.18.0                                ...           4 months ago
Today 0
This Week 9
This Month 9
Last Day 1
Last Week 15
Last Month 53
Dependencies (3)
Dev Dependencies (1)
Dependents (0)

Copyright 2014 - 2017 © taobao.org |