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

[FEATURE REQUEST]: Args option to citrixadc_nitro_info #1178

Open
rein-tollevik opened this issue Jul 5, 2024 · 0 comments
Open

[FEATURE REQUEST]: Args option to citrixadc_nitro_info #1178

rein-tollevik opened this issue Jul 5, 2024 · 0 comments

Comments

@rein-tollevik
Copy link

Description

I need a new "args" (or whatever its name) workflow argument to the citrixadc_nitro_info data-source. This is required to allow for instance the systemfile endpoint be used to test for, and read the content of, a file on the vpx. The required support for such an option is present in the adc-intro-go package, and used in at least resource_citrixadc_systemfile.go

As of now, the following terraform code will retrieve the systemfile from the vpx, but the provider fails to parse the returned structure as it looks for the full endpoint value in the returned json object. And the key there is only "systemfile", the args part is not included.

data "citrixadc_nitro_info" "myfile" {
  workflow = {
    lifecycle = "object-by-name"
    endpoint  = "systemfile?args=filename:my-file-name,filelocation:%2Fmy%2Ffile%2Fpath"
    bound_resource_missing_errorcode = 3441
  }
}

An extention like this would allow terraform to create a certificate request on the vpx, using the citrixadc_sslcertreq resource, download the created certificate request content using citrixadc_nitro_info, pass it to some CA to have it signed before the signed certificate is uploaded to the vpx again using citrixadc_systemfile. Combinded with my request to allow ssl keys to be created, ref #1176, this would allow the entire lifecycle of a certificate to be managed by terraform without the private key ever leaving the vpx.

Affected Resource(s) and/or Data Source(s)

  • citrixadc_nitro_info

Equivalent NetScaler CLI Command

API kall:

  • /nitro/v1/config/systemfile?args=filename:my-file-name,filelocation=%2Fmy%2Ffile%2Fpath

Potential Terraform Configuration

data "citrixadc_nitro_info" "myfile" {
  workflow = {
    lifecycle = "object-by-name" # or "binding-list"??
    endpoint  = "systemfile"
    args = {
      filename     = "my-file-name"
      filelocation = "%2Fmy%2Ffile%2Fpath" # "/" must be url-encoded, done in provider or by caller as here?
    }
    bound_resource_missing_errorcode = 3441
  }
}

References

https://developer-docs.netscaler.com/en-us/adc-nitro-api/current-release/configuration/system/systemfile

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant