tf-registry

Generate Terraform configuration for an AWS CodeArtifact private npm registry.

Updated May 20, 2026
One-click install
npx skills add https://github.com/ZawilecxD/trAInR --skill tf-registry-zawilecxd
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: tf-registry
Source: https://github.com/ZawilecxD/trAInR/tree/main/.cursor/skills/tf-registry
Command: npx skills add https://github.com/ZawilecxD/trAInR --skill tf-registry-zawilecxd

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve? Setting up a private npm registry on AWS CodeArtifact requires correctly wiring many Terraform resources—domain, repositories, upstream connections, KMS keys, and IAM policies—which is error-prone when done by hand. ## Core Features & Use Cases - Terraform Generation: Produces a complete terraform/ directory with main, variables, outputs, CodeArtifact, IAM, and KMS files plus a tfvars example. - Registry Wiring: Configures the CodeArtifact domain, private npm repository, npm public upstream proxy, external connection, KMS key and alias, and an IAM managed policy for read/publish. - CI/CD Integration: Attaches the IAM policy to an existing GitHub Actions OIDC role for publishing from pipelines. - Use Case: A team adopting the AWS appendix path of the m5l4 module asks for the registry infrastructure; the Skill gathers region, account ID, domain, and repository names, then generates validated Terraform with an S3 backend. ## Quick Start Ask the assistant to generate the Terraform for the Model 2 CodeArtifact npm registry, providing your AWS region, account ID, domain name, and repository names.

Frequently Asked Questions about tf-registry

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I create a private npm registry with AWS CodeArtifact and Terraform?

Define a CodeArtifact domain, a private npm repository, and an npm public upstream proxy repository in Terraform, then add an external npm connection. This Skill generates all of these files, including KMS encryption and an IAM policy for read/publish access.

How do I publish npm packages to CodeArtifact from GitHub Actions?

Attach an IAM managed policy granting CodeArtifact read/publish permissions to the GitHub Actions OIDC role used by your pipeline. The generated Terraform includes this policy and an attachment point for an existing role.

Does CodeArtifact login use the npm scope with the @ symbol?

No. The `aws codeartifact login --namespace` command expects the npm scope without the `@` prefix. The CodeArtifact domain and the npm package scope are also separate concepts and should not be conflated.

Can Terraform state for CodeArtifact use S3 native locking?

Yes. When the Terraform version supports it, the generated backend configuration uses native S3 locking instead of a DynamoDB lock table. State bucket and key are provided as input variables.

When should I not use the AWS CodeArtifact registry path?

This path is intended only when a learner consciously chooses the AWS appendix option, not as the default for every team. Teams without AWS infrastructure or OIDC setup should consider simpler registry hosting alternatives.