Skip to content

[Bug]:Problem with the state file when using the citrixadc_sslcertkey resource #1237

Open
@Leospes

Description

@Leospes

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

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