thousandeyes / terraform-provider-thousandeyes

ThousandEyes Terraform Provider
Apache License 2.0
21 stars 26 forks source link

[Bug]: disabled test inside test lable throwing 403 error #145

Open Sraza11 opened 9 months ago

Sraza11 commented 9 months ago

What versions are you using?

2.0.3

What did you expect to happen?

I excepted that I'll be able to add a test to a test lable

What actually happened?

When I run terraform apply, I am getting the following error message. after troubleshooting for hours found out the test id defined inside the test label is not valid or is disabled. The error is confusing. It should instead say the test id you have defined does not exist or the test is disable.

Error: Failed call API endpoint. HTTP response code: 403. Error: 403 Forbidden │ Please ensure you are using the correct authentication token, and you have the correct role. │ User is not authorized to perform this operation

Terraform code to reproduce the bug

Terraform used the selected providers to generate the following execution plan. Resource actions are indicated with the following symbols:
  ~ update in-place

Terraform will perform the following actions:

  # thousandeyes_label.AoD_lable will be updated in-place
  ~ resource "thousandeyes_label" "AoD_lable" {
        id       = "774496"
        name     = "Prod"
        # (3 unchanged attributes hidden)

      + tests {
          + test_id = 4284088
        }

        # (31 unchanged blocks hidden)
    }

Any additional comments or code?

No response

Steps to reproduce the bug

  1. Add a test to a test lable
  2. Disable the test and apply the changes
  3. Add a new test Id to same test lable, terraform apply and you will gett 403 forbidden error
joaomper-TE commented 8 months ago

When I run terraform apply, I am getting the following error message. after troubleshooting for hours found out the test id defined inside the test label is not valid or is disabled. The error is confusing. It should instead say the test id you have defined does not exist or the test is disable.

Thanks for debugging this. @Sraza11 would you agree that this is an improvement and not a bug?

Sraza11 commented 8 months ago

It's a bug. The error should be verbose

Sraza11 commented 7 months ago

When I run terraform apply, I am getting the following error message. after troubleshooting for hours found out the test id defined inside the test label is not valid or is disabled. The error is confusing. It should instead say the test id you have defined does not exist or the test is disable.

Thanks for debugging this. @Sraza11 would you agree that this is an improvement and not a bug?

any progress made on this? terraform plan should tell where the code is breaking so it can be fixed

joaomper-TE commented 7 months ago

Hey @Sraza11 and sorry for not yet solving this. We may have some room for solving a couple of these bugs in February, so I kindly ask you tell us which bugs that you created (and thanks for that!!) should be top priority for us. Is this one of those?