Quick Start
Create your first infrastructure resource with Carina in five minutes.
This guide walks you through creating an AWS VPC using Carina.
-
Step 1 · Author
Write a
.crnfileCreate a directory for your project and add a
main.crnfile:mkdir my-infra && cd my-infra// main.crn provider awscc { source = 'github.com/carina-rs/carina-provider-awscc' version = '0.5.0' region = awscc.Region.ap_northeast_1 } awscc.ec2.Vpc { cidr_block = '10.0.0.0/16' tags = { Name = 'my-first-vpc' } }Carina downloads the WASM provider plugin from the release matching
version(or userevision = 'main'to track the latest commit). The plugin is cached under.carina/providers/. -
Step 2 · Validate
Validate
Check that the syntax and schema are correct:
carina validateThis parses the
.crnfiles in the current directory and reports any errors. No AWS credentials are needed. -
Step 3 · Plan
Plan
Preview what Carina will create:
carina planThe plan output shows each resource and the action Carina will take (Create, Update, Delete, or Replace).
-
Step 4 · Apply
Apply
Create the resources:
carina applyCarina executes the plan and records the result in
carina.state.json. This state file tracks which resources Carina manages and their current attributes. -
Step 5 · Destroy
Destroy
Tear down all managed resources:
carina destroyThis deletes every resource recorded in the state file.
Next steps
- Core Concepts — understand effects, providers, and the DSL
- Writing Resources — learn
letbindings, nested blocks, and data sources - State Management — configure S3 backends and import existing resources