F5Networks / terraform-provider-bigip

Terraform resources that can configure F5 BIG-IP products
https://registry.terraform.io/providers/F5Networks/bigip/latest/docs
Mozilla Public License 2.0
102 stars 117 forks source link

AS3 deployment with v1.22 always detects changes #972

Closed skenderidis closed 1 month ago

skenderidis commented 1 month ago

Environment

Summary

When I deploy an AS3 declaration with v1.22 and I re-apply without any changes terraform re-applies the configuration and I get the following "change" information.

Terraform will perform the following actions:

  # bigip_as3.as3-example1 will be updated in-place
  ~ resource "bigip_as3" "as3-example1" {
        id               = "Sample_01"
      - tenant_name      = "Sample_01" -> null
        # (6 unchanged attributes hidden)
    }

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

The same configuration works fine with 1.21. When I add the tenant_name as a terraform argument (which should not be needed) then everything works fine.

Steps To Reproduce

Steps to reproduce the behavior:

  1. Provide terraform resource config which you are facing trouble along with the output of it.

    terraform { required_providers { bigip = { source = "F5Networks/bigip" version = "1.22.0" } } }

    provider "bigip" { address = "10.1.10.215" username = "admin" password = "xxxx" }

    resource "bigip_as3" "as3-example1" { as3_json = file("as3.json") tenant_name = "Sample_01" }

as3.json

  {
    "class": "AS3",
    "action": "deploy",
    "persist": true,
    "declaration": {
        "class": "ADC",
        "schemaVersion": "3.0.0",
        "id": "example-declaration-01",
        "label": "Sample 1",
        "remark": "Simple HTTP application with round robin pool",
        "Sample_01": {
            "class": "Tenant",
            "defaultRouteDomain": 0,
            "Application1": {
              "class": "Application",
              "service": {
                  "class": "Service_HTTP",
                  "virtualAddresses": [
                      "192.0.22.1"
                  ],
                  "pool": "pool"
              },
              "pool": {
                  "class": "Pool",
                  "members": [
                      {
                          "servicePort": 80,
                          "serverAddresses": [
                              "192.0.22.10",
                              "192.0.22.20"
                          ]
                      }
                  ]
              }
          }
        }
    }
  }