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

[Bug]: Duplicate Entry for protocol_access_rules.client_ip #310

Open brent-at-aam opened 2 days ago

brent-at-aam commented 2 days ago

Terraform Core Version

1.9.6

ONTAP Provider Version

1.1.4

Affected Resource(s)

netapp-ontap_protocols_nfs_service_resource

Expected Behavior

Should be able to create the resource.

Actual Behavior

Resource creation fails with an error message that there is a duplicate entry for protocol_access_rules.client_ip. This is not a field we have access to set.

Relevant Error/Panic Output Snippet

╷
│ Error: error creating NFS services
│ 
│   with netapp-ontap_protocols_nfs_service_resource.foo,
│   on main.tf line 47, in resource "netapp-ontap_protocols_nfs_service_resource" "foo":
│   47: resource "netapp-ontap_protocols_nfs_service_resource" "foo" {
│ 
│ error on POST protocols/nfs/services: REST reported error
│ restclient.RestError{Code:"1", Message:"duplicate entry",
│ Target:"protocol_access_rules.client_ip"}, statusCode: 409, statusCode 409
╵

Terraform Configuration Files

provider "netapp-ontap" {
  connection_profiles = [
    {
      name           = "OUR_NAME"
      hostname       = "OUR_HOSTNAME"
      username       = "OUR_USERNAME"
      password       = "OUR_PASSWORD"
      validate_certs = false
    }
  ]
}

resource "netapp-ontap_protocols_nfs_service_resource" "foo" {
  cx_profile_name = var.filesystem
  svm_name        = var.svm_name
  enabled         = true
  protocol = {
    v3_enabled  = true
    v40_enabled = true
    v40_features = {
      acl_enabled = true
    }
    v41_enabled = true
    v41_features = {
      acl_enabled = true
    }
    v4_id_domain = var.domain
  }
}

Steps to Reproduce

Run terraform plan/apply

Debug Output

No response

Panic Output

No response

Important Factoids

No response

References

No response

Would you like to implement a fix?

No

chuyich commented 2 days ago

@brent-at-aam Would you please provide the log by running: TF_LOG="DEBUG" terraform apply So we will have clear picture to see what happened. Thanks.

carchi8py commented 2 days ago

@brent-at-aam can you send that log to me at carchi@netapp.com or @chuyich at chuyi.ching@netapp.com