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.
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
azurerm_linux_virtual_machine
,azurerm_windows_virtual_machine
- Supportautomatic_upgrade_enabled
,disk_controller_type
,os_image_notification
,treat_failure_as_deployment_failure_enabled
andvm_agent_platform_updates_enabled
#23394azurerm_linux_virtual_machine
,azurerm_windows_virtual_machine
- Supportautomatic_upgrade_enabled
,disk_controller_type
,os_image_notification
,treat_failure_as_deployment_failure_enabled
andvm_agent_platform_updates_enabled
#23394Changes from 8 commits
601c4a0
6323ca4
f428c0d
39e764d
d8727f5
0bc192c
ad160f6
980e693
875251b
e1b1042
File filter
Filter by extension
Conversations
Jump to
There are no files selected for viewing
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.
is there a reason why this is limited to 4.0?
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.
Hey @catriona-m, thank you for your review.
disk_controller_type
isoptional+computed
, which may cause a diff after upgrading the provider for users in current provider version. I have added a comment to explain it.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.
it doesn't appear to be optional and computed at the moment?
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.
The MS-DOC clarifies that
This property will be set to the default disk controller type if not specified
.For example, it will return
SCSI
as the default value ifstorageProfile.disk_controller_type
is not set with the following configuration: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.
But the value is not optional computed here & if we know the default why can we not simply just configure that be default?
i still don't understand why this needs to wait till 4.0.
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.
Hi @katbyte, @tombuildsstuff,
If
disk_controller_type
is not set, its value in theGet-Response
depends on the value ofsize
, for example:size = Standard_E2bds_v5
,disk_controller_type
will be returned asSCSI
size = Standard_E112ibds_v5
,disk_controller_type
will be returned asNVMe
Since
disk_controller_type
is not fixed for differentsize
values, I cannot set adefault
value for it.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.
you could just make it computed thou? while we would rather have a proper default in this case as we can't computed should be fine? why would making it computed cause a diff for existing users? it would just adopt the value they have picked?
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.
I cannot just define
disk_controller_type
as acomputed
property because this property supports to be overwritten by users. May I define it asoptional+computed w/o a default value
, which can avoid the diff for existing users?Though I know the best practice does not recommend using optional+computed anymore.
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.
while generally yes that is correct and we shouldn't, there still are times where it has to be done because theres no "correct" way to dynamically specify a default. so in cases like this were the only way to get "the default" is from the API we have to use computed still.
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.
code updated. Thanks.