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

Need to run the Terraform script twice to have the Azure Netapp Files volume export policy setup correctly #5601

Closed
ghost opened this issue Feb 3, 2020 · 9 comments
Labels
bug service/netapp upstream/microsoft Indicates that there's an upstream issue blocking this issue/PR

Comments

@ghost
Copy link

ghost commented Feb 3, 2020

This issue was originally opened by @nightcat27 as hashicorp/terraform#24015. It was migrated here as a result of the provider split. The original body of the issue is below.


Customer uses terrafrom task to create volume for Azure netapp Files and they need to run the script twice then it works. After the first running of the script , the volume is created successfully but the export policy is always empty. Need to run the same script again, then the export policy is setup correctly.

Below is the script customer is using. I can reproduce this issue with "netapp.tf" I attached.

resource "azurerm_netapp_volume" "discvolume" {
name = "${var.netapp_volume_name}"
location = "australiaeast"
resource_group_name = "${var.netapp_resource_group_name}"
account_name = "${var.netapp_account_name}"
pool_name = "${var.netapp_pool_name}"
volume_path = "${var.netapp_volume_name}"
service_level = "Standard"
subnet_id = "${data.azurerm_subnet.aashared_netapp_subnet.id}"
storage_quota_in_gb = "${var.shared_storage_size_gb}"

export_policy_rule {
rule_index = 1
allowed_clients = ["${data.azurerm_subnet.presentation.address_prefix}" , "${data.azurerm_subnet.modelstore.address_prefix}" ,"${data.azurerm_subnet.rworker.address_prefix}", "${data.azurerm_subnet.devops.address_prefix}"]
cifs_enabled = false
nfsv3_enabled = false
nfsv4_enabled = true
unix_read_write = true
}
}

netapp.zip

@nightcat27

This comment has been minimized.

@nightcat27

This comment has been minimized.

@lsongcoles

This comment has been minimized.

@paulomarquesc
Copy link
Contributor

paulomarquesc commented Mar 5, 2020

@lsongcoles, this probably was fixed now on PR #5485 since we included some changes on how export_policy is defined within the NetApp provider, this is scheduled to be released on v2.1, as soon as it gets released, it would be great to hear from you if this fixed your issue whenever you have a change to test. During my tests I never seen the need to execute it twice to get the export policy created, so let's see if that works for you.

@tbugfinder
Copy link

Hi,
in my case using provider v2.20 the volume export policy wasn't applied correctly neither. Comparing console and terraform syntax it also looks a little bit misalined in terms of options and settings.

  export_policy_rule {
    rule_index      = 1
    allowed_clients = ["10.1.2.0/23", "10.2.2.0/24"]
  }

@neil-yechenwei
Copy link
Contributor

Thanks for opening this issue. After investigated, seems NetApp Volume API doesn't set export policy at first http request when "protocols" is set and the all values of "cifs_enabled/nfsv3_enabled/nfsv4_enabled" are "false". I assume it's an api issue. So I filed an issue on Azure/azure-rest-api-specs#10409.

@mybayern1974 mybayern1974 added the upstream/microsoft Indicates that there's an upstream issue blocking this issue/PR label Sep 6, 2020
@paulomarquesc
Copy link
Contributor

paulomarquesc commented Mar 3, 2021

@neil-yechenwei /@katbyte , this issue could not be reproduced, can you please close this?

@katbyte
Copy link
Collaborator

katbyte commented Mar 4, 2021

Closing as requested

@katbyte katbyte closed this as completed Mar 4, 2021
@ghost
Copy link
Author

ghost commented Apr 3, 2021

I'm going to lock this issue because it has been closed for 30 days ⏳. This helps our maintainers find and focus on the active issues.

If you feel this issue should be reopened, we encourage creating a new issue linking back to this one for added context. If you feel I made an error 🤖 🙉 , please reach out to my human friends 👉 hashibot-feedback@hashicorp.com. Thanks!

@ghost ghost locked as resolved and limited conversation to collaborators Apr 3, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug service/netapp upstream/microsoft Indicates that there's an upstream issue blocking this issue/PR
Projects
None yet
Development

Successfully merging a pull request may close this issue.

8 participants