Creating a new aggregate with an unsupported number of disks, for example 'number_of_disks = 7', fails as expected with the below error:
code: 400, message: {"message":"Allowed number of disks is 1 to 6","causeMessage":"BadRequestException: Allowed number of disks is 1 to 6"
Trying to increase the number disks of an existent aggregate using an unsupported number of disks, it fails with the below error:
Error: code: 400, message: {"message":"Aggregate disks limit of 6 will be exceeded","causeMessage":"BadRequestException: Aggregate disks limit of 6 will be exceeded"
So far so good, but the issue is that the Terraform state keeps the number_of_disks to the new unsupported value instead of the origin value. After that, trying to modify the number of disks with a supported number of disks , for example 'number_ofdisks = 5', it fails with the below error:
'Aggregate: number_ofdisks cannot be reduced'
Cloud Volumes ONTAP supports up to 6 disks (persistent disks) per aggregate on Google Cloud https://docs.netapp.com/us-en/cloud-volumes-ontap-relnotes/reference-limits-gcp.html#aggregate-limits
Creating a new aggregate with an unsupported number of disks, for example 'number_of_disks = 7', fails as expected with the below error: code: 400, message: {"message":"Allowed number of disks is 1 to 6","causeMessage":"BadRequestException: Allowed number of disks is 1 to 6"
Trying to increase the number disks of an existent aggregate using an unsupported number of disks, it fails with the below error: Error: code: 400, message: {"message":"Aggregate disks limit of 6 will be exceeded","causeMessage":"BadRequestException: Aggregate disks limit of 6 will be exceeded"
So far so good, but the issue is that the Terraform state keeps the number_of_disks to the new unsupported value instead of the origin value. After that, trying to modify the number of disks with a supported number of disks , for example 'number_ofdisks = 5', it fails with the below error: 'Aggregate: number_ofdisks cannot be reduced'
Attached the terraform output enabling the debug mode. terraform_debug.txt