1
0
Fork 0
mirror of https://github.com/imjasonh/terraform-playground synced 2026-07-06 23:12:22 +00:00

add readme

Signed-off-by: Jason Hall <jason@chainguard.dev>
This commit is contained in:
Jason Hall 2025-11-30 14:18:50 -05:00
parent 4232d5780e
commit 02d119cd7a

39
container-vm/README.md Normal file
View file

@ -0,0 +1,39 @@
# container-vm
Terraform module that creates a GCE instance template running Docker containers on Container-Optimized OS, managed via cloud-init and systemd.
This is intended to simulate and replace the [deprecated container startup agent](https://docs.cloud.google.com/compute/docs/containers/migrate-containers) using `cloud-init`.
## Features
- Runs one or more containers with systemd service management
- Supports Container-Optimized OS (COS) with pre-installed Docker
- Artifact Registry authentication via docker-credential-gcr
- Cloud Logging integration with gcplogs driver
- Shielded VM with secure boot enabled
- Requires digest-pinned container images for security
## Usage
```hcl
module "container_vm" {
source = "./container-vm"
project_id = "my-project"
region = "us-east4"
network = "default"
subnetwork = "default"
service_account_email = "my-sa@my-project.iam.gserviceaccount.com"
containers = {
web = {
image = "us-east4-docker.pkg.dev/my-project/my-repo/app@sha256:abc123..."
ports = ["8080:8080"]
env = [{
name = "PORT"
value = "8080"
}]
}
}
}
```