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

resource "ibm_cis_ruleset_entrypoint_version" "config" shows in place update when doing a terraform plan after a terraform apply, although no change happens in state file after re-apply #5944

Open
Vipin654 opened this issue Jan 27, 2025 · 0 comments
Labels
service/Internet Services Issues related to Cloud Internet Service (CIS)

Comments

@Vipin654
Copy link

Community Note

  • Please vote on this issue by adding a 👍 reaction to the original issue to help the community and maintainers prioritize this request
  • Please do not leave "+1" or other comments that do not add relevant new information or questions, they generate extra noise for issue followers and do not help prioritize the request
  • If you are interested in working on this issue or have submitted a pull request, please leave a comment

Terraform CLI and Terraform IBM Provider Version

Terraform v1.10.3
IBM Provider : 1.70.0

Affected Resource(s)

ibm_cis_ruleset_entrypoint_version

Terraform Configuration Files

Please include all Terraform configurations required to reproduce the bug. Bug reports without a functional reproduction may be closed without investigation.

Below code is used to enable waf.. Resources are getting created but a terraform re-apply shows there will some in place update on the resource but there is no change in state file after reapply.

resource "ibm_cis_ruleset_entrypoint_version" "config" {
    cis_id    = var.cis_instance_id
    domain_id = var.domain_id
    phase = "http_request_firewall_managed"
    rulesets {
      description = "Entry Point ruleset"
      rules {
        action =  "execute"
        action_parameters  {
          id = "efb7b8c949ac4650a09736fc376e9aee"
          }
        enabled = true 
        expression = "true"
      }
      rules {
        action =  "execute"
        action_parameters  {
          id = "c2e184081120413c86c3ab7e14069605"
          }
        enabled = true 
        expression = "true"
      }
      rules {
        action =  "execute"
        action_parameters  {
          id = "4814384a9e5d4991b9815dcfc25d2f1f"
          }
        enabled = true 
        expression = "true"
      }
    }
  }

Below error is seen

 # module.cis_domain_settings.ibm_cis_ruleset_entrypoint_version.config will be updated in-place
  ~ resource "ibm_cis_ruleset_entrypoint_version" "config" {
        id        = "http_request_firewall_managed:1a71f682d7a84667575f48fabc07384b:crn:v1:bluemix:public:internet-svcs:global:a/abac0df06b644a9cabc6e44f55b3880e:5030125c-b120-4bcd-be64-09480a05dc10::"
        # (3 unchanged attributes hidden)

      - rulesets {
          - description  = "Entry Point ruleset" -> null
          - kind         = "zone" -> null
          - last_updated = "2025-01-27T08:35:19.069158Z" -> null
          - name         = "default" -> null
          - phase        = "http_request_firewall_managed" -> null
          - ruleset_id   = "9daa90836793408ca3aef71ecbb573f1" -> null
          - version      = "1" -> null

          - rules {
              - action          = "execute" -> null
              - categories      = [] -> null
              - enabled         = true -> null
              - expression      = "true" -> null
              - id              = "7756b73305a84ce99ea2da131250d725" -> null
              - last_updated_at = "2025-01-27T08:35:19.069158Z" -> null
              - logging         = {} -> null
              - ref             = "7756b73305a84ce99ea2da131250d725" -> null
              - version         = "1" -> null
                # (1 unchanged attribute hidden)

              - action_parameters {
                  - id       = "efb7b8c949ac4650a09736fc376e9aee" -> null
                  - rulesets = [] -> null
                  - version  = "latest" -> null
                    # (1 unchanged attribute hidden)
                }
            }
          - rules {
              - action          = "execute" -> null
              - categories      = [] -> null
              - enabled         = true -> null
              - expression      = "true" -> null
              - id              = "bdeb2245abb2447ead957bc3235bab0a" -> null
              - last_updated_at = "2025-01-27T08:35:19.069158Z" -> null
              - logging         = {} -> null
              - ref             = "bdeb2245abb2447ead957bc3235bab0a" -> null
              - version         = "1" -> null
                # (1 unchanged attribute hidden)

              - action_parameters {
                  - id       = "c2e184081120413c86c3ab7e14069605" -> null
                  - rulesets = [] -> null
                  - version  = "latest" -> null
                    # (1 unchanged attribute hidden)
                }
            }
          - rules {
              - action          = "execute" -> null
              - categories      = [] -> null
              - enabled         = true -> null
              - expression      = "true" -> null
              - id              = "ba652d987fa6441db6c6dc6c20ed4250" -> null
              - last_updated_at = "2025-01-27T08:35:19.069158Z" -> null
              - logging         = {} -> null
              - ref             = "ba652d987fa6441db6c6dc6c20ed4250" -> null
              - version         = "1" -> null
                # (1 unchanged attribute hidden)

              - action_parameters {
                  - id       = "4814384a9e5d4991b9815dcfc25d2f1f" -> null
                  - rulesets = [] -> null
                  - version  = "latest" -> null
                    # (1 unchanged attribute hidden)
                }
            }
        }
      + rulesets {
          + description  = "Entry Point ruleset"
            name         = null
            # (5 unchanged attributes hidden)

          + rules {
              + action          = "execute"
              + categories      = []
              + enabled         = true
              + expression      = "true"
                id              = null
                # (4 unchanged attributes hidden)

              + action_parameters {
                  + id       = "efb7b8c949ac4650a09736fc376e9aee"
                  + rulesets = []
                    # (2 unchanged attributes hidden)
                }
            }
          + rules {
              + action          = "execute"
              + categories      = []
              + enabled         = true
              + expression      = "true"
                id              = null
                # (4 unchanged attributes hidden)

              + action_parameters {
                  + id       = "c2e184081120413c86c3ab7e14069605"
                  + rulesets = []
                    # (2 unchanged attributes hidden)
                }
            }
          + rules {
              + action          = "execute"
              + categories      = []
              + enabled         = true
              + expression      = "true"
                id              = null
                # (4 unchanged attributes hidden)

              + action_parameters {
                  + id       = "4814384a9e5d4991b9815dcfc25d2f1f"
                  + rulesets = []
                    # (2 unchanged attributes hidden)
                }
            }
        }
}
# Copy-paste your Terraform configurations here - for large Terraform configs,
# please share a link to the ZIP file.

Debug Output

Panic Output

Expected Behavior

terraform plan after a terraform apply should show no changes.

Actual Behavior

Terraform plan is always showing some in place update to the entrypoint ruleset.

Steps to Reproduce

  1. terraform plan
  2. terraform apply
  3. terraform plan

Important Factoids

References

  • #0000
@github-actions github-actions bot added the service/Internet Services Issues related to Cloud Internet Service (CIS) label Jan 27, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
service/Internet Services Issues related to Cloud Internet Service (CIS)
Projects
None yet
Development

No branches or pull requests

1 participant