Skip to content

[Enhancement]: Add support for Tags/Tiering Object Tags #589

@brinnjoyce

Description

@brinnjoyce

Description

We are using tags on volumes - both so we can have them come through to Harvest metrics and as a way of discovering volumes for Flexcache provisioning.

We were using Tiering Object Tags before Tags were available so might as well add support for both.

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

  • netapp-ontap_volume
  • netapp-ontap_volume Data Source
  • netapp-ontap_volumes Data Source

Potential Terraform Configuration

data "netapp-ontap_volumes" "src_volumes" {
  cx_profile_name = "cluster1"
  filter = {
    svm_name = "cluster1-svm"
    tags     = "project:projectName"
  }
}

resource "netapp-ontap_volume" "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
    }
  }
  tags = ["project:name"]
  tiering = {
    policy_name = "all"
    object_tags = ["key=value"]
  }
  nas = {
    export_policy_name = "test"
    group_id = 10
    user_id = 20
    unix_permissions = "755"
    security_style = "mixed"
    junction_path = "/testacc"
  }
  autosize = {
    minimum = 20
    maximum = 60
    shrink_threshold = 10
    grow_threshold = 90
    mode = "off"
    size_unit = "mb"
  }
  snapshot_locking_enabled = false
}

References

https://docs.netapp.com/us-en/ontap-restapi/storage_volumes_endpoint_overview.html

Would you like to implement a fix?

Yes

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions