RavinderReddyF5 / terraform-provider-bigip-version0.12

Terraform resources that can configure F5 BIGIP products
Mozilla Public License 2.0
0 stars 0 forks source link

[CLOSED] Bug on 'Read FastHTTP profile' #110

Open RavinderReddyF5 opened 4 years ago

RavinderReddyF5 commented 4 years ago

Issue by marianne-butaye Monday Apr 15, 2019 at 08:42 GMT Originally opened as https://github.com/terraform-providers/terraform-provider-bigip/issues/79


Whenever I create a resource bigip_ltm_profile_fasthttp, it is correctly created on the F5 device, but the values in terraform show are incorrect, thus the the command terraform plan also always tries to update the resource.

Here is my test configuration:

fasthttp_profile  = {
            name = "sjfasthttpprofile"
            defaults_from = "fasthttp"
            idle_timeout = 300
            connpoolidle_timeoutoverride    = 0
            connpool_maxreuse = 2
            connpool_maxsize  = 2048
            connpool_minsize = 0
            connpool_replenish = "enabled"
            connpool_step = 4
            forcehttp_10response = "disabled"
            maxheader_size = 32768
}

The creation goes smoothly and here is the result returned:

$ terraform apply -var-file=variables.tfvars
data.null_data_source.fasthttp_profiles: Refreshing state...

An execution plan has been generated and is shown below.
Resource actions are indicated with the following symbols:
  + create

Terraform will perform the following actions:

  + bigip_ltm_profile_fasthttp.fasthttp_profiles
      id:                           <computed>
      connpool_maxreuse:            "2"
      connpool_maxsize:             "2048"
      connpool_minsize:             "0"
      connpool_replenish:           "enabled"
      connpool_step:                "4"
      connpoolidle_timeoutoverride: "0"
      defaults_from:                "/Common/fasthttp"
      forcehttp_10response:         "disabled"
      idle_timeout:                 "300"
      maxheader_size:               "32768"
      name:                         "sjfasthttpprofile"

Plan: 1 to add, 0 to change, 0 to destroy.

Do you want to perform these actions?
  Terraform will perform the actions described above.
  Only 'yes' will be accepted to approve.

  Enter a value: yes

bigip_ltm_profile_fasthttp.fasthttp_profiles: Creating...
  connpool_maxreuse:            "" => "2"
  connpool_maxsize:             "" => "2048"
  connpool_minsize:             "" => "0"
  connpool_replenish:           "" => "enabled"
  connpool_step:                "" => "4"
  connpoolidle_timeoutoverride: "" => "0"
  defaults_from:                "" => "/Common/fasthttp"
  forcehttp_10response:         "" => "disabled"
  idle_timeout:                 "" => "300"
  maxheader_size:               "" => "32768"
  name:                         "" => "sjfasthttpprofile"
bigip_ltm_profile_fasthttp.fasthttp_profiles: Creation complete after 1s (ID: sjfasthttpprofile)

Apply complete! Resources: 1 added, 0 changed, 0 destroyed.

But, the command terraform show returns this:

bigip_ltm_profile_fasthttp.fasthttp_profiles:
id = sjfasthttpprofile
connpool_maxreuse = 0
connpool_maxsize = 0
connpool_minsize = 0
connpool_replenish = 
connpool_step = 0
connpoolidle_timeoutoverride = 0
defaults_from = 
forcehttp_10response = 
idle_timeout = 0
maxheader_size = 0
name = sjfasthttpprofile

The command terraform plan without changing any of the variables returns this:

$ terraform plan -var-file=variables.tfvars
Refreshing Terraform state in-memory prior to plan...
The refreshed state will be used to calculate this plan, but will not be
persisted to local or remote state storage.

data.null_data_source.fasthttp_profiles: Refreshing state...
bigip_ltm_profile_fasthttp.fasthttp_profiles: Refreshing state... (ID: sjfasthttpprofile)

------------------------------------------------------------------------

An execution plan has been generated and is shown below.
Resource actions are indicated with the following symbols:
  ~ update in-place

Terraform will perform the following actions:

  ~ bigip_ltm_profile_fasthttp.fasthttp_profiles
      connpool_maxreuse:    "0" => "2"
      connpool_maxsize:     "0" => "2048"
      connpool_replenish:   "" => "enabled"
      connpool_step:        "0" => "4"
      defaults_from:        "" => "/Common/fasthttp"
      forcehttp_10response: "" => "disabled"
      idle_timeout:         "0" => "300"
      maxheader_size:       "0" => "32768"

Plan: 0 to add, 1 to change, 0 to destroy.

------------------------------------------------------------------------

Note: You didn't specify an "-out" parameter to save this plan, so Terraform
can't guarantee that exactly these actions will be performed if
"terraform apply" is subsequently run.
RavinderReddyF5 commented 4 years ago

Comment by focrensh Thursday Jul 09, 2020 at 14:39 GMT


Closing with Merge above