auth0 / terraform-provider-auth0

The Auth0 Terraform Provider is the official plugin for managing Auth0 tenant configuration through the Terraform tool.
https://registry.terraform.io/providers/auth0/auth0/latest/docs
Mozilla Public License 2.0
157 stars 73 forks source link

log_stream.splunk_port returning a number instead of a string #940

Closed bevel-zgates closed 1 month ago

bevel-zgates commented 3 months ago

Checklist

Description

We're currently using the auth0_log_stream resource as follows:

resource "auth0_log_stream" "splunk" {
  name = "myname"
  type = "splunk"
  status = "active"
  sink {
    splunk_domain = "my.name"
    splunk_port = "1234"
    splunk_token = "mytoken""
    splunk_secure = true
  ?
}

This had been working happily until just the other day when it looks like in the responses to queries to the auth0 api its returning a number in response to the splunk_port instead of the string its expecting.

Here's the error being returned:

image

Expectation

Expect unmarshelling the response to work with a string or update the documentation/implementation to use numbers if that's what a0 has pivoted to.

Reproduction

The above implementation should be enough to reproduce, though I'll test here if it works on newly created resources or just ones that had existing state.

Auth0 Terraform Provider version

1.2.0

Terraform version

1.6.5

bevel-zgates commented 3 months ago

Tried tainting/replace and still getting the same error here: image

bevel-zgates commented 3 months ago

I just finished a proof of concept, updating the resource definition and it seems to be working now after updating the expected type associated with the splunk port

  # module.auth0_tenant.auth0_log_stream.splunk is tainted, so must be replaced
-/+ resource "auth0_log_stream" "splunk" {
      - filters = [] -> null
      ~ id      = "<redacted>" -> (known after apply)
        name    = "<redacted>"
        # (2 unchanged attributes hidden)

      ~ sink {
          + aws_partner_event_source = (known after apply)
          + azure_partner_topic      = (known after apply)
          + http_content_format      = (known after apply)
          - http_custom_headers      = [] -> null
            # (4 unchanged attributes hidden)
        }
    }
I'll have an PR here shortly for this
bevel-zgates commented 3 months ago

MR with a fix here: #941

sergiught commented 2 months ago

Hey folks, apologies for the late reply. This issue was caused by a breaking change introduced on the API and thus not an issue originating from the Terraform Provider. The API change should have been reverted now and this issue resolved. Please let us know if that is not the case.

Appreciate everyones patience!

bevel-zgates commented 2 months ago

Hey @sergiught thanks for the response sir, is there a bug report we can reference here that I can pass along to my teams? So splunk_port should stay as a string?

developerkunal commented 1 month ago

Hi @bevel-zgates,

I hope you're having a great day!

Is this issue still persisting, or can we go ahead and close it?

Thank you.

bevel-zgates commented 1 month ago

Hi @developerkunal I think I'm just waiting on a response to:

Hey @sergiught thanks for the response sir, is there a bug report we can reference here that I can pass along to my teams? So splunk_port should stay as a string?

developerkunal commented 1 month ago

Hi @bevel-zgates,

I hope you're doing alright today!

I wanted to share some insight with you. Usually, when it comes to incidents, the Root Cause Analyses (RCAs) that get published externally are for situations marked as severity levels 1 and 2. So, if you're searching for a bug report on this matter, it might not be accessible publicly. But, hey, I'm here to help if you have any questions or need further clarification.

Thank you.

developerkunal commented 1 month ago

Hi @bevel-zgates,

I hope you're doing well today!

Can we close the issue now? If you have any other questions, feel free to open another issue or reopen this one again.

Thank you!