feat: add model serving resource

* add model serving

* add right provider config

* rename model_serving to modelserving

* add model serving custom endpoint everywhere

* rename file

* add default region, docs for model serving

* add right order of wait handler

* rotate after to token

* fixes

* add initial doc files

* address code comments

* refactor region description

* remove warning for not found resources

* add service enablement

* address code comments

* address code comments

* fix datasource

* fix acc test

* review changes

* review changes

* review changes

* review changes

* review changes

* review changes

* review changes

* review changes

* review changes

* embed markdown description

* go tidy

---------

Co-authored-by: Mauritz Uphoff <mauritz.uphoff@me.com>
Co-authored-by: Mauritz Uphoff <39736813+h3adex@users.noreply.github.com>
This commit is contained in:
Patrick Koss 2025-03-28 16:20:25 +01:00 committed by GitHub
parent 68859a3fad
commit 435de4c9eb
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
15 changed files with 1436 additions and 45 deletions

View file

@ -162,6 +162,7 @@ Note: AWS specific checks must be skipped as they do not work on STACKIT. For de
- `loadbalancer_custom_endpoint` (String) Custom endpoint for the Load Balancer service
- `logme_custom_endpoint` (String) Custom endpoint for the LogMe service
- `mariadb_custom_endpoint` (String) Custom endpoint for the MariaDB service
- `modelserving_custom_endpoint` (String) Custom endpoint for the Model Serving service
- `mongodbflex_custom_endpoint` (String) Custom endpoint for the MongoDB Flex service
- `objectstorage_custom_endpoint` (String) Custom endpoint for the Object Storage service
- `observability_custom_endpoint` (String) Custom endpoint for the Observability service

View file

@ -0,0 +1,71 @@
---
# generated by https://github.com/hashicorp/terraform-plugin-docs
page_title: "stackit_modelserving_token Resource - stackit"
subcategory: ""
description: |-
Model Serving Auth Token Resource schema.
Example Usage
Automatically rotate model serving token
resource "time_rotating" "rotate" {
rotation_days = 80
}
resource "stackit_modelserving_token" "example" {
project_id = "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx"
name = "Example token"
rotate_when_changed = {
rotation = time_rotating.rotate.id
}
}
---
# stackit_modelserving_token (Resource)
Model Serving Auth Token Resource schema.
## Example Usage
### Automatically rotate model serving token
```terraform
resource "time_rotating" "rotate" {
rotation_days = 80
}
resource "stackit_modelserving_token" "example" {
project_id = "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx"
name = "Example token"
rotate_when_changed = {
rotation = time_rotating.rotate.id
}
}
```
<!-- schema generated by tfplugindocs -->
## Schema
### Required
- `name` (String) Name of the model serving auth token.
- `project_id` (String) STACKIT project ID to which the model serving auth token is associated.
### Optional
- `description` (String) The description of the model serving auth token.
- `region` (String) Region to which the model serving auth token is associated. If not defined, the provider region is used
- `rotate_when_changed` (Map of String) A map of arbitrary key/value pairs that will force recreation of the token when they change, enabling token rotation based on external conditions such as a rotating timestamp. Changing this forces a new resource to be created.
- `ttl_duration` (String) The TTL duration of the model serving auth token. E.g. 5h30m40s,5h,5h30m,30m,30s
### Read-Only
- `id` (String) Terraform's internal data source. ID. It is structured as "`project_id`,`region`,`token_id`".
- `state` (String) State of the model serving auth token.
- `token` (String, Sensitive) Content of the model serving auth token.
- `token_id` (String) The model serving auth token ID.
- `valid_until` (String) The time until the model serving auth token is valid.