NetApp / terraform-provider-netapp-ontap

Terrafrom ONTAP provider
https://registry.terraform.io/providers/NetApp/netapp-ontap/latest
Mozilla Public License 2.0
16 stars 7 forks source link

[Enhancement]: Add `autosize` to `ontap_storage_volume_resource` #245

Open ianc769 opened 2 months ago

ianc769 commented 2 months ago

Description

Add autosize to ontap_storage_volume_resource

Affected Resource(s) and/or Data Source(s)

netapp-ontap_storage_volume_resource

Potential Terraform Configuration

resource "netapp-ontap_storage_volume_resource" "example" {
  cx_profile_name = "cluster5"
  name = "vol1"
  svm_name = "svm2"
  aggregates = [
    {
      name = "aggr2"
    },
  ]
  space_guarantee = "none"
  snapshot_policy = "default-1weekly"
  encryption = true
  snaplock = {
    type = "non_snaplock"
  }
  space = {
      size = 30
      size_unit = "mb"
      percent_snapshot_space = 20
    logical_space = {
      enforcement = true
      reporting = true
    }
  }
  tiering = {
      policy_name = "all"
  }
  nas = {
    export_policy_name = "test"
    group_id = 10
    user_id = 20
    unix_permissions = "755"
    security_style = "mixed"
      junction_path = "/testacc"
  }
  ## New autosize
  autosize {
    grow_threshold = 50
    maximum = 1000 # Maximum size in bytes
    minimum = 7000 # Minimum size in bytes
    mode = grow # or `grow_shrink` or `off`
    shrink_threshold = 20
    size_unit = 'gb' # Not part of the API but useful for Code
  }
}

References

https://docs.netapp.com/us-en/ontap-restapi-9131//ontap/patch-storage-volumes-.html#definitions

Would you like to implement a fix?

None

carchi8py commented 2 months ago

I've added this to the next major release, which will be 1.2.