-
Notifications
You must be signed in to change notification settings - Fork 79
feat(mexp): Onboarding Modelexperiments #1547
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Open
paul-sffrth
wants to merge
45
commits into
stackitcloud:main
Choose a base branch
from
paul-sffrth:feat/mlflow
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from all commits
Commits
Show all changes
45 commits
Select commit
Hold shift + click to select a range
b18f51a
Add create instance functionality
4446500
Add Read update delete func for mlflow instance
e6aa8af
Add mlflow instance token resource
0e669b8
Removed unnecessary boxing
a2683b5
fix bugs in mlflow api
148f2c4
Improve create update payload mapping
65dab38
Improve conversion in token update payload method
16a6cf2
Add unit tests
85a5d3a
Add acc test
9767a5f
Fix bug with bucket_name mapping
2d3f67a
Add instance token to acc test
a8fa49f
Fix lining
d17e12c
Fix test
5cf697b
Add documentation
b699604
Change sdk clients to DefaultAPI
be28a59
Add some mocks and test_utils
9958b94
Add unit test
f4a1c7c
Remove ginkgo testing framework
f1cce93
Add update unit test
e9e9d36
Add instance unit tests
4b9e9bd
Add unit tests
398e068
Fix linting & remove testify framework
def071b
feat: Change wait handler to public go sdk
a53dc91
feat: refractor unit tests and resources
044f426
feat: adapt to new serviceEnablementUtils
d81efc1
feat: remove "unknown" resource state in creation
8ce92ba
feat(mexp): refractor tests and resources
ed274a0
chore(mexp): add docs and fix tests
0562d79
chore(mexp): fix description.md
45cc5c4
chore(mexp): fix docs
55c976d
chore(mexp): incorporate feedback
02abb97
chore(mexp): include token feedback
f8a7500
chore(mexp): incorporate feedback
6622747
chore(mexp): correct token scheme description
0411965
chore(mexp): remove state deletion in update
0d51d01
chore(mexp): update docs
13dc2c2
chore(mexp): Add mapLabels func
ea386db
chore(mexp): incorporate feedback
1cb7bca
chore(mexp): add note to test
48ddb09
chore(mexp): incorporate feedback
433571b
chore(mexp): update example
32437d9
chore(mexp): add comments
6524a3a
chore(mexp): add feedback
602c3b2
chore(mexp): add nil check for map functions
58cb366
chore(mexp): fix go mod
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,43 @@ | ||
| --- | ||
| # generated by https://github.com/hashicorp/terraform-plugin-docs | ||
| page_title: "stackit_modelexperiments_instance Data Source - stackit" | ||
| subcategory: "" | ||
| description: |- | ||
| Datasource scheme for a STACKIT AI Model Experiments instance. | ||
| --- | ||
|
|
||
| # stackit_modelexperiments_instance (Data Source) | ||
|
|
||
| Datasource scheme for a STACKIT AI Model Experiments instance. | ||
|
|
||
| ## Example Usage | ||
|
|
||
| ```terraform | ||
| data "stackit_modelexperiments_instance" "example" { | ||
| project_id = "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx" | ||
| region = "eu01" | ||
| instance_id = "example-instance-id" | ||
| } | ||
| ``` | ||
|
|
||
| <!-- schema generated by tfplugindocs --> | ||
| ## Schema | ||
|
|
||
| ### Required | ||
|
|
||
| - `instance_id` (String) The AI Model Experiments instance ID. | ||
| - `project_id` (String) STACKIT Project ID to which the resource is associated. | ||
|
|
||
| ### Optional | ||
|
|
||
| - `region` (String) The STACKIT region name the resource is located in. If not defined, the provider region is used. | ||
|
|
||
| ### Read-Only | ||
|
|
||
| - `bucket_name` (String) The object storage bucket name of the AI Model Experiments instance. | ||
| - `deleted_experiment_retention` (String) The deleted experiment retention time of the AI Model Experiments instance. | ||
| - `description` (String) The description is a longer text chosen by the user to provide more context for the resource. | ||
| - `id` (String) Terraform's internal resource identifier. It is structured as "`project_id`,`region`,`instance_id`". | ||
| - `labels` (Map of String) A map of arbitrary key/value pairs that can be attached to the resource | ||
| - `name` (String) The display name is a short name chosen by the user to identify the resource. | ||
| - `url` (String) The Dashboard URL of the AI Model Experiments instance. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,43 @@ | ||
| --- | ||
| # generated by https://github.com/hashicorp/terraform-plugin-docs | ||
| page_title: "stackit_modelexperiments_token Data Source - stackit" | ||
| subcategory: "" | ||
| description: |- | ||
| Datasource scheme for a STACKIT AI Model Experiments instance tokens. | ||
| --- | ||
|
|
||
| # stackit_modelexperiments_token (Data Source) | ||
|
|
||
| Datasource scheme for a STACKIT AI Model Experiments instance tokens. | ||
|
|
||
| ## Example Usage | ||
|
|
||
| ```terraform | ||
| data "stackit_modelexperiments_token" "example" { | ||
| project_id = "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx" | ||
| region = "eu01" | ||
| instance_id = "example-instance-id" | ||
| token_id = "example-token-id" | ||
| } | ||
| ``` | ||
|
|
||
| <!-- schema generated by tfplugindocs --> | ||
| ## Schema | ||
|
|
||
| ### Required | ||
|
|
||
| - `instance_id` (String) The AI Model Experiments instance ID. | ||
| - `project_id` (String) STACKIT Project ID to which the resource is associated. | ||
| - `token_id` (String) The AI Model Experiments instance token ID. | ||
|
|
||
| ### Optional | ||
|
|
||
| - `region` (String) The STACKIT region name the resource is located in. If not defined, the provider region is used. | ||
|
|
||
| ### Read-Only | ||
|
|
||
| - `description` (String) The description is a longer text chosen by the user to provide more context for the resource. | ||
| - `id` (String) Terraform's internal resource identifier. It is structured as "`project_id`,`region`,`token_id`". | ||
| - `labels` (Map of String) A map of arbitrary key/value pairs that can be attached to the resource | ||
| - `name` (String) The display name is a short name chosen by the user to identify the resource. | ||
| - `valid_until` (String) The time until the AI Model Experiments instance token is valid. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,61 @@ | ||
| --- | ||
| # generated by https://github.com/hashicorp/terraform-plugin-docs | ||
| page_title: "stackit_modelexperiments_instance Resource - stackit" | ||
| subcategory: "" | ||
| description: |- | ||
| Manages a STACKIT AI Model Experiments instance. | ||
| --- | ||
|
|
||
| # stackit_modelexperiments_instance (Resource) | ||
|
|
||
| Manages a STACKIT AI Model Experiments instance. | ||
|
|
||
| ## Example Usage | ||
|
|
||
| ```terraform | ||
| resource "stackit_modelexperiments_instance" "example" { | ||
| project_id = "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx" | ||
| region = "eu01" | ||
| name = "Example name" | ||
| description = "Example description" | ||
| deleted_experiment_retention = "30d" | ||
| labels = { | ||
| label = "ExampleLabel" | ||
| } | ||
| } | ||
| ``` | ||
|
|
||
| <!-- schema generated by tfplugindocs --> | ||
| ## Schema | ||
|
|
||
| ### Required | ||
|
|
||
| - `name` (String) The display name is a short name chosen by the user to identify the resource. | ||
| - `project_id` (String) STACKIT Project ID to which the resource is associated. | ||
|
|
||
| ### Optional | ||
|
|
||
| - `deleted_experiment_retention` (String) The deleted experiment retention time of the AI Model Experiments instance. | ||
| - `description` (String) The description is a longer text chosen by the user to provide more context for the resource. | ||
| - `labels` (Map of String) A map of arbitrary key/value pairs that can be attached to the resource | ||
| - `region` (String) The STACKIT region name the resource is located in. If not defined, the provider region is used. | ||
|
|
||
| ### Read-Only | ||
|
|
||
| - `bucket_name` (String) The object storage bucket name of the AI Model Experiments instance. | ||
| - `id` (String) Terraform's internal resource identifier. It is structured as "`project_id`,`region`,`instance_id`". | ||
| - `instance_id` (String) The AI Model Experiments instance ID. | ||
| - `url` (String) The Dashboard URL of the AI Model Experiments instance. | ||
|
|
||
| ## Import | ||
|
|
||
| Import is supported using the following syntax: | ||
|
|
||
| In Terraform v1.5.0 and later, the [` + "`" + `import` + "`" + ` block](https://developer.hashicorp.com/terraform/language/import) can be used with the ` + "`" + `id` + "`" + ` attribute, for example: | ||
|
|
||
| ```terraform | ||
| import { | ||
| to = stackit_modelexperiments_instance.import_example | ||
| id = "${var.project_id},${var.region},${var.instance_id}" | ||
| } | ||
| ``` |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,82 @@ | ||
| --- | ||
| # generated by https://github.com/hashicorp/terraform-plugin-docs | ||
| page_title: "stackit_modelexperiments_token Resource - stackit" | ||
| subcategory: "" | ||
| description: |- | ||
| Manages a STACKIT AI Model Experiments instance tokens. | ||
| --- | ||
|
|
||
| # stackit_modelexperiments_token (Resource) | ||
|
|
||
| Manages a STACKIT AI Model Experiments instance tokens. | ||
|
|
||
| ## Example Usage | ||
|
|
||
| ```terraform | ||
| resource "stackit_modelexperiments_instance" "example" { | ||
| project_id = "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx" | ||
| region = "eu01" | ||
| name = "Example name" | ||
| description = "Example description" | ||
| deleted_experiment_retention = "30d" | ||
| labels = { | ||
| label = "ExampleLabel" | ||
| } | ||
| } | ||
|
|
||
| resource "time_rotating" "rotate" { | ||
| rotation_days = 80 | ||
| } | ||
|
|
||
| resource "stackit_modelexperiments_token" "token" { | ||
| project_id = "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx" | ||
| name = "Example token nane" | ||
| region = "eu01" | ||
| instance_id = stackit_modelexperiments_instance.example.instance_id | ||
| description = "Example token description" | ||
| ttl_duration = "80d" | ||
| labels = { | ||
| label = "ExampleLlabel" | ||
| } | ||
| rotate_when_changed = { | ||
| rotation = time_rotating.rotate.id | ||
| } | ||
| } | ||
| ``` | ||
|
|
||
| <!-- schema generated by tfplugindocs --> | ||
| ## Schema | ||
|
|
||
| ### Required | ||
|
|
||
| - `instance_id` (String) The AI Model Experiments instance ID. | ||
| - `name` (String) The display name is a short name chosen by the user to identify the resource. | ||
| - `project_id` (String) STACKIT Project ID to which the resource is associated. | ||
|
|
||
| ### Optional | ||
|
|
||
| - `description` (String) The description is a longer text chosen by the user to provide more context for the resource. | ||
| - `labels` (Map of String) A map of arbitrary key/value pairs that can be attached to the resource | ||
| - `region` (String) The STACKIT region name the resource is located in. 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 resource when they change, enabling resource 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 AI Model Experiments instance token. E.g. 5h30m40s,5h,5h30m,30m,30s | ||
|
|
||
| ### Read-Only | ||
|
|
||
| - `id` (String) Terraform's internal resource identifier. It is structured as "`project_id`,`region`,`token_id`". | ||
| - `token` (String, Sensitive) The content of the AI Model Experiments instance token. | ||
| - `token_id` (String) The AI Model Experiments instance token ID. | ||
| - `valid_until` (String) The time until the AI Model Experiments instance token is valid. | ||
|
|
||
| ## Import | ||
|
|
||
| Import is supported using the following syntax: | ||
|
|
||
| In Terraform v1.5.0 and later, the [` + "`" + `import` + "`" + ` block](https://developer.hashicorp.com/terraform/language/import) can be used with the ` + "`" + `id` + "`" + ` attribute, for example: | ||
|
|
||
| ```terraform | ||
| import { | ||
| to = stackit_modelexperiments_token.import_example | ||
| id = "${var.project_id},${var.region},${var.instance_id},${var.token_id}" | ||
| } | ||
| ``` |
5 changes: 5 additions & 0 deletions
5
examples/data-sources/stackit_modelexperiments_instance/data-source.tf
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,5 @@ | ||
| data "stackit_modelexperiments_instance" "example" { | ||
| project_id = "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx" | ||
| region = "eu01" | ||
| instance_id = "example-instance-id" | ||
| } |
6 changes: 6 additions & 0 deletions
6
examples/data-sources/stackit_modelexperiments_token/data-source.tf
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,6 @@ | ||
| data "stackit_modelexperiments_token" "example" { | ||
| project_id = "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx" | ||
| region = "eu01" | ||
| instance_id = "example-instance-id" | ||
| token_id = "example-token-id" | ||
| } |
4 changes: 4 additions & 0 deletions
4
examples/resources/stackit_modelexperiments_instance/import-by-string-id.tf
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,4 @@ | ||
| import { | ||
| to = stackit_modelexperiments_instance.import_example | ||
| id = "${var.project_id},${var.region},${var.instance_id}" | ||
| } |
10 changes: 10 additions & 0 deletions
10
examples/resources/stackit_modelexperiments_instance/resource.tf
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,10 @@ | ||
| resource "stackit_modelexperiments_instance" "example" { | ||
| project_id = "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx" | ||
| region = "eu01" | ||
| name = "Example name" | ||
| description = "Example description" | ||
| deleted_experiment_retention = "30d" | ||
| labels = { | ||
| label = "ExampleLabel" | ||
| } | ||
| } | ||
4 changes: 4 additions & 0 deletions
4
examples/resources/stackit_modelexperiments_token/import-by-string-id.tf
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,4 @@ | ||
| import { | ||
| to = stackit_modelexperiments_token.import_example | ||
| id = "${var.project_id},${var.region},${var.instance_id},${var.token_id}" | ||
| } |
29 changes: 29 additions & 0 deletions
29
examples/resources/stackit_modelexperiments_token/resource.tf
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,29 @@ | ||
| resource "stackit_modelexperiments_instance" "example" { | ||
| project_id = "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx" | ||
| region = "eu01" | ||
| name = "Example name" | ||
| description = "Example description" | ||
| deleted_experiment_retention = "30d" | ||
| labels = { | ||
| label = "ExampleLabel" | ||
| } | ||
| } | ||
|
|
||
| resource "time_rotating" "rotate" { | ||
| rotation_days = 80 | ||
| } | ||
|
|
||
| resource "stackit_modelexperiments_token" "token" { | ||
| project_id = "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx" | ||
| name = "Example token nane" | ||
| region = "eu01" | ||
| instance_id = stackit_modelexperiments_instance.example.instance_id | ||
| description = "Example token description" | ||
| ttl_duration = "80d" | ||
| labels = { | ||
| label = "ExampleLlabel" | ||
| } | ||
| rotate_when_changed = { | ||
| rotation = time_rotating.rotate.id | ||
| } | ||
| } | ||
|
paul-sffrth marked this conversation as resolved.
|
||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.