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

[Bug]: ACL template creation fails when optional attribute description is omitted #686

Open
uplight-james opened this issue May 28, 2024 · 0 comments
Labels
bug Something isn't working

Comments

@uplight-james
Copy link

Terraform Version

1.8.0

Equinix Provider Version

1.36.4

Effected Terraform Resources

equinix_network_acl_template

Terraform Config Files

Failing resource:

resource "equinix_network_acl_template" "acl_templ" {
    name = "my-acl"
    project_id = data.equinix_network_account.ashburn.project_id
    inbound_rule {
      subnet = "<some ip>/32"
      protocol = "TCP"
      src_port = "22"
      dst_port = "22"
      description = "SSH access to our device"
    }
}

Working resource:

resource "equinix_network_acl_template" "acl_templ" {
    name = "my-acl"
    description = "An ACL to determine who can access our new device"
    project_id = data.equinix_network_account.ashburn.project_id
    inbound_rule {
      subnet = "<some ip>/32"
      protocol = "TCP"
      src_port = "22"
      dst_port = "22"
      description = "SSH access to our device"
    }
}

Debug Output

2024-05-28T10:13:26.352-0700 [DEBUG] provider.terraform-provider-equinix_v1.36.4: 2024/05/28 10:13:26 [DEBUG] setting computed for "device_details" from ComputedKeys
2024-05-28T10:13:26.353-0700 [DEBUG] provider.terraform-provider-equinix_v1.36.4: 2024/05/28 10:13:26 [DEBUG] Equinix API Request Details:
2024-05-28T10:13:26.353-0700 [DEBUG] provider.terraform-provider-equinix_v1.36.4: ---[ REQUEST ]---------------------------------------
2024-05-28T10:13:26.353-0700 [DEBUG] provider.terraform-provider-equinix_v1.36.4: POST /ne/v1/aclTemplates HTTP/1.1
2024-05-28T10:13:26.353-0700 [DEBUG] provider.terraform-provider-equinix_v1.36.4: Host: api.equinix.com
2024-05-28T10:13:26.353-0700 [DEBUG] provider.terraform-provider-equinix_v1.36.4: User-Agent: HashiCorp Terraform/1.8.0 (+https://www.terraform.io) Terraform Plugin SDK/v2.33.0 terraform-provider-equinix/1.36.4 equinix/ecx-go
2024-05-28T10:13:26.353-0700 [DEBUG] provider.terraform-provider-equinix_v1.36.4: Content-Length: 221
2024-05-28T10:13:26.353-0700 [DEBUG] provider.terraform-provider-equinix_v1.36.4: Accept: application/json
2024-05-28T10:13:26.353-0700 [DEBUG] provider.terraform-provider-equinix_v1.36.4: Content-Type: application/json
2024-05-28T10:13:26.353-0700 [DEBUG] provider.terraform-provider-equinix_v1.36.4: Accept-Encoding: gzip
2024-05-28T10:13:26.353-0700 [DEBUG] provider.terraform-provider-equinix_v1.36.4
2024-05-28T10:13:26.353-0700 [DEBUG] provider.terraform-provider-equinix_v1.36.4: {
2024-05-28T10:13:26.353-0700 [DEBUG] provider.terraform-provider-equinix_v1.36.4:  "name": "<redacted>",
2024-05-28T10:13:26.353-0700 [DEBUG] provider.terraform-provider-equinix_v1.36.4:  "inboundRules": [
2024-05-28T10:13:26.353-0700 [DEBUG] provider.terraform-provider-equinix_v1.36.4:   {
2024-05-28T10:13:26.353-0700 [DEBUG] provider.terraform-provider-equinix_v1.36.4:    "protocol": "TCP",
2024-05-28T10:13:26.353-0700 [DEBUG] provider.terraform-provider-equinix_v1.36.4:    "srcPort": "22",
2024-05-28T10:13:26.353-0700 [DEBUG] provider.terraform-provider-equinix_v1.36.4:    "dstPort": "22",
2024-05-28T10:13:26.353-0700 [DEBUG] provider.terraform-provider-equinix_v1.36.4:    "subnet": "<redacted>/32",
2024-05-28T10:13:26.353-0700 [DEBUG] provider.terraform-provider-equinix_v1.36.4:    "seqNo": 1,
2024-05-28T10:13:26.353-0700 [DEBUG] provider.terraform-provider-equinix_v1.36.4:    "description": "SSH access to our device"
2024-05-28T10:13:26.353-0700 [DEBUG] provider.terraform-provider-equinix_v1.36.4:   }
2024-05-28T10:13:26.353-0700 [DEBUG] provider.terraform-provider-equinix_v1.36.4:  ],
2024-05-28T10:13:26.353-0700 [DEBUG] provider.terraform-provider-equinix_v1.36.4:  "projectId": "redacted"
2024-05-28T10:13:26.353-0700 [DEBUG] provider.terraform-provider-equinix_v1.36.4: }
2024-05-28T10:13:26.353-0700 [DEBUG] provider.terraform-provider-equinix_v1.36.4: -----------------------------------------------------
2024-05-28T10:13:28.069-0700 [DEBUG] provider.terraform-provider-equinix_v1.36.4: 2024/05/28 10:13:28 [DEBUG] Equinix API Response Details:
2024-05-28T10:13:28.069-0700 [DEBUG] provider.terraform-provider-equinix_v1.36.4: ---[ RESPONSE ]--------------------------------------
2024-05-28T10:13:28.069-0700 [DEBUG] provider.terraform-provider-equinix_v1.36.4: HTTP/1.1 500 Internal Server Error
2024-05-28T10:13:28.069-0700 [DEBUG] provider.terraform-provider-equinix_v1.36.4: Connection: close
2024-05-28T10:13:28.069-0700 [DEBUG] provider.terraform-provider-equinix_v1.36.4: Content-Type: application/json;charset=UTF-8
2024-05-28T10:13:28.069-0700 [DEBUG] provider.terraform-provider-equinix_v1.36.4: Date: Tue, 28 May 2024 17:13:28 GMT
2024-05-28T10:13:28.069-0700 [DEBUG] provider.terraform-provider-equinix_v1.36.4: Server: istio-envoy
2024-05-28T10:13:28.069-0700 [DEBUG] provider.terraform-provider-equinix_v1.36.4: Vary: Accept-Encoding
2024-05-28T10:13:28.069-0700 [DEBUG] provider.terraform-provider-equinix_v1.36.4: X-Apigee-Dp-Color: 174
2024-05-28T10:13:28.069-0700 [DEBUG] provider.terraform-provider-equinix_v1.36.4: X-Apigee-Environment: extprod
2024-05-28T10:13:28.069-0700 [DEBUG] provider.terraform-provider-equinix_v1.36.4: X-Apigee-Message-Id: df323a4b-76a8-4be8-a217-c90003e776ac
2024-05-28T10:13:28.069-0700 [DEBUG] provider.terraform-provider-equinix_v1.36.4: X-Apigee-Organization: eqx-apg-prod
2024-05-28T10:13:28.069-0700 [DEBUG] provider.terraform-provider-equinix_v1.36.4: X-Apigee-Proxy: /organizations/eqx-apg-prod/environments/extprod/apiproxies/Network_Edge_Apis/revisions/9
2024-05-28T10:13:28.069-0700 [DEBUG] provider.terraform-provider-equinix_v1.36.4: X-Apigee-Proxy-Basepath: /ne/v1
2024-05-28T10:13:28.069-0700 [DEBUG] provider.terraform-provider-equinix_v1.36.4: X-Apigee-Region: us-west1
2024-05-28T10:13:28.069-0700 [DEBUG] provider.terraform-provider-equinix_v1.36.4: X-Apigee-Target-Latency: 379
2024-05-28T10:13:28.070-0700 [DEBUG] provider.terraform-provider-equinix_v1.36.4: X-Envoy-Upstream-Service-Time: 396
2024-05-28T10:13:28.070-0700 [DEBUG] provider.terraform-provider-equinix_v1.36.4: X-Request-Id: df323a4b-76a8-4be8-a217-c90003e776ac
2024-05-28T10:13:28.070-0700 [DEBUG] provider.terraform-provider-equinix_v1.36.4
2024-05-28T10:13:28.070-0700 [DEBUG] provider.terraform-provider-equinix_v1.36.4: [
2024-05-28T10:13:28.070-0700 [DEBUG] provider.terraform-provider-equinix_v1.36.4:  {
2024-05-28T10:13:28.070-0700 [DEBUG] provider.terraform-provider-equinix_v1.36.4:   "errorCode": "EQ-4010030",
2024-05-28T10:13:28.070-0700 [DEBUG] provider.terraform-provider-equinix_v1.36.4:   "errorMessage": "We're unable to process your request.",
2024-05-28T10:13:28.070-0700 [DEBUG] provider.terraform-provider-equinix_v1.36.4:   "help": "https://<domain.name>/help/error/EQ-4010030",
2024-05-28T10:13:28.070-0700 [DEBUG] provider.terraform-provider-equinix_v1.36.4:   "details": "Please open a support ticket via the ? on the bottom of every page for further assistance.",
2024-05-28T10:13:28.070-0700 [DEBUG] provider.terraform-provider-equinix_v1.36.4:   "correlationId": null,
2024-05-28T10:13:28.070-0700 [DEBUG] provider.terraform-provider-equinix_v1.36.4:   "additionalInfo": [
2024-05-28T10:13:28.070-0700 [DEBUG] provider.terraform-provider-equinix_v1.36.4:    {
2024-05-28T10:13:28.070-0700 [DEBUG] provider.terraform-provider-equinix_v1.36.4:     "property": null,
2024-05-28T10:13:28.070-0700 [DEBUG] provider.terraform-provider-equinix_v1.36.4:     "reason": null
2024-05-28T10:13:28.070-0700 [DEBUG] provider.terraform-provider-equinix_v1.36.4:    }
2024-05-28T10:13:28.070-0700 [DEBUG] provider.terraform-provider-equinix_v1.36.4:   ]
2024-05-28T10:13:28.070-0700 [DEBUG] provider.terraform-provider-equinix_v1.36.4:  }
2024-05-28T10:13:28.070-0700 [DEBUG] provider.terraform-provider-equinix_v1.36.4: ]

A 500 error is returned saying, contact support.

Panic Output

No response

Expected Behavior

The terraform resource can be created when all required fields are provided: https://registry.terraform.io/providers/equinix/equinix/latest/docs/resources/equinix_network_acl_template

Actual Behavior

The top level "description" field is marked Optional in the docs but in reality, the underlying equinix api requires it. The error code is amorphous and does not indicate anything RE missing fields.

The docs should be updated to reflect this required field.

Steps to Reproduce

Create an ACL and omit the top level "description"

@uplight-james uplight-james added the bug Something isn't working label May 28, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant