Skip to content
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

managed_disk_resource: Add validation for disk_iops_read_write, disk_mbps_read_write #14028

Merged
merged 1 commit into from
Nov 4, 2021

Conversation

myc2h6o
Copy link
Contributor

@myc2h6o myc2h6o commented Nov 4, 2021

When these two properties are set to zero on creation, they are not included in the request, and the values will be computed by server, a non-zero value will be assigned and cause a drift. Adding the validation to ensure a value is greater than zero so that this drift can be avoided

resource "azurerm_managed_disk" "test" {
  name                 = "test"
  location             = "westus"
  resource_group_name  = "test"
  create_option        = "Empty"
  storage_account_type = "UltraSSD_LRS"
  disk_size_gb = 512
  disk_iops_read_write = 0
  disk_mbps_read_only = 0
}

Copy link
Collaborator

@katbyte katbyte left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks @myc2h6o - LGTM 👍

@katbyte katbyte added this to the v2.84.0 milestone Nov 4, 2021
@katbyte katbyte merged commit 9479c49 into hashicorp:main Nov 4, 2021
katbyte added a commit that referenced this pull request Nov 4, 2021
@myc2h6o myc2h6o deleted the disk_validation branch November 5, 2021 02:28
@github-actions
Copy link

github-actions bot commented Nov 5, 2021

This functionality has been released in v2.84.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!

@github-actions
Copy link

github-actions bot commented Dec 6, 2021

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.
If you have found a problem that seems related to this change, please open a new issue and complete the issue template so we can capture all the details necessary to investigate further.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Dec 6, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants