terraform-aws-arc-common-data¶
Module:
sourcefuse/arc-common-data/awsRegistry: https://registry.terraform.io/modules/sourcefuse/arc-common-data/aws
Category: Utility / Data
Source: https://github.com/sourcefuse/terraform-aws-arc-common-data
Tip
🤖 New: Use this module with AI assistants via the ARC IaC MCP Server — search, scaffold, and security-scan ARC modules from natural language. Quick setup ↓
Overview¶
SourceFuse AWS Reference Architecture (ARC) Terraform module for querying the most commonly referenced components in the ARC IaC modules. * VPC * Public Subnets * Private Subnets
Usage¶
To see a full example, check out the main.tf file in the example folder.
What It Does¶
- VPC lookup by namespace and environment tags
- Public subnet IDs lookup
- Private subnet IDs lookup
- Zero resources created — data sources only
For more information about this repository and its usage, please see Terraform AWS COMMON DATA Usage Guide.
Quickstart¶
Required Inputs¶
| Name | Type | Description |
|---|---|---|
namespace |
string |
Namespace tag value to filter VPC/subnets |
environment |
string |
Environment tag value to filter VPC/subnets |
region |
string |
AWS region |
| ## Key Outputs |
| Name | Description |
|---|---|
vpc_id |
VPC ID |
private_subnet_ids |
Private subnet IDs |
public_subnet_ids |
Public subnet IDs |
| ## Full Variable & Output Reference |
The complete inputs/outputs reference is auto-generated below.
Requirements¶
| Name | Version |
|---|---|
| terraform | ~> 1.4 |
| aws | ~> 4.0 |
Providers¶
| Name | Version |
|---|---|
| aws | 4.67.0 |
Modules¶
No modules.
Resources¶
| Name | Type |
|---|---|
| aws_subnets.private | data source |
| aws_subnets.public | data source |
| aws_vpc.vpc | data source |
Inputs¶
| Name | Description | Type | Default | Required |
|---|---|---|---|---|
| environment | ID element. Usually used for region e.g. 'uw2', 'us-west-2', OR role 'prod', 'staging', 'dev', 'UAT' | string |
n/a | yes |
| namespace | Namespace for the resources. | string |
n/a | yes |
| region | AWS Region | string |
n/a | yes |
Outputs¶
| Name | Description |
|---|---|
| private_subnet_ids | Private subnet IDs |
| public_subnet_ids | Public subnet IDs |
| vpc_id | ID of the VPC |
| vpc_name | Name of the VPC |
Versioning¶
This project uses a .version file at the root of the repo which the pipeline reads from and does a git tag.
When you intend to commit to main, you will need to increment this version. Once the project is merged,
the pipeline will kick off and tag the latest git commit.
Development¶
Prerequisites¶
Configurations¶
- Configure pre-commit hooks
Git commits¶
while Contributing or doing git commit please specify the breaking change in your commit message whether its major,minor or patch
For Example
Tests¶
- Tests are available in
testdirectory - Configure the dependencies
- Now execute the test
AI Assistant Integration (ARC IaC MCP)¶
The ARC IaC MCP Server is a hosted Model Context Protocol service that lets AI assistants browse, search, scaffold, compare, and security-scan any of the SourceFuse ARC Terraform modules — directly from natural language.
What you can do with it:
- Discover — search and filter modules by keyword or AWS resource type.
- Understand — get inputs, outputs, and resources for any module without leaving your editor.
- Scaffold — generate production-ready, multi-file Terraform with cross-module wiring already done.
- Secure — scan generated or existing HCL for misconfigurations before it hits a PR.
- Compare — diff modules side-by-side to make informed architectural decisions.
Setup (one minute)¶
The MCP endpoint is https://arc-iac-mcp.sourcef.us/mcp. Pick your client:
Claude Code CLI:
Claude Desktop — edit ~/Library/Application Support/Claude/claude_desktop_config.json:
Cursor / Windsurf / Kiro — add the same block to .cursor/mcp.json (or the equivalent for your client).
Example prompts to try¶
- "List all ARC modules sorted by downloads"
- "What inputs does
arc-ecsrequire?" - "Scaffold a production-ready
arc-dbAurora setup with Secrets Manager" - "Compare
arc-eksandarc-ecsfor running 10 microservices" - "Scan this Terraform before I raise a PR:
<paste HCL>"
See the ARC IaC MCP repo for the full tool reference, troubleshooting tips, and local-development instructions.
Contributing¶
See CONTRIBUTING.md for commit conventions and development setup.
Authors¶
This project is authored by: - SourceFuse ARC Team