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]:Problem with the state file when using the citrixadc_sslcertkey resource #1237

Open
Leospes opened this issue Feb 24, 2025 · 0 comments
Labels

Comments

@Leospes
Copy link

Leospes commented Feb 24, 2025

Terraform Core Version

1.10.4

citrixadc Provider Version

1.42.0

Operating system

Linux

Affected Resource(s)

citrixadc_sslcertkey

Equivalent NetScaler CLI Command

{"sslcertkey":{
"certkey":<String_value>,
"cert":<String_value>,
"key":<String_value>,
"password":<Boolean_value>,
"fipskey":<String_value>,
"hsmkey":<String_value>,
"inform":<String_value>,
"passplain":<String_value>,
"expirymonitor":<String_value>,
"notificationperiod":<Double_value>,
"bundle":NO
}}

Expected Behavior

Setting the value of the bundle field to NO or YES. The value of the corresponding field in the state file takes the value NO or YES. In the absence of any changes, terraform does nothing.

Actual Behavior

Setting the value of the bundle field to NO or YES. However, the value of the corresponding field in the state file remains empty. This leads to the fact that, in the absence of any changes, terraform begins to undesirably recreate the resource.

Relevant Error/Panic Output Snippet

Terraform will perform the following actions:
  # module.ssl.citrixadc_sslcertkey.sslcertkeypair["name"] must be replaced
-/+ resource "citrixadc_sslcertkey" "sslcertkeypair" {
      + bundle             = "NO" # forces replacement

Terraform Configuration Files

resource "citrixadc_sslcertkey" "sslcertkeypair" {
for_each = toset(var.common_name)
certkey = "${each.key}_pair"
cert = "/nsconfig/ssl/${each.key}.crt"
key = "/nsconfig/ssl/${each.key}.key"
notificationperiod = 30
expirymonitor = "ENABLED"
bundle = "NO"
inform = "PEM"
depends_on = [ citrixadc_systemfile.crt_file ]
}

Steps to Reproduce

Add a certificate to Netscaler using the citrixadc_sslcertkey resource (specifying bundle NO or YES). Then re-apply terraform apply.

Debug Output

No response

Panic Output

No response

Important Factoids

No response

References

No response

@Leospes Leospes added the bug label Feb 24, 2025
@Leospes Leospes changed the title [Bug]: [Bug]:Problem with the state file when using the citrixadc_sslcertkey resource Feb 24, 2025
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