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

Load Balancer Routing Policy Import Inaccuracies #125

Open
Anay-Pampatwar opened this issue Sep 18, 2024 · 3 comments
Open

Load Balancer Routing Policy Import Inaccuracies #125

Anay-Pampatwar opened this issue Sep 18, 2024 · 3 comments

Comments

@Anay-Pampatwar
Copy link

Hello,

I've encountered some issues with the CD3 export of load balancer routing policies from our OCI Tenancy. The imported Terraform configuration doesn't accurately reflect the actual infrastructure for certain aspects of the routing rules. Here are the main problems I've identified:

  1. Truncation of Complex Conditions:
    For rules with numerous path conditions, the CD3 import truncates the list. For example:

    Imported (truncated):

    condition = "any(http.request.url.path sw (i '/Path1'), http.request.url.path sw (i '/Path2'), http.request.url.path sw (i '/Path3'),"

    Actual (full condition):

    condition = "any(http.request.url.path sw (i '/Path1'), http.request.url.path sw (i '/Path2'), http.request.url.path sw (i '/Path3'), http.request.url.path sw (i '/Path4'), http.request.url.path sw (i '/Path5'), ...)"
  2. Missing backend_set_names:
    Some rules have their backend_set_names incorrectly omitted in the CD3 import. For instance:

    Imported:

    {
      condition = "any(http.request.url.path sw (i '/SomePath'))"
      name = "route_example"
      backend_set_name = ""
    }

    Actual:

    {
      condition = "any(http.request.url.path sw (i '/SomePath'))"
      name = "route_example"
      backend_set_name = "ExampleBackendSet"
    }
  3. Incomplete Conditions:
    In some cases, only the beginning of a condition is captured. For example:

    Imported:

    condition = "any("

    Actual:

    condition = "any(http.request.url.path sw (i '/Path1'), http.request.url.path sw (i '/Path2'), ...)"

These inaccuracies require manual intervention to correct the Terraform configuration after using CD3 for export.

Environment details:

  • OCI provider version: 6.3.0
  • Terraform version: v1.7.1

Steps to reproduce:

  1. Use CD3 to export resources from OCI Tenancy
  2. Check the exported Terraform configuration for load balancer routing policies
  3. Compare with the actual infrastructure using terraform plan

Expected behavior:
CD3 should accurately capture all aspects of the load balancer routing policies, including full conditions and correct backend_set_names.

Actual behavior:
The exported configuration has truncated conditions, missing backend_set_names, and in some cases, incomplete conditions.

@xs2suruchi
Copy link
Member

Will look into this and revert asap.

@xs2suruchi
Copy link
Member

Is it possible to share the Excel file may be just the 'LB-RoutingPolicy' to see how the exported data looks like?
@Anay-Pampatwar

@Anay-Pampatwar
Copy link
Author

@xs2suruchi Thanks for your response. I have sent the Excel file containing the 'LB-RoutingPolicy' sheet to you via a direct Slack message.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants