Skip to content

[Bug]: citrixadc_sslvserver_sslcertkey_binding error for SNICert: 1093 Argument pre-requisite missing [ocspCheck, CA] #1301

@yakyouk

Description

@yakyouk

Terraform Core Version

1.11.4

citrixadc Provider Version

1.43.1

Operating system

Windows 11

Affected Resource(s)

citrixadc_sslvserver_sslcertkey_binding

Equivalent NetScaler CLI Command

bind ssl vserver cs-api.example.com_https -certkeyName api.example.com_26 -SNICert
unbind ssl vserver cs-api.example.com_https -certkeyName api.example.com_26 -SNICert

Expected Behavior

the binding gets created/deleted correctly

Actual Behavior

Unbinding gives error: Error: [INFO] delete failed: 400 Bad Request ({ "errorcode": 1093, "message": "Argument pre-requisite missing [ocspCheck, CA]", "severity": "ERROR" })
Running the un/binding command manually with flag -ocspCheck Optional/Mandatory produces the same error.

This is because a SNI-enabled cert cannot be ocsp or CA, so when SNICert is set, Netscaler does not accept other flags. -> Other flags should only be passed conditionally.

Relevant Error/Panic Output Snippet

citrixadc_sslvserver_sslcertkey_binding.cert_bindings_fqdn["api.example.com"]: Creating...

Error: [ERROR] nitro-go: Failed to update resource of type sslvserver_sslcertkey_binding,  err=failed: 400 Bad Request ({ "errorcode": 1093, "message": "Argument pre-requisite missing [ocspCheck, CA]", "severity": "ERROR" })

with citrixadc_sslvserver_sslcertkey_binding.cert_bindings_fqdn["api.example.com"],
on main.tf line 562, in resource "citrixadc_sslvserver_sslcertkey_binding" "cert_bindings_fqdn":
562: resource "citrixadc_sslvserver_sslcertkey_binding" "cert_bindings_fqdn" {

Terraform Configuration Files

resource "citrixadc_sslvserver_sslcertkey_binding" "cert_bindings_fqdn" {
  for_each = local.map_fqdn
  vservername = citrixadc_csvserver.cs_vserver.name
  certkeyname = citrixadc_sslcertkey.cert[each.key].certkey
  ca = false
  snicert = true
}

Steps to Reproduce

Create a citrixadc_sslvserver_sslcertkey_binding, passing ocspcheck
OR
Create a citrixadc_sslvserver_sslcertkey_binding withoutocspcheck, then try to delete it

Debug Output

No response

Panic Output

No response

Important Factoids

No response

References

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions