chore: add sample to main

This commit is contained in:
Marcel S. Henselin 2026-03-13 11:23:22 +01:00
parent a310d1454a
commit 431f6eff8c
19 changed files with 653 additions and 0 deletions

57
sample/kms/kms.tf Normal file
View file

@ -0,0 +1,57 @@
resource "stackit_kms_keyring" "keyring001" {
project_id = var.project_id
display_name = "msh-keyring-sna01"
description = "This is a test keyring for private endpoints"
}
resource "stackit_kms_key" "key001" {
project_id = var.project_id
keyring_id = stackit_kms_keyring.keyring001.keyring_id
display_name = "msh-key-sna01"
protection = "software"
algorithm = "aes_256_gcm"
purpose = "symmetric_encrypt_decrypt"
access_scope = "SNA"
}
# data "stackitprivatepreview_sqlserverflexalpha_instance" "test" {
# project_id = var.project_id
# instance_id = var.instance_id
# region = "eu01"
# }
output "key_ring_id" {
value = stackit_kms_keyring.keyring001.id
}
resource "stackit_kms_keyring" "keyring001yy" {
project_id = var.project_id
display_name = "msh-kr-sna01"
description = "This is a test keyring for private endpoints"
}
resource "stackit_kms_key" "key001yy" {
project_id = var.project_id
keyring_id = stackit_kms_keyring.keyring001yy.keyring_id
display_name = "msh-k-001"
protection = "software"
algorithm = "aes_256_gcm"
purpose = "symmetric_encrypt_decrypt"
access_scope = "SNA"
}
# data "stackitprivatepreview_sqlserverflexalpha_instance" "test" {
# project_id = var.project_id
# instance_id = var.instance_id
# region = "eu01"
# }
output "key_ring_idxx" {
value = stackit_kms_keyring.keyring001yy.id
}
output "key_id" {
value = stackit_kms_key.key001yy.id
}

25
sample/kms/providers.tf Normal file
View file

@ -0,0 +1,25 @@
terraform {
required_providers {
stackit = {
source = "registry.terraform.io/stackitcloud/stackit"
version = "~> 0.70"
}
# stackitprivatepreview = {
# source = "tfregistry.sysops.stackit.rocks/mhenselin/stackitprivatepreview"
# version = "= 0.0.2-alpha"
# }
}
}
provider "stackit" {
default_region = "eu01"
enable_beta_resources = true
service_account_key_path = "../service_account.json"
}
# provider "stackitprivatepreview" {
# default_region = "eu01"
# enable_beta_resources = true
# service_account_key_path = "../service_account.json"
# }