This commit is contained in:
Stanislav Kopp 2025-05-06 09:30:27 +02:00
commit c3bc6ab806
40 changed files with 1069 additions and 0 deletions

View file

@ -0,0 +1,15 @@
resource "stackit_objectstorage_bucket" "this" {
name = var.objectstorage_bucket_name
project_id = var.stackit_project_id
}
resource "stackit_objectstorage_credentials_group" "this" {
name = var.objectstorage_credentials_group_name
project_id = var.stackit_project_id
}
resource "stackit_objectstorage_credential" "this" {
depends_on = [stackit_objectstorage_credentials_group.this]
credentials_group_id = stackit_objectstorage_credentials_group.this.credentials_group_id
project_id = var.stackit_project_id
}

15
objectstorage/outputs.tf Normal file
View file

@ -0,0 +1,15 @@
output "objectstorage_access_key" {
value = stackit_objectstorage_credential.this.access_key
}
output "objectstorage_secret_access_key" {
value = stackit_objectstorage_credential.this.secret_access_key
}
output "objectstorage_url_path_style" {
value = stackit_objectstorage_bucket.this.url_path_style
}
output "objectstorage_url_virtual_hosted_style" {
value = stackit_objectstorage_bucket.this.url_virtual_hosted_style
}

View file

@ -0,0 +1,8 @@
terraform {
required_providers {
stackit = {
source = "stackitcloud/stackit"
version = "~> 0.50.0"
}
}
}

View file

@ -0,0 +1,19 @@
variable "stackit_project_id" {
description = "ID of the STACKIT Portal Project"
type = string
}
variable "objectstorage_bucket_name" {
description = "Name of the bucket which will be used in object storage"
type = string
}
variable "objectstorage_region" {
description = "Name of the resource region"
type = string
}
variable "objectstorage_credentials_group_name" {
description = "Name of the credentials group where access keys will be stored"
type = string
}