Conversation
|
Could you add some examples for your new resource and datasource please? see https://github.com/stackitcloud/terraform-provider-stackit/tree/main/examples |
Added the examples |
|
Please also run |
|
will come back to this pr once the stackit-go-sdk is released because I need the wait handler |
|
|
@h3adex @rubenhoenle can you check again? Is this the right way to implement the default region if not in the provider specified? |
provider "stackit" {
default_region = var.stackit_region
service_account_key_path = var.stackit_service_account_key_path
enable_beta_resources = true
}
resource "time_rotating" "rotate" {
rotation_minutes = 1
}
resource "stackit_modelserving_token" "example" {
project_id = var.stackit_project_id
region = "eu01"
name = "Example token"
rotate_when_changed = {
rotation = time_rotating.rotate.id
}
} |
|
Creating the datasource still has some issues: resource "time_rotating" "rotate" {
rotation_minutes = 60
}
resource "stackit_modelserving_token" "example" {
project_id = var.project_id
region = "eu01"
name = "Example token"
rotate_when_changed = {
rotation = time_rotating.rotate.id
}
}
data "stackit_modelserving_token" "exampleds" {
project_id = var.project_id
token_id = stackit_modelserving_token.example.token_id
}
output "testoutput" {
value = [
"token id: ${data.stackit_modelserving_token.exampleds.token_id}",
]
}
the following error occurs │ Error: Value Conversion Error
│
│ with data.stackit_modelserving_token.exampleds,
│ An unexpected error was encountered trying to convert tftypes.Value into token.Model. This
│ is always an error in the provider. Please report the following to the provider developer:
│
│ mismatch between struct and object: Struct defines fields not found in object: ttl_duration
│ and rotate_when_changed.
╵The datasource has a different structure as the resource, so we probably need a dedicated model for the datasource |
fixed it |
where do I need to add these instructions? I see there is some kind of acceptance test in each service. |
|
The testing instructions are commonly added to the JIRA issues (for this one it would be STACKITTPR-147. Note that due to permission issues the TPR project is most suitable. In this case however the terraform config is sufficient. |
bahkauv70
left a comment
There was a problem hiding this comment.
Looks good now, all tests from my side worked


Add model serving to stackit terraform provider