Quick Start
This guide walks you through creating an AWS VPC using Carina.
Write a .crn file
Create a directory for your project and add a main.crn file:
mkdir my-infra && cd my-infraprovider awscc { source = 'github.com/carina-rs/carina-provider-awscc' version = '0.3.0' region = 'ap-northeast-1'}
awscc.ec2.vpc { cidr_block = '10.0.0.0/16'
tags = { Name = 'my-first-vpc' }}Replace the source path with the actual path to your built WASM provider plugin.
Validate
Check that the syntax and schema are correct:
carina validateThis parses the .crn files in the current directory and reports any errors. No AWS credentials are needed.
Plan
Preview what Carina will create:
carina planThe plan output shows each resource and the action Carina will take (Create, Update, Delete, or Replace).
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.
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