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]: citrixadc_systemfile stores filelocaiton incorrectly when using partitions #1141

Open
nickattardgsys opened this issue Apr 16, 2024 · 0 comments
Labels

Comments

@nickattardgsys
Copy link

Terraform Core Version

1.4.6

citrixadc Provider Version

1.37.0

Operating system

macos

Affected Resource(s)

citrixadc_systemfile

Equivalent NetScaler CLI Command

i guess this would be handled via ftp

Expected Behavior

When creating the resource below, the expectation is that after the resource is created, the filelocation in the statefile would be '/var/partitions/cic/tmp'

resource "citrixadc_systemfile" "test00_crt" {
  filename     = "test00.crt"
  filelocation = "/var/partitions/cic/tmp"
  filecontent  = acme_certificate.certificate.certificate_pem
}

Actual Behavior

What is actually created in the terraform state is /var/tmp, which seems to assume that partitions are not being used. This results in a terraform plan showing that the file needs to be moved as the location changed, even though it's in the correct place. It's just stored incorrectly in the state by the provider.

resource "citrixadc_systemfile" "test00_crt" {
    filecontent  = <<-EOT
        -----BEGIN CERTIFICATE-----
redacted
        -----END CERTIFICATE-----
    EOT
    fileencoding = "BASE64"
    filelocation = "/var/tmp/"
    filename     = "test00.crt"
    id           = "/var/partitions/cic/tmp/test00.crt"
}

Relevant Error/Panic Output Snippet

No response

Terraform Configuration Files

resource "citrixadc_systemfile" "test00_crt" {
  filename     = "test00.crt"
  filelocation = "/var/partitions/cic/tmp"
  filecontent  = "could be anything"
}

Steps to Reproduce

  1. create a resource of type citrixadc_systemfile
  2. run terraform apply
  3. run terraform state show citrixadc_systemfile.test00_crt - this will show the incorrect filelocation
  4. run terraform plan to see that terraform will try change this resource

Debug Output

No response

Panic Output

No response

Important Factoids

No response

References

No response

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

No branches or pull requests

1 participant