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

[TGW] Wrong update in place for ibm_tg_connection_prefix_filter #5885

Open
Ak-sky opened this issue Dec 18, 2024 · 0 comments
Open

[TGW] Wrong update in place for ibm_tg_connection_prefix_filter #5885

Ak-sky opened this issue Dec 18, 2024 · 0 comments
Labels
service/Transit Gateway Issues related to Transit Gateway

Comments

@Ak-sky
Copy link

Ak-sky commented Dec 18, 2024

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 Version v1.9.2
Terraform IBM Provider Version v1.72.2

Affected Resource(s)

  • ibm_tg_connection_prefix_filter

Terraform Configuration Files

There is a TF update in place on a subsequent TF plan/apply for this example,

Terraform will perform the following actions:

  # module.tg_gateway_connection.ibm_tg_connection_prefix_filter.add_prefix_filter[1] will be updated in-place
  ~ resource "ibm_tg_connection_prefix_filter" "add_prefix_filter" {
      - before        = "c88803e8-0d94-40dd-8154-39f8c74141ce" -> null
        id            = "c38857de-78f9-4eaf-bf5f-6ee8c35a305a/bec98499-f3aa-4a47-b6c3-e9c00bf41872/d5d7fbd7-32a2-4d5c-89ad-77b9eddd4cff"
        # (9 unchanged attributes hidden)
    }

But there is no before value, so why update in place?

filter_ids = [
  {
    "action" = "permit"
    "before" = tostring(null)
    "connection_id" = "bec98499-f3aa-4a47-b6c3-e9c00bf41872"
    "created_at" = "2024-12-18T14:48:55.047Z"
    "filter_id" = "c88803e8-0d94-40dd-8154-39f8c74141ce"
    "gateway" = "c38857de-78f9-4eaf-bf5f-6ee8c35a305a"
    "ge" = 24
    "id" = "c38857de-78f9-4eaf-bf5f-6ee8c35a305a/bec98499-f3aa-4a47-b6c3-e9c00bf41872/c88803e8-0d94-40dd-8154-39f8c74141ce"
    "le" = 24
    "prefix" = "10.10.10.0/24"
    "timeouts" = null /* object */
    "updated_at" = "2024-12-18T14:48:55.047Z"
  },
  {
    "action" = "deny"
    "before" = tostring(null)
    "connection_id" = "bec98499-f3aa-4a47-b6c3-e9c00bf41872"
    "created_at" = "2024-12-18T14:48:52.046Z"
    "filter_id" = "d5d7fbd7-32a2-4d5c-89ad-77b9eddd4cff"
    "gateway" = "c38857de-78f9-4eaf-bf5f-6ee8c35a305a"
    "ge" = 24
    "id" = "c38857de-78f9-4eaf-bf5f-6ee8c35a305a/bec98499-f3aa-4a47-b6c3-e9c00bf41872/d5d7fbd7-32a2-4d5c-89ad-77b9eddd4cff"
    "le" = 24
    "prefix" = "10.20.10.0/24"
    "timeouts" = null /* object */
    "updated_at" = "2024-12-18T14:48:52.046Z"
  },
  {
    "action" = "deny"
    "before" = tostring(null)
    "connection_id" = "0a37dc41-9041-4f9e-be84-cd3fd1561ee6"
    "created_at" = "2024-12-18T14:48:52.787Z"
    "filter_id" = "95404115-81c9-46cd-aa15-a0a171d53c29"
    "gateway" = "c38857de-78f9-4eaf-bf5f-6ee8c35a305a"
    "ge" = 24
    "id" = "c38857de-78f9-4eaf-bf5f-6ee8c35a305a/0a37dc41-9041-4f9e-be84-cd3fd1561ee6/95404115-81c9-46cd-aa15-a0a171d53c29"
    "le" = 24
    "prefix" = "10.20.10.0/24"
    "timeouts" = null /* object */
    "updated_at" = "2024-12-18T14:48:52.787Z"
  },
]

Debug Output

Panic Output

Expected Behavior

There should be no update in place, TF should matches the infra on subsequent TF plan/apply.

Actual Behavior

There is an update in place.

Steps to Reproduce

  • Do TF apply for this example
  • Run TF plan/apply.

Important Factoids

References

  • #0000
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
service/Transit Gateway Issues related to Transit Gateway
Projects
None yet
Development

No branches or pull requests

1 participant