-
Notifications
You must be signed in to change notification settings - Fork 4.7k
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
New Resource: azurerm_lab_service_plan
#19312
Conversation
4ded1ee
to
5d9b2f3
Compare
40da74c
to
fbb8555
Compare
38e55ca
to
fbb8555
Compare
@stephybun , thanks for your comment. I've updated code. Please take another look. Thanks. |
azurerm_lab_service_lab_plan
azurerm_lab_service_plan
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.
Test failure
------- Stdout: -------
=== RUN TestAccLabServicePlan_update
=== PAUSE TestAccLabServicePlan_update
=== CONT TestAccLabServicePlan_update
=== CONT TestAccLabServicePlan_update
testcase.go:110: Step 3/4 error: Error running apply: exit status 1
Error: updating Lab Plan (Subscription: "*******"
Resource Group Name: "acctestRG-lslp-221213171606146854"
Lab Plan Name: "acctest-lslp-221213171606146854"): performing CreateOrUpdate: labplan.LabPlanClient#CreateOrUpdate: Failure sending request: StatusCode=0 -- Original Error: Code="ValidationError" Message="The request is not valid." Details=[{"additionalInfo":[],"details":[],"message":"Property value must be a subset of supported regions: australiaeast, australiasoutheast, brazilsouth, canadacentral, canadaeast, centralindia, centralus, eastasia, eastus, eastus2, eastus2euap, francecentral, germanywestcentral, japaneast, koreacentral, northcentralus, northeurope, norwayeast, southafricanorth, southcentralus, southeastasia, switzerlandnorth, uaenorth, uksouth, ukwest, westcentralus, westeurope, westus","target":"properties.allowedRegions[1]"}] AdditionalInfo=[]
with azurerm_lab_service_plan.test,
on terraform_plugin_test.tf line 69, in resource "azurerm_lab_service_plan" "test":
69: resource "azurerm_lab_service_plan" "test" {
updating Lab Plan (Subscription: "*******"
Resource Group Name: "acctestRG-lslp-221213171606146854"
Lab Plan Name: "acctest-lslp-221213171606146854"): performing CreateOrUpdate:
labplan.LabPlanClient#CreateOrUpdate: Failure sending request: StatusCode=0
-- Original Error: Code="ValidationError" Message="The request is not valid."
Details=[{"additionalInfo":[],"details":[],"message":"Property value must be
a subset of supported regions: australiaeast, australiasoutheast,
brazilsouth, canadacentral, canadaeast, centralindia, centralus, eastasia,
eastus, eastus2, eastus2euap, francecentral, germanywestcentral, japaneast,
koreacentral, northcentralus, northeurope, norwayeast, southafricanorth,
southcentralus, southeastasia, switzerlandnorth, uaenorth, uksouth, ukwest,
westcentralus, westeurope, westus","target":"properties.allowedRegions[1]"}]
AdditionalInfo=[]
--- FAIL: TestAccLabServicePlan_update (276.43s)
@stephybun , seems the secondary test location in your test environment is incorrect. Could you check if your secondary test location is correct? If not, please rerun test case after the secondary test location is set correctly in your test environment. Thanks. |
Hi @stephybun , not all locations support lab service. So I limited the test location in service.kt(https://github.com/hashicorp/terraform-provider-azurerm/pull/19312/files#diff-c9a4f5ece9fe921f274cae0220ba39a13027c503c6bd80e3cc9ee926565a5c94) for Teamcity. But seems the change in service.kt doesn't take effect in Teamcity. May I ask when the change in service.kt would take effect? If the change in service.kt would take effect after PR merge, I assume test case failing is expected. Hence, for now I tried to set env variable |
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.
Have another comment on the schema while I was going through the docs.
* `disconnect_delay` - (Required) The amount of time a VM will stay running after a user disconnects if this behavior is enabled. This value must be formatted as an ISO 8601 string. | ||
|
||
* `idle_delay` - (Required) The amount of time a VM will idle before it is shutdown if this behavior is enabled. This value must be formatted as an ISO 8601 string. | ||
|
||
* `no_connect_delay` - (Required) The amount of time a VM will stay running before it is shutdown if no connection is made and this behavior is enabled. This value must be formatted as an ISO 8601 string. | ||
|
||
* `shutdown_on_disconnect_enabled` - (Required) Is shutdown on disconnect enabled? Possible values are `true` and `false`. | ||
|
||
* `shutdown_when_not_connected_enabled` - (Required) Will a VM get shutdown when it hasn't been connected to after a period of time? Possible values are `true` and `false`. | ||
|
||
* `shutdown_on_idle` - (Optional) Will a VM get shutdown when it has idled for a period of time? Possible values are `LowUsage` and `UserAbsence`. |
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.
disconnect_delay
, idle_delay
and no_connect_delay
only come into effect when their corresponding flag is set to true i.e.shutdown_on_disconnect_enabled
, shutdown_when_not_connected_enabled
and shutdown_on_idle
which seems redundant and like a bit of a janky user experience.
disconnect_delay
, idle_delay
and no_connect_delay
should become Optional, and if they are set then they are enabled, if they are absent then they are disabled instead of having to specify that with an additional property.
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.
@stephybun , yes, you're right. For shutdown_on_disconnect_enabled
and shutdown_when_not_connected_enabled
, I've removed them to improve user experience. For shutdown_on_idle
, we may not remove it since it's enum value.
@neil-yechenwei - settings.kt will only take affect once the PR is merged into main, until then its required to manually change the params on the build |
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.
Thanks @neil-yechenwei LGTM 🥟
This functionality has been released in v3.37.0 of the Terraform Provider. Please see the Terraform documentation on provider versioning or reach out if you need any assistance upgrading. For further feature requests or bug reports with this functionality, please create a new GitHub issue following the template. Thank you! |
* New Resource: azurerm_lab_service_lab_plan * update code * update code * update code * update code * update code * update code * update code * update code * update code * update code * update code * update code * update tc * update code * update code * update code
I'm going to lock this pull request because it has been closed for 30 days ⏳. This helps our maintainers find and focus on the active contributions. |
This PR is to support new resource
azurerm_lab_service_lab_plan
.