npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

@nx-extend/terraform

v10.2.1

Published

<a href="https://www.npmjs.com/package/@nx-extend/terraform" rel="nofollow"> <img src="https://badgen.net/npm/v/@nx-extend/terraform" alt="@nx-extend/terraform NPM package"> </a>

Readme

@nx-extend/terraform

Nx plugin for deploying your resources with Terraform.

Features

  • Manage infrastructure as code with Terraform
  • Full lifecycle management (init, plan, apply, destroy)
  • Workspace management for multiple environments
  • Variable and secret management
  • Backend configuration support
  • State migration and reconfiguration
  • Format validation and testing
  • Provider lock file management
  • CI mode for automated deployments

Setup

Prerequisites

  • Terraform CLI installed and available in PATH

Install

npm install -D @nx-extend/terraform
nx g @nx-extend/terraform:init

Available Options

| Name | Type | Required | Default | Description | |-------------------|-----------|----------|---------|------------------------------------------------------------------| | name | string | true | - | Terraform project name | | directory | string | false | - | A directory where the project is placed, based on the sourceRoot | | tags | string | false | - | Comma separated list for tags |

Usage

Initialize

Initialize Terraform working directory:

nx run <terraform-project-name>:initialize

Plan

Generate and show an execution plan:

nx run <terraform-project-name>:plan

Apply

Apply the changes required to reach the desired state:

nx run <terraform-project-name>:apply

Destroy

Destroy Terraform-managed infrastructure:

nx run <terraform-project-name>:destroy

Validate

Validate Terraform configuration files:

nx run <terraform-project-name>:validate

Test

Run Terraform tests:

nx run <terraform-project-name>:test

Workspace

Manage Terraform workspaces:

nx run <terraform-project-name>:workspace

Providers

Manage provider versions and lock files:

nx run <terraform-project-name>:providers

Format

Format Terraform configuration files:

nx run <terraform-project-name>:fmt

Available Options

| Name | Type | Default | Description | Supported Commands | |:----------------------|:----------|:---------|:-----------------------------------------------------------------------------------------------|:-----------------------------------| | ciMode | boolean | false | Enables CI mode (sets TF_IN_AUTOMATION=true and TF_INPUT=0) | All | | varFile | string | - | Path to a variable file (passed as --var-file) | plan, apply, test | | varString | string | - | Inline variables (passed as --var) | plan, apply, test | | planFile | string | - | Path to output the plan file (e.g., tfplan) | plan, apply | | autoApproval | boolean | false | Skips interactive approval (passed as -auto-approve) | apply, destroy | | workspace | string | - | Name of the workspace. Required for new, select, and delete actions | workspace | | workspaceAction | string | select | Action to perform on the workspace. Accepted values: select, new, delete, list | workspace | | backendConfig | array | [] | Backend configuration (e.g., [{ "key": "bucket", "name": "my-bucket" }]) | init | | reconfigure | boolean | false | Reconfigure the backend (passed as -reconfigure) | init | | migrateState | boolean | false | Migrate state during init (passed as -migrate-state) | init | | upgrade | boolean | false | Install the latest module and provider versions (passed as -upgrade) | init | | formatWrite | boolean | false | If true, updates files in place. If false, only checks formatting | fmt | | lock | boolean | false | Update the lock file (passed as lock) | providers |

Usage Examples

Using Variables Files

# Plan with a specific tfvars file
nx run my-project:plan --varFile=config/dev.tfvars

# Apply with inline variables
nx run my-project:apply --varString="region=us-east-1"

Managing Workspaces

# List all workspaces
nx run my-project:workspace --workspaceAction=list

# Create a new workspace named 'staging'
nx run my-project:workspace --workspaceAction=new --workspace=staging

# Select 'staging' workspace (default action is select)
nx run my-project:workspace --workspace=staging

# Delete 'staging' workspace
nx run my-project:workspace --workspaceAction=delete --workspace=staging

CI/CD Integration

# Run in CI mode with auto-approval
nx run my-project:apply --ciMode --autoApproval

Backend Configuration

{
  "initialize": {
    "executor": "@nx-extend/terraform:init",
    "options": {
      "backendConfig": [
        { "key": "bucket", "value": "my-terraform-state" },
        { "key": "prefix", "value": "terraform/state" }
      ]
    }
  }
}