Lesson 3 of 4 ยท Build a Cloud Foundation
Compute and storage
Compute runs application work. Storage keeps files or persistent data. Keep compute and storage separate in your mental model: a virtual machine can be replaced, while application data usually needs a planned durability and access model.
Example
resource "aws_instance" "app" {
ami = "ami-0123456789abcdef0"
instance_type = "t3.micro"
}
resource "aws_s3_bucket" "assets" {
bucket = "training-assets-example"
}Step by step
- Choose compute based on the workload.
- Store durable files outside an individual server.
- Use names and tags that show ownership.
- Plan backups before storing important data.
Common mistakes to avoid
- Using a server disk as the only copy of important files.
- Choosing instance sizes without observing workload needs.