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

Kong provider v5.0.0 unable to modify route #86

Open
rahmanyusmadi opened this issue Aug 25, 2019 · 3 comments
Open

Kong provider v5.0.0 unable to modify route #86

rahmanyusmadi opened this issue Aug 25, 2019 · 3 comments

Comments

@rahmanyusmadi
Copy link

rahmanyusmadi commented Aug 25, 2019

Hello. I'm facing this problem with 5.0.0 with Kong Enterprise 0.34

Terraform apply output:

Terraform will perform the following actions:

  # kong_route.route1 will be updated in-place
  ~ resource "kong_route" "route1" {
      ~ hosts          = [
          - "30.131.16.190",
          - "dev.public.com",
          + "30.131.19.228",
          + "test.secret.com",
        ]
        id             = "0131ffb4-0646-48a4-af88-5fc96b0cb305"
        methods        = []
        paths          = [
            "/secret-demo",
        ]
        preserve_host  = false
        protocols      = [
            "http",
            "https",
        ]
        regex_priority = 0
        service_id     = "621d9809-0898-46d3-b99a-94893320a465"
        strip_path     = true
    }

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

kong_route.route1: Modifying... [id=0131ffb4-0646-48a4-af88-5fc96b0cb305]

Error: error updating kong route: could not update route, error: {"fields":{"destinations":"unknown field","name":"unknown field","snis":"unknown field","sources":"unknown field"},"name":"schema violation","code":2,"message":"4 schema violations (destinations: unknown field; name: unknown field; snis: unknown field; sources: unknown field)"}


  on routes.tf line 1, in resource "kong_route" "route1":
   1: resource "kong_route" "route1" {

Terraform Version

$ terraform -v
Terraform v0.12.6
+ provider.kong v5.0.0

Affected Resource(s)

  • kong_route

Terraform Configuration Files

resource "kong_route" "route1" {
  hosts          = ["30.131.16.190", "dev.secret.com"]
  methods        = []
  paths          = ["/secret-demo"]
  preserve_host  = false
  protocols      = ["http", "https"]
  regex_priority = 0
  service_id     = "621d9809-0898-46d3-b99a-94893320a465"
  strip_path     = true
}

Debug Output

https://gist.github.com/yusmadi/5e5825eec3f07ea828826b7b4b882fa7

Panic Output

N/A

Expected Behavior

Route is modified

Actual Behavior

kong_route.route1: Modifying... [id=0131ffb4-0646-48a4-af88-5fc96b0cb305]

Error: error updating kong route: could not update route, error: {"fields":{"destinations":"unknown field","name":"unknown field","snis":"unknown field","sources":"unknown field"},"name":"schema violation","code":2,"message":"4 schema violations (destinations: unknown field; name: unknown field; snis: unknown field; sources: unknown field)"}


  on routes.tf line 1, in resource "kong_route" "route1":
   1: resource "kong_route" "route1" {

Steps to Reproduce

Please list the steps required to reproduce the issue, for example:

  1. terraform apply -target kong_route.route1

Important Factoids

Nothing special

References

Nope

@kevholditch
Copy link
Owner

hey @yusmadi sorry at the moment Kong Enterprise is not fully supported with the provider as I do not have a license for it so I have no way to test with it.

@rahmanyusmadi
Copy link
Author

@kevholditch if I have access to Kong Enterprise, how do I contribute

@kevholditch
Copy link
Owner

@yusmadi its not going to be easy to do as we really need a way we can do a test run against kong enterprise. You could try debugging against kong enterprise and see if you can work out the reason it is going wrong and see if you can fix it.

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