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

azurerm_netapp_volume does not allow smb volumes to be created #5871

Closed
jknash opened this issue Feb 24, 2020 · 10 comments · Fixed by #10820
Closed

azurerm_netapp_volume does not allow smb volumes to be created #5871

jknash opened this issue Feb 24, 2020 · 10 comments · Fixed by #10820

Comments

@jknash
Copy link
Contributor

jknash commented Feb 24, 2020

Community Note

  • Please vote on this issue by adding a 👍 reaction to the original issue to help the community and maintainers prioritize this request
  • Please do not leave "+1" or "me too" comments, they generate extra noise for issue followers and do not help prioritize the request
  • If you are interested in working on this issue or have submitted a pull request, please leave a comment

When creating a new volume, there is no option to create an SMB volume. The volume always defaults to NFSv3 and it cannot be changed. I think we need a protocol option on the azurerm_netapp_volume resource.

  • azurerm_netapp_volume

Potential Terraform Configuration

resource "azurerm_netapp_volume" "example" {
  name                = "example-netappvolume"
  location            = azurerm_resource_group.example.location
  resource_group_name = azurerm_resource_group.example.name
  account_name     = azurerm_netapp_account.example.name
  pool_name            = azurerm_netapp_pool.example.name
  volume_path        = "my-unique-file-path"
  service_level        = "Premium"
  subnet_id             = azurerm_subnet.example.id
  **protocol                = smb**
  storage_quota_in_gb = 100
}

References

  • #0000
@seb-brack
Copy link

seb-brack commented Feb 25, 2020

To accommodate potential future enhancements of ANF I suggest adding a List(String) instead of a simple String to the configuration:

protocols = ["smb"]

Potentially related to #5485

@paulomarquesc
Copy link
Contributor

paulomarquesc commented Feb 25, 2020

@seb-brack, yes, you're correct, this property is being exposed in the PR you just referenced.

@jknash
Copy link
Contributor Author

jknash commented Feb 25, 2020

@seb-brack, yes, you're correct, this property is being exposed in the PR you just referenced.

@paulomarquesc

PR 5485 looks like it references NFS though. Can that same property be used to specify that it should be an SMB volume?

@paulomarquesc
Copy link
Contributor

It is for all available protocols, CIFS, NFSv3 and NFSv4.1.

@paulomarquesc
Copy link
Contributor

hi @jknash and @seb-brack just an update here, the PR #5485 that enables this among NFSv4,1 support got merged.

@paulomarquesc
Copy link
Contributor

@tracypholmes, is this closed when the fix is released on v2.1 or can it be closed as soon as it got merged?

@tbugfinder
Copy link

Recently ANF was extended to create multi-protocol volumes.
https://docs.microsoft.com/en-us/azure/azure-netapp-files/create-volumes-dual-protocol

This should be added, too. protocols mustn't be filled with a single value then or a new value should be added.

@AnotherCorto
Copy link

Hi, I would like to see this implememented as well as the multi protocol volumes.

@paulomarquesc
Copy link
Contributor

paulomarquesc commented Mar 4, 2021

This is already supported since the time we enabled an array as protocol types, worth it to notice that the supported dual protocol scenario is CIFS+NFSv3.

I'll update the documentation to point that out and provide a sample on how to do it, for now here is the snippet that I used to test it:

azurerm_netapp_account

resource "azurerm_netapp_account" "example" {
  name                = "${var.prefix}-netappaccount"
  location            = azurerm_resource_group.example.location
  resource_group_name = azurerm_resource_group.example.name

  active_directory {
    username            = "pmcadmin"
    password            = var.password
    smb_server_name     = "SMBSERVER"
    dns_servers         = ["10.2.0.4"]
    domain              = "anf.local"
  }
}

azurerm_netapp_volume

resource "azurerm_netapp_volume" "example" {
  lifecycle {
    prevent_destroy = true
  }

  name                = "${var.prefix}-netappvolume"
  location            = azurerm_resource_group.example.location
  resource_group_name = azurerm_resource_group.example.name
  account_name        = azurerm_netapp_account.example.name
  pool_name           = azurerm_netapp_pool.example.name
  volume_path         = "${var.prefix}-netappvolume"
  service_level       = "Standard"
  protocols           = ["CIFS","NFSv3"]
  subnet_id           = var.subnet_id
  storage_quota_in_gb = 100

  export_policy_rule {
    rule_index = 1
    allowed_clients = ["0.0.0.0/0"]
    cifs_enabled = true
    nfsv3_enabled = true
    nfsv4_enabled = false
    unix_read_write = true
  }
}

paulomarquesc added a commit to paulomarquesc/terraform-provider-azurerm that referenced this issue Mar 4, 2021
katbyte pushed a commit that referenced this issue Mar 4, 2021
PR to update documentation for clearer guidance on how to create dual protocol volumes (NFSv3+CIFS)

fixes #5871
@ghost
Copy link

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.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

6 participants