-
Notifications
You must be signed in to change notification settings - Fork 82
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
Merged
Merged
Changes from all commits
Commits
Show all changes
45 commits
Select commit
Hold shift + click to select a range
4a2b561
Add create instance functionality
55d2eab
Add Read update delete func for mlflow instance
867db60
Add mlflow instance token resource
80fddbc
Removed unnecessary boxing
11d4fef
fix bugs in mlflow api
3f0252a
Improve create update payload mapping
ee1a844
Improve conversion in token update payload method
e4c86ab
Add unit tests
780570d
Add acc test
e5a17f0
Fix bug with bucket_name mapping
dce1fbe
Add instance token to acc test
3af3219
Fix lining
a3c562c
Fix test
ae71fcf
Add documentation
4b115bd
Change sdk clients to DefaultAPI
9aa3f60
Add some mocks and test_utils
7b441bb
Add unit test
a8788f3
Remove ginkgo testing framework
6683f54
Add update unit test
443bb6e
Add instance unit tests
a2716f3
Add unit tests
c6f26b6
Fix linting & remove testify framework
f8059fd
feat: Change wait handler to public go sdk
8e2ead8
feat: refractor unit tests and resources
6e88097
feat: adapt to new serviceEnablementUtils
ac40109
feat: remove "unknown" resource state in creation
929a319
feat(mexp): refractor tests and resources
7a9c041
chore(mexp): add docs and fix tests
8130a4e
chore(mexp): fix description.md
5827cf7
chore(mexp): fix docs
32b2967
chore(mexp): incorporate feedback
553ba38
chore(mexp): include token feedback
474482e
chore(mexp): incorporate feedback
6adb36d
chore(mexp): correct token scheme description
c87761f
chore(mexp): remove state deletion in update
d531322
chore(mexp): update docs
4c9e302
chore(mexp): Add mapLabels func
3a9e6f6
chore(mexp): incorporate feedback
a8c1d97
chore(mexp): add note to test
d81a63c
chore(mexp): incorporate feedback
73e370b
chore(mexp): update example
d7034cf
chore(mexp): add comments
397903f
chore(mexp): add feedback
20a4c39
chore(mexp): add nil check for map functions
41766a4
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.