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

[New Resource]: SVM QoS Policy Activation #301

Open
acch opened this issue Sep 30, 2024 · 4 comments · May be fixed by #346
Open

[New Resource]: SVM QoS Policy Activation #301

acch opened this issue Sep 30, 2024 · 4 comments · May be fixed by #346
Labels
New Resource New Request for an ONTAP Resource
Milestone

Comments

@acch
Copy link

acch commented Sep 30, 2024

Description

Ability to activate (existing) QoS policy for (existing) SVM

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

  • netapp-ontap_svm_qos_policy_activation

Potential Terraform Configuration

// example SVM
resource "netapp-ontap_svm" "svm1" {
  name = "svm1"
}

// example policy
resource "netapp-ontap_qos_policies" "policy1" {
  name     = "policy1"
  svm_name = netapp-ontap_svm.svm1.name
}

// activate example policy for example SVM
resource "netapp-ontap_svm_qos_policy_activation" "svm1_policy1" { 
  svm_name        = netapp_ontap_svm.svm1.name
  qos_policy_name = netapp_ontap_qos_policies.policy1.name
}

References

Would you like to implement a fix?

Yes

@carchi8py
Copy link
Contributor

hmmmm we'll need to look at how we are going to do this. I don't think we need a specific resource for this and should be able to do it in SVM, but let me see how that would work.

@acch
Copy link
Author

acch commented Oct 1, 2024

@carchi8py Thanks for looking into this!

My understanding is that QoS policy activation is a multi-step process (taken from here):

  1. Create SVM: vserver create -vserver svm1
  2. Create QoS policy: qos policy-group create -policy-group policy1 -vserver svm1
  3. Apply policy group to SVM: vserver modify -vserver svm1 -qos-policy-group policy1

Creating the policy group is only possible after the SVM / vserver exists. Hence, activating it is a separate step - it can't be activated upon initial creation... but I might be missing something here!

That's why I've opted for a separate resource to model the association of SVM <-> policy. Again, this might be due to my limited understanding - let me know if there's a more elegant way to do it.

Thanks again, and all the best!
Achim

@carchi8py carchi8py added the New Resource New Request for an ONTAP Resource label Oct 10, 2024
@carchi8py carchi8py moved this from Future to 2.1 in Terraform for ONTAP Roadmap Oct 10, 2024
@carchi8py carchi8py added this to the 2.1 milestone Oct 10, 2024
@acch
Copy link
Author

acch commented Dec 2, 2024

@carchi8py Did you already have a chance to think this true?

If not, then I will go ahead and start working on a PR to implement a separate resource to model the association of SVM <-> policy...

@acch acch linked a pull request Dec 3, 2024 that will close this issue
@acch
Copy link
Author

acch commented Dec 9, 2024

I've prepared a PR to address this change: #346.

Please let me know if anything's missing.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
New Resource New Request for an ONTAP Resource
Projects
Status: 2.1
Development

Successfully merging a pull request may close this issue.

2 participants