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

Log Profile - Arguments report infrastructure doesn't match the terraform configuration #950

Open
scu-cmoore1 opened this issue Mar 24, 2024 · 2 comments
Labels

Comments

@scu-cmoore1
Copy link

scu-cmoore1 commented Mar 24, 2024

Environment

  • TMOS/Bigip Version: 16.1.4.1
  • Terraform Version: v1.7.5
  • Terraform bigip provider Version: v1.21.0

Summary

When setting the arguments requestlog_template and responselog_template on bigip_ltm_request_log_profile reports every time with a terraform plan or apply that the real F5 infrastructure is different to the currently stored F5 terraform state.

Steps To Reproduce

  1. Set a bigip_ltm_request_log_profile with a requestlog_template and a responselog_template.
  2. It will then be set by terraform apply on the F5 but then report on the next terraform apply that the real infrastructure is different from the terraform state and wants to push a change.

Example config

resource "bigip_ltm_request_log_profile" "production-log-profile" {
  name                       = "/Common/production-request-log-profile"
  defaults_from              = "/Common/request-log"

  request_logging            = "enabled"
  requestlog_template        = "test1"
  requestlog_pool            = bigip_ltm_pool.production-syslog-pool.name

  response_logging           = "enabled"
  responselog_template       = "test2"
  responselog_error_template = "test3"
  responselog_pool            = bigip_ltm_pool.production-syslog-pool.name


  depends_on = [ bigip_ltm_pool.production-syslog-pool ]
}

Initial update

# module.production.bigip_ltm_request_log_profile.production-log-profile will be updated in-place
  ~ resource "bigip_ltm_request_log_profile" "production-log-profile" {
        id                         = "/Common/production-request-log-profile"
        name                       = "/Common/production-request-log-profile"
      ~ requestlog_template        = "test" -> "test1"
      ~ responselog_error_template = "test" -> "test3"
      ~ responselog_template       = "test" -> "test2"
        # (5 unchanged attributes hidden)
    }
    Plan: 0 to add, 1 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
    
    module.production.bigip_ltm_request_log_profile.production-log-profile: Modifying... [id=/Common/production-request-log-profile]
    module.production.bigip_ltm_request_log_profile.production-log-profile: Modifications complete after 0s [id=/Common/production-request-log-profile]

Running terraform apply immediately after

# module.production.bigip_ltm_request_log_profile.production-log-profile will be updated in-place
  ~ resource "bigip_ltm_request_log_profile" "production-log-profile" {
        id                         = "/Common/production-request-log-profile"
        name                       = "/Common/production-request-log-profile"
      ~ responselog_error_template = "test1" -> "test3"
      ~ responselog_template       = "test1" -> "test2"
        # (6 unchanged attributes hidden)
    }

Expected Behavior

  1. Set the requestlog_template and responselog_template argument
  2. Arguments are set and report that the real infrastructure matches the terraform state.

Actual Behavior

  1. Set the requestlog_template and responselog_template variables
  2. Arguments are set on the F5 and report a change with the original value being the requestlog_template arguments value even though F5 has the correct values.
@pgouband
Copy link
Collaborator

Hi @scu-cmoore1,

Have you signed the CLA?

F5 Networks Contributor License Agreement
Terraform F5 Contributor License Agreement.pdf

Before you start contributing to any project sponsored by F5 Networks, Inc. (F5) on GitHub, you will need to sign a Contributor License Agreement (CLA).

If you are signing as an individual, we recommend that you talk to your employer (if applicable) before signing the CLA since some employment agreements may have restrictions on your contributions to other projects. Otherwise by submitting a CLA you represent that you are legally entitled to grant the licenses recited therein.

If your employer has rights to intellectual property that you create, such as your contributions, you represent that you have received permission to make contributions on behalf of that employer, that your employer has waived such rights for your contributions, or that your employer has executed a separate CLA with F5.

If you are signing on behalf of a company, you represent that you are legally entitled to grant the license recited therein. You represent further that each employee of the entity that submits contributions is authorized to submit such contributions on behalf of the entity pursuant to the CLA.

@scu-cmoore1
Copy link
Author

scu-cmoore1 commented Mar 28, 2024

No, but I'm happy for someone else to contribute the fix...

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

2 participants