citrix / terraform-provider-citrixadc

Part of NetScaler Automation Toolkit | https://github.com/netscaler/automation-toolkit
https://registry.terraform.io/providers/citrix/citrixadc
Apache License 2.0
119 stars 59 forks source link

[BUG] changing sslprofiletype in citrixadc/sslprofile-resource #1081

Closed StizLor closed 1 year ago

StizLor commented 1 year ago

Bug Report

Describe the bug Changing the "sslprofiletype" of a "citrixadc/sslprofile"-resource will be be recognized by terraform as a change of the resource instead of a replacement.

To Reproduce

  1. create a minimalistic sslprofile-resource

    resource "citrixadc_sslprofile" "test_sslprofile" {
    name  = "test_sslprofile"
    sslprofiletype = "FrontEnd"
    }
  2. create resource terraform apply -auto-approve

  3. change sslprofiletype in resource

    resource "citrixadc_sslprofile" "test_sslprofile" {
    name  = "test_sslprofile"
    sslprofiletype = "BackEnd"
    }
  4. apply new resource config terraform apply before accepting change terraform shows changes Screenshot from 2023-08-24 07-14-01

  5. when changes are accepted an error is shown Screenshot from 2023-08-24 07-15-30

Expected behaviour

Changing the "sslprofiletype" within an "citrixadc_sslprofile"-resource should lead to a replacement (destroy current and create anew) of the resource.

Workaround: Run terraform apply with explicit replacement: terraform apply -replace="citrixadc_sslprofile.test_sslprofile"

Environment (please fill the following information):

ravager-dk commented 1 year ago

Suggestion would be to add ForceNew to true in the schema for sslprofiletype argument. I can create a PR for this later.

rohit-myali commented 1 year ago

Hey @ravager-dk thanks for the PR for this. Hello @StizLor, this issue is being handeled now. Please use the latest terraform-provider-citrixadc v1.37.0. Link to the documentation: citrixadc_sslprofile

Thanks Rohit