-
Notifications
You must be signed in to change notification settings - Fork 75
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
42
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
42 commits
Select commit
Hold shift + click to select a range
0ec71dc
Add create instance functionality
799f873
Add Read update delete func for mlflow instance
f355865
Add mlflow instance token resource
e98dc3e
Removed unnecessary boxing
6c2ac84
fix bugs in mlflow api
e0217f7
Improve create update payload mapping
921d56f
Improve conversion in token update payload method
0adb7ea
Add unit tests
94e5c35
Add acc test
e4037cc
Fix bug with bucket_name mapping
8ba5d7e
Add instance token to acc test
f6a0b49
Fix lining
295445a
Fix test
8d7c16c
Add documentation
ce321c2
Change sdk clients to DefaultAPI
147de51
Add some mocks and test_utils
07be756
Add unit test
422a145
Remove ginkgo testing framework
5b331aa
Add update unit test
2bde803
Add instance unit tests
f345a9f
Add unit tests
82e0d85
Fix linting & remove testify framework
1e336b5
feat: Change wait handler to public go sdk
c220f0f
feat: refractor unit tests and resources
dcafae4
feat: adapt to new serviceEnablementUtils
e03d6af
feat: remove "unknown" resource state in creation
55759f5
feat(mexp): refractor tests and resources
eb5231b
chore(mexp): add docs and fix tests
41e3b7a
chore(mexp): fix description.md
a71cd85
chore(mexp): fix docs
ed019fd
chore(mexp): incorporate feedback
8daba46
chore(mexp): include token feedback
a550847
chore(mexp): incorporate feedback
d5b2337
chore(mexp): correct token scheme description
77f00bd
chore(mexp): remove state deletion in update
8b51fc7
chore(mexp): update docs
3ae6e47
chore(mexp): Add mapLabels func
8bfacf1
chore(mexp): incorporate feedback
a4cd3c8
chore(mexp): add note to test
f8238e2
chore(mexp): incorporate feedback
5d1dbf5
chore(mexp): update example
4b603fa
chore(mexp): add comments
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 = "1h" | ||
| 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 = "1h" | ||
| 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.