-
Notifications
You must be signed in to change notification settings - Fork 71
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
30
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
30 commits
Select commit
Hold shift + click to select a range
40eba81
Add create instance functionality
401924a
Add Read update delete func for mlflow instance
6ae2549
Add mlflow instance token resource
9832906
Removed unnecessary boxing
e2e22cb
fix bugs in mlflow api
2e519b2
Improve create update payload mapping
7436228
Improve conversion in token update payload method
d326b20
Add unit tests
7960782
Add acc test
5e684e3
Fix bug with bucket_name mapping
10a3235
Add instance token to acc test
5e7c6da
Fix lining
f52c1ee
Fix test
36d9512
Add documentation
83c9130
Change sdk clients to DefaultAPI
e90ba12
Add some mocks and test_utils
0fb28ee
Add unit test
fa1c6ac
Remove ginkgo testing framework
b3575fd
Add update unit test
1649042
Add instance unit tests
b2ad985
Add unit tests
d44dab0
Fix linting & remove testify framework
3bde333
feat: Change wait handler to public go sdk
98187a0
feat: refractor unit tests and resources
38368b5
feat: adapt to new serviceEnablementUtils
430abe4
feat: remove "unknown" resource state in creation
c0d049e
feat(mexp): refractor tests and resources
dc31d23
chore(mexp): add docs and fix tests
825ab15
chore(mexp): fix description.md
50e9dcf
chore(mexp): fix docs
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
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,71 @@ | ||
| --- | ||
| # generated by https://github.com/hashicorp/terraform-plugin-docs | ||
| page_title: "stackit_modelexperiments_instance Resource - stackit" | ||
| subcategory: "" | ||
| description: |- | ||
| AI Model Experiment Instance Resource schema. | ||
| Example Usage | ||
|
|
||
|
|
||
| resource "stackit_modelexperiments_instance" "example" { | ||
| project_id = "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx" | ||
| name = "Example instance" | ||
| region = "eu01" | ||
| description = "Example description" | ||
| } | ||
| --- | ||
|
|
||
| # stackit_modelexperiments_instance (Resource) | ||
|
|
||
| AI Model Experiment Instance Resource schema. | ||
|
|
||
| ## Example Usage | ||
|
|
||
| ```terraform | ||
|
|
||
| resource "stackit_modelexperiments_instance" "example" { | ||
| project_id = "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx" | ||
| name = "Example instance" | ||
| region = "eu01" | ||
| description = "Example description" | ||
| } | ||
| ``` | ||
|
|
||
| ## Example Usage | ||
|
|
||
| ```terraform | ||
| resource "stackit_modelexperiments_instance" "example" { | ||
| project_id = "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx" | ||
| region = "eu01" | ||
| display_name = "example name" | ||
| description = "Example description" | ||
| deleted_experiment_retention = "30d" | ||
| labels = { | ||
| label = "example label" | ||
| } | ||
| } | ||
| ``` | ||
|
|
||
| <!-- schema generated by tfplugindocs --> | ||
| ## Schema | ||
|
|
||
| ### Required | ||
|
|
||
| - `name` (String) Name of the AI model experiments instance. | ||
| - `project_id` (String) STACKIT project ID to which the AI model experiments instance is associated. | ||
|
|
||
| ### Optional | ||
|
|
||
| - `deleted_experiment_retention` (String) The deleted experiment retention of the AI model experiments instance. | ||
| - `description` (String) The description of the AI model experiments instance. | ||
| - `labels` (Map of String) A map of arbitrary key/value pairs that can be attached to the AI model experiments instance | ||
| - `region` (String) Region to which the AI model experiments instance is associated. If not defined, the provider region is used | ||
|
|
||
| ### Read-Only | ||
|
|
||
| - `bucket_name` (String) The object storage bucket name of the AI model experiments instance. | ||
| - `error_message` (String) Error messages of the AI model experiments instance. | ||
| - `id` (String) Terraform's internal data source. ID. It is structured as "`project_id`,`region`,`instance_id`". | ||
| - `instance_id` (String) The AI model experiments instance ID. | ||
| - `state` (String) State of the AI model experiments instance. | ||
| - `url` (String) 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,99 @@ | ||
| --- | ||
| # generated by https://github.com/hashicorp/terraform-plugin-docs | ||
| page_title: "stackit_modelexperiments_token Resource - stackit" | ||
| subcategory: "" | ||
| description: |- | ||
| AI Model Experiment Instance Token Resource schema. | ||
| Example Usage | ||
| resource "stackit_modelexperiments_instance" "example" { | ||
| project_id = "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx" | ||
| name = "Example instance" | ||
| region = "eu01" | ||
| description = "Example description" | ||
| } | ||
| resource "stackit_modelexperiments_token" "token" { | ||
| project_id = "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx" | ||
| name = "Example token" | ||
| region = "eu01" | ||
| instance_id = stackit_modelexperiments_instance.example.instance_id | ||
| description = "Example description" | ||
| } | ||
| --- | ||
|
|
||
| # stackit_modelexperiments_token (Resource) | ||
|
|
||
| AI Model Experiment Instance Token Resource schema. | ||
|
|
||
| ## Example Usage | ||
|
|
||
| ```terraform | ||
| resource "stackit_modelexperiments_instance" "example" { | ||
| project_id = "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx" | ||
| name = "Example instance" | ||
| region = "eu01" | ||
| description = "Example description" | ||
| } | ||
| resource "stackit_modelexperiments_token" "token" { | ||
| project_id = "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx" | ||
| name = "Example token" | ||
| region = "eu01" | ||
| instance_id = stackit_modelexperiments_instance.example.instance_id | ||
| description = "Example description" | ||
| } | ||
| ``` | ||
|
|
||
| ## Example Usage | ||
|
|
||
| ```terraform | ||
| resource "stackit_modelexperiments_instance" "example" { | ||
| project_id = "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx" | ||
| region = "eu01" | ||
| display_name = "Example name" | ||
| description = "Example description" | ||
| deleted_experiment_retention = "30d" | ||
| labels = { | ||
| label = "Example label" | ||
| } | ||
| } | ||
| 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 = "Example label" | ||
| } | ||
| } | ||
| ``` | ||
|
|
||
| <!-- schema generated by tfplugindocs --> | ||
| ## Schema | ||
|
|
||
| ### Required | ||
|
|
||
| - `instance_id` (String) The AI model experiments instance ID. | ||
| - `name` (String) Name of the AI model experiments instance token. | ||
| - `project_id` (String) STACKIT project ID to which the AI model experiments instance token is associated. | ||
|
|
||
| ### Optional | ||
|
|
||
| - `description` (String) The description of the AI model experiments instance token. | ||
| - `labels` (Map of String) A map of arbitrary key/value pairs for the AI model experiments instance token. | ||
| - `region` (String) Region to which the AI model experiments instance token is associated. If not defined, the provider region is used | ||
| - `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 data source. ID. It is structured as "`project_id`,`region`,`token_id`". | ||
| - `state` (String) State of the AI model experiments instance token. | ||
| - `token` (String, Sensitive) 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. |
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" | ||
| display_name = "example name" | ||
| description = "Example description" | ||
| deleted_experiment_retention = "30d" | ||
| labels = { | ||
| label = "example label" | ||
| } | ||
| } |
22 changes: 22 additions & 0 deletions
22
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,22 @@ | ||
| resource "stackit_modelexperiments_instance" "example" { | ||
| project_id = "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx" | ||
| region = "eu01" | ||
| display_name = "Example name" | ||
| description = "Example description" | ||
| deleted_experiment_retention = "30d" | ||
| labels = { | ||
| label = "Example label" | ||
| } | ||
| } | ||
|
|
||
| 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 = "Example label" | ||
| } | ||
| } | ||
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
13 changes: 13 additions & 0 deletions
13
stackit/internal/services/modelexperiments/instance/description.md
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,13 @@ | ||
| AI Model Experiment Instance Resource schema. | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This description.md doubles the ##Example Usage in the resulting doc. |
||
|
|
||
| ## Example Usage | ||
|
|
||
| ```terraform | ||
|
|
||
| resource "stackit_modelexperiments_instance" "example" { | ||
| project_id = "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx" | ||
| name = "Example instance" | ||
| region = "eu01" | ||
| description = "Example description" | ||
| } | ||
| ``` | ||
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please add import examples as well please.
Note: There is (since yesterday) a separate file which contains an import example which is handled by the terraform doc generation (e.g. have a look at the import-by-string.id.tf files in the examples folders).