examples/iaas-image-upload #34

Merged
mauritz.uphoff merged 5 commits from examples/iaas-image-upload into main 2026-06-26 07:08:32 +00:00
Owner

Summary

  • Adds a new self-contained Terraform example under examples/iaas-image-upload/
  • Demonstrates how to upload a custom VM image to STACKIT using the stackit_image resource
  • Follows existing repository conventions (numbered file prefixes, license headers, section dividers, examples/terraform.tfvars.example subfolder)

What's included

  • 00-provider.tf — stackitcloud/stackit >= 0.99.0
  • 01-variables.tf — all variables with descriptions, defaults, and input validation
  • 02-image.tfstackit_image resource with UEFI/Secure Boot config and labels
  • 03-outputs.tf — image ID, name, scope, and checksum
  • examples/terraform.tfvars.example — safe-to-commit placeholder values
  • README.md — prerequisites, deployment steps, validation, cleanup
  • .gitignore — excludes images/, keys/, and *.tfvars

Notes

  • Supported disk formats restricted to qcow2, raw, iso
  • Image files are gitignored via images/* — users place their file locally before terraform apply
  • terraform validate and pre-commit run --all-files both pass clean
## Summary - Adds a new self-contained Terraform example under `examples/iaas-image-upload/` - Demonstrates how to upload a custom VM image to STACKIT using the `stackit_image` resource - Follows existing repository conventions (numbered file prefixes, license headers, section dividers, `examples/terraform.tfvars.example` subfolder) ## What's included - `00-provider.tf` — stackitcloud/stackit >= 0.99.0 - `01-variables.tf` — all variables with descriptions, defaults, and input validation - `02-image.tf` — `stackit_image` resource with UEFI/Secure Boot config and labels - `03-outputs.tf` — image ID, name, scope, and checksum - `examples/terraform.tfvars.example` — safe-to-commit placeholder values - `README.md` — prerequisites, deployment steps, validation, cleanup - `.gitignore` — excludes `images/`, `keys/`, and `*.tfvars` ## Notes - Supported disk formats restricted to `qcow2`, `raw`, `iso` - Image files are gitignored via `images/*` — users place their file locally before `terraform apply` - `terraform validate` and `pre-commit run --all-files` both pass clean
sven.schmidt self-assigned this 2026-06-22 12:12:15 +00:00
mauritz.uphoff was assigned by sven.schmidt 2026-06-22 12:12:15 +00:00
sven.schmidt added 2 commits 2026-06-22 12:12:15 +00:00
examples: enhance iaas-image-upload README with architecture diagram and details
All checks were successful
Default CI / Check for Open TODOs (pull_request) Successful in 47s
Default CI / Secret Scanner (TruffleHog) (pull_request) Successful in 1m14s
Default CI / Pre-Commit Hooks (pull_request) Successful in 1m49s
9f93ecf181

Could you please add a terraform file which shows on how to use this image for a server?

Could you please add a terraform file which shows on how to use this image for a server?
mauritz.uphoff approved these changes 2026-06-23 06:32:10 +00:00
@ -0,0 +1,22 @@
**/.terraform/*

gitignore not needed. It's in the root of the project

gitignore not needed. It's in the root of the project
sven.schmidt marked this conversation as resolved
@ -0,0 +100,4 @@
stackit iam service-account key create \
--project-id <project-id> \
--service-account-email <sa-email> \
--output-format json > keys/sa-key.json

Add a note that the service account also needs according permissions

Add a note that the service account also needs according permissions
sven.schmidt marked this conversation as resolved
sven.schmidt added 1 commit 2026-06-23 06:52:46 +00:00
feat: add server configuration and outputs for custom image deployment
All checks were successful
Default CI / Check for Open TODOs (pull_request) Successful in 56s
Default CI / Secret Scanner (TruffleHog) (pull_request) Successful in 1m23s
Default CI / Pre-Commit Hooks (pull_request) Successful in 3m18s
6be779c8d9
sven.schmidt added 1 commit 2026-06-23 07:49:45 +00:00
fix: correct pattern for ignoring Terraform local directories in .gitignore
All checks were successful
Default CI / Check for Open TODOs (pull_request) Successful in 31s
Default CI / Secret Scanner (TruffleHog) (pull_request) Successful in 52s
Default CI / Pre-Commit Hooks (pull_request) Successful in 2m48s
813b715604
Author
Owner

Notes should be resolved via latest commits.

Please check @mauritz.uphoff

Notes should be resolved via latest commits. Please check @mauritz.uphoff

Please rename the output and server files as follows:
Server -> 003-server.tf
Outputs -> 004-outputs.tf

Alternatively, you could use 100-outputs.tf, that might be simpler and more consistent.

I’ve just merged a new pre-commit check that verifies all Terraform files (excluding modules) start with 010, 020, 030, etc. This is to help keep all examples aligned. Don’t forget to rename any existing .tf files to match this naming convention.

Once done, feel free to merge the changes yourself.

Please rename the output and server files as follows: Server -> 003-server.tf Outputs -> 004-outputs.tf Alternatively, you could use 100-outputs.tf, that might be simpler and more consistent. I’ve just merged a new pre-commit check that verifies all Terraform files (excluding modules) start with `010`, `020`, `030`, etc. This is to help keep all examples aligned. Don’t forget to rename any existing `.tf` files to match this naming convention. Once done, feel free to merge the changes yourself.
mauritz.uphoff force-pushed examples/iaas-image-upload from 813b715604 to 4e6bab851d 2026-06-23 11:22:43 +00:00 Compare
mauritz.uphoff added 1 commit 2026-06-23 11:40:01 +00:00
Merge branch 'main' into examples/iaas-image-upload
Some checks failed
Default CI / Check for Open TODOs (pull_request) Successful in 35s
Default CI / Secret Scanner (TruffleHog) (pull_request) Successful in 1m44s
Default CI / Pre-Commit Hooks (pull_request) Failing after 3m10s
d71598ca06
mauritz.uphoff force-pushed examples/iaas-image-upload from d71598ca06 to 64c698dd68 2026-06-23 14:17:38 +00:00 Compare
sven.schmidt added 2 commits 2026-06-26 06:15:19 +00:00
refactor: update Terraform file naming convention to 000/010/020/030/100 format
All checks were successful
Default CI / Check for Open TODOs (pull_request) Successful in 30s
Default CI / Secret Scanner (TruffleHog) (pull_request) Successful in 54s
Default CI / Pre-Commit Hooks (pull_request) Successful in 2m32s
e2a8bd5db4

LGTM! Merged :-)

LGTM! Merged :-)
mauritz.uphoff force-pushed examples/iaas-image-upload from e2a8bd5db4 to 93d90d9488 2026-06-26 06:59:46 +00:00 Compare
mauritz.uphoff added 1 commit 2026-06-26 07:04:10 +00:00
fix: file names
All checks were successful
Default CI / Check for Open TODOs (pull_request) Successful in 27s
Default CI / Secret Scanner (TruffleHog) (pull_request) Successful in 1m29s
Default CI / Pre-Commit Hooks (pull_request) Successful in 2m5s
cfa4249089
mauritz.uphoff merged commit 89f18bbba0 into main 2026-06-26 07:08:32 +00:00
mauritz.uphoff deleted branch examples/iaas-image-upload 2026-06-26 07:08:33 +00:00
Sign in to join this conversation.
No reviewers
No labels
No milestone
No project
2 participants
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference: professional-service-best-practices/professional-service#34
No description provided.