Merge pull request 'update-variables' (#1) from update-variables into main

Reviewed-on: #1
This commit is contained in:
Michael_Sodan 2025-11-06 08:20:54 +00:00
commit a08852ed0a
Signed by: professional-service.git.onstackit.cloud
GPG key ID: 004207B7C5DED9F7
9 changed files with 26 additions and 14 deletions

1
.gitignore vendored
View file

@ -3,4 +3,5 @@ terraform.tfstate.backup
.terraform* .terraform*
.terraform/ .terraform/
*.qcow2 *.qcow2
*.tfvars

View file

@ -3,7 +3,7 @@ terraform {
required_providers { required_providers {
stackit = { stackit = {
source = "stackitcloud/stackit" source = "stackitcloud/stackit"
version = ">=0.50.0" version = ">=0.69.0"
} }
} }
} }
@ -20,4 +20,7 @@ provider "stackit" {
module "project" { module "project" {
source = "./project" source = "./project"
default_region = var.default_region
service_account_key_path = var.service_account_key_path
organization_id = var.organization_id
} }

View file

@ -1,6 +1,6 @@
resource "stackit_objectstorage_bucket" "example" { resource "stackit_objectstorage_bucket" "example" {
project_id = module.project.project_info["project3"].project_id project_id = module.project.project_info["project3"].project_id
name = "project-core-testbucket444" name = "project-core-06-11-25"
} }
resource "stackit_objectstorage_credentials_group" "example" { resource "stackit_objectstorage_credentials_group" "example" {

View file

@ -1,10 +1,10 @@
resource "stackit_ske_cluster" "demo-cluster" { resource "stackit_ske_cluster" "demo-cluster" {
project_id = module.project.project_info["project4"].project_id project_id = module.project.project_info["project4"].project_id
name = "demo-clustr" name = "demo"
node_pools = [ node_pools = [
{ {
name = "np" name = "np"
machine_type = "g1.4" machine_type = "g2i.4"
minimum = "2" minimum = "2"
maximum = "3" maximum = "3"
volume_size = "64" volume_size = "64"

View file

@ -1,6 +1,6 @@
// keypair adding to the server // keypair adding to the server
resource "stackit_key_pair" "keypair" { resource "stackit_key_pair" "keypair" {
name = "pubkeyforauth" name = "pubkeyforauth"
public_key = chomp(file("/root/.ssh/id_ed25519.pub")) public_key = chomp(file("${var.public_key_file}"))
} }

View file

@ -33,3 +33,7 @@ variable "flavor" {
default = "m1.2" default = "m1.2"
} }
variable "public_key_file" {
type = string
}

View file

@ -3,7 +3,7 @@ terraform {
required_providers { required_providers {
stackit = { stackit = {
source = "stackitcloud/stackit" source = "stackitcloud/stackit"
version = ">=0.50.0" version = ">=0.69.0"
} }
} }
} }

View file

@ -7,19 +7,19 @@ variable "projects" {
})) }))
default = { default = {
project1 = { project1 = {
name = "landingzone" name = "test_landingzone"
owner_email = "michael.sodan@stackit.cloud" owner_email = "michael.sodan@stackit.cloud"
} }
project2 = { project2 = {
name = "core" name = "test_core"
owner_email = "michael.sodan@stackit.cloud" owner_email = "michael.sodan@stackit.cloud"
} }
project3 = { project3 = {
name = "backup" name = "test_backup"
owner_email = "michael.sodan@stackit.cloud" owner_email = "michael.sodan@stackit.cloud"
} }
project4 = { project4 = {
name = "ske" name = "test_ske"
owner_email = "markus.brunsch@stackit.cloud" owner_email = "markus.brunsch@stackit.cloud"
} }
} }

4
terraform.tfvars.example Normal file
View file

@ -0,0 +1,4 @@
organization_id="03a34540-3c1a-4794-b2c6-7111ecf824ef"
service_account_key_path = "/Users/test/.stackit/credentials.json"
public_key_file = "/Users/test/.ssh/test_landing_zone.pub"