Generated Code
Terraform AWS
Terraform Azure
Terraform GCP
CloudFormation
Azure Bicep
ARM
Pulumi TS
Pulumi Python
AWS CDK
Ansible
K8s NetPolicy
Cisco IOS

        
Generated code accounts for cloud-specific reserved IPs. Review before applying to production.

From subnet plan to deployable code

The CIDR math is the easy part. The hard part is turning your subnet plan into Terraform, CloudFormation, Pulumi, CDK, Ansible, or Bicep that actually deploys. This page handles that conversion. Pick a target format and your VPC and subnet definitions become ready-to-commit infrastructure code.

The generated code uses your chosen cloud provider's idioms — AWS resources for Terraform AWS, Bicep for Azure, CDK for either. Reserved-IP handling matches the cloud-aware calculator: if your subnet is sized for AWS reservations, the IaC respects that. For multi-size subnet plans, design them in VLSM first, then bring the result here.

Which IaC tool to pick

If you want to share or revisit your design, save it to a workspace project first — the workspace stores your inputs so you can regenerate the IaC later without re-entering them.

Background reading

The subnet design to Terraform article walks through a complete 3-tier VPC end-to-end. For deciding how subnets fit across clouds, see multi-cloud CIDR planning.

Related tools

Frequently asked questions

Which IaC format should I pick for my subnet plan?

Terraform if you want cross-cloud portability and the biggest community. CloudFormation if you are AWS-only and want native integration. Pulumi if you prefer a real programming language over HCL or YAML. AWS CDK if you want code-based AWS infrastructure. Bicep if you are Azure-only. Ansible if you also configure servers after deploy. There is no single best choice — pick what matches your existing toolchain.

Does the generated Terraform handle cloud-provider reserved IPs?

Yes. The exported code respects the reserved-IP counts of the target cloud automatically. If you sized a /28 in AWS expecting 11 usable hosts, the Terraform code creates that subnet correctly without warnings. The IaC export is designed to be deployable as-is.

Can I import an existing VPC and get IaC back?

Not directly — this tool generates IaC from a fresh CIDR plan, not from a live cloud account. To import existing infrastructure, use Terraform's terraform import command or AWS Former for CloudFormation. Use this tool when you are planning a new VPC or redesigning an existing one.

Why does the exported code use /28 as the minimum?

Because AWS requires a minimum subnet size of /28 (16 addresses, 11 usable after reservations). Azure requires /29 minimum for most services. GCP requires /29. OCI requires /30. The exported code uses each cloud's minimum and warns if your plan goes below it.