chore: initial push to be able to work together

This commit is contained in:
Marcel S. Henselin 2025-12-11 09:59:41 +01:00
parent 81e8d48cf6
commit 30070d8470
263 changed files with 45437 additions and 2 deletions

7
sample/.gitignore vendored Normal file
View file

@ -0,0 +1,7 @@
*.json
*.bak
*.tfstate
*.tfstate.backup
terraform
variables.tf
*.tfrc

41
sample/main.tf Normal file
View file

@ -0,0 +1,41 @@
resource "stackitalpha_kms_keyring" "keyring" {
project_id = var.project_id
display_name = "keyring01"
description = "This is a test keyring for private endpoints"
}
resource "stackitalpha_kms_key" "key" {
project_id = var.project_id
keyring_id = stackitalpha_kms_keyring.keyring.keyring_id
display_name = "key01"
protection = "software"
algorithm = "aes_256_gcm"
purpose = "symmetric_encrypt_decrypt"
access_scope = "SNA"
}
resource "stackitalpha_postgresflexalpha_instance" "ptlsdbsrv" {
project_id = var.project_id
name = "example-instance"
acl = ["0.0.0.0/0"]
backup_schedule = "0 0 * * *"
flavor = {
cpu = 2
ram = 4
}
replicas = 3
storage = {
class = "premium-perf12-stackit"
size = 5
}
version = 14
encryption = {
key_id = stackitalpha_kms_key.key.id
key_ring_id = stackitalpha_kms_keyring.keyring.keyring_id
key_version = "1"
service_account = var.sa_email
}
network = {
access_scope = "SNA"
}
}

14
sample/providers.tf Normal file
View file

@ -0,0 +1,14 @@
terraform {
required_providers {
stackitalpha = {
source = "registry.terraform.io/stackitcloud/stackitalpha"
version = "~> 0.1"
}
}
}
provider "stackitalpha" {
default_region = "eu01"
enable_beta_resources = true
service_account_key_path = "./service_account.json"
}

View file

@ -0,0 +1,10 @@
provider_installation {
dev_overrides {
"registry.terraform.io/stackitcloud/stackitalpha" = "<CURRENT PROJECT PATH>/bin/"
}
# For all other providers, install them directly from their origin provider
# registries as normal. If you omit this, Terraform will _only_ use
# the dev_overrides block, and so no other providers will be available.
direct {}
}

7
sample/tf.sh Executable file
View file

@ -0,0 +1,7 @@
#!/usr/bin/env bash
# copy or rename sample.tfrc.example and adjust it
TERRAFORM_CONFIG=$(pwd)/sample.tfrc
export TERRAFORM_CONFIG
terraform "$1"

7
sample/tofu.sh Executable file
View file

@ -0,0 +1,7 @@
#!/usr/bin/env bash
# copy or rename sample.tfrc.example and adjust it
TERRAFORM_CONFIG=$(pwd)/sample.tfrc
export TERRAFORM_CONFIG
tofu "$1"

View file

@ -0,0 +1,7 @@
variable "project_id" {
default = "<PROJECT ID UUID>"
}
variable "sa_email" {
default = "<SERVICE ACCOUNT EMAIL>"
}