diff --git a/docs/resources/log_stream.md b/docs/resources/log_stream.md index d28dd210e..b13e2c41f 100644 --- a/docs/resources/log_stream.md +++ b/docs/resources/log_stream.md @@ -90,6 +90,10 @@ Optional: - `http_content_type` (String) The "Content-Type" header to send over HTTP. Common value is "application/json". - `http_custom_headers` (List of Map of String) Additional HTTP headers to be included as part of the HTTP request. - `http_endpoint` (String) The HTTP endpoint to send streaming logs. +- `mixpanel_project_id` (String) The Mixpanel project ID, found on the Project Settings page. +- `mixpanel_region` (String) The Mixpanel region. Options are ["us", "eu"]. EU is required for customers with EU data residency requirements. +- `mixpanel_service_account_password` (String, Sensitive) The Mixpanel Service Account password. +- `mixpanel_service_account_username` (String) The Mixpanel Service Account username. Services Accounts can be created in the Project Settings page. - `splunk_domain` (String) The Splunk domain name. - `splunk_port` (String) The Splunk port. - `splunk_secure` (Boolean) This toggle should be turned off when using self-signed certificates. diff --git a/internal/provider/resource_auth0_log_stream.go b/internal/provider/resource_auth0_log_stream.go index 38310e849..dc385479a 100644 --- a/internal/provider/resource_auth0_log_stream.go +++ b/internal/provider/resource_auth0_log_stream.go @@ -41,6 +41,7 @@ func newLogStream() *schema.Resource { "datadog", "splunk", "sumo", + "mixpanel", }, true), ForceNew: true, Description: "Type of the log stream, which indicates the sink provider.", @@ -218,6 +219,32 @@ func newLogStream() *schema.Resource { Description: "Generated URL for your defined HTTP source in " + "Sumo Logic for collecting streaming data from Auth0.", }, + "mixpanel_region": { + Type: schema.TypeString, + Optional: true, + RequiredWith: []string{"sink.0.mixpanel_service_account_password", "sink.0.mixpanel_project_id", "sink.0.mixpanel_service_account_username"}, + Description: "The Mixpanel region. Options are [\"us\", \"eu\"]. " + + "EU is required for customers with EU data residency requirements.", + }, + "mixpanel_project_id": { + Type: schema.TypeString, + Optional: true, + RequiredWith: []string{"sink.0.mixpanel_region", "sink.0.mixpanel_service_account_username", "sink.0.mixpanel_service_account_password"}, + Description: "The Mixpanel project ID, found on the Project Settings page.", + }, + "mixpanel_service_account_username": { + Type: schema.TypeString, + Optional: true, + RequiredWith: []string{"sink.0.mixpanel_region", "sink.0.mixpanel_project_id", "sink.0.mixpanel_service_account_password"}, + Description: "The Mixpanel Service Account username. Services Accounts can be created in the Project Settings page.", + }, + "mixpanel_service_account_password": { + Type: schema.TypeString, + Optional: true, + Sensitive: true, + RequiredWith: []string{"sink.0.mixpanel_region", "sink.0.mixpanel_project_id", "sink.0.mixpanel_service_account_username"}, + Description: "The Mixpanel Service Account password.", + }, }, }, }, @@ -265,7 +292,7 @@ func readLogStream(ctx context.Context, d *schema.ResourceData, m interface{}) d d.Set("status", logStream.GetStatus()), d.Set("type", logStream.GetType()), d.Set("filters", logStream.Filters), - d.Set("sink", flattenLogStreamSink(logStream.Sink)), + d.Set("sink", flattenLogStreamSink(d, logStream.Sink)), ) return diag.FromErr(result.ErrorOrNil()) @@ -296,7 +323,7 @@ func deleteLogStream(ctx context.Context, d *schema.ResourceData, m interface{}) return nil } -func flattenLogStreamSink(sink interface{}) []interface{} { +func flattenLogStreamSink(d *schema.ResourceData, sink interface{}) []interface{} { var m interface{} switch sinkType := sink.(type) { @@ -312,6 +339,8 @@ func flattenLogStreamSink(sink interface{}) []interface{} { m = flattenLogStreamSinkSplunk(sinkType) case *management.LogStreamSinkSumo: m = flattenLogStreamSinkSumo(sinkType) + case *management.LogStreamSinkMixpanel: + m = flattenLogStreamSinkMixpanel(d, sinkType) } return []interface{}{m} @@ -366,6 +395,15 @@ func flattenLogStreamSinkSumo(o *management.LogStreamSinkSumo) interface{} { } } +func flattenLogStreamSinkMixpanel(d *schema.ResourceData, o *management.LogStreamSinkMixpanel) interface{} { + return map[string]interface{}{ + "mixpanel_region": o.GetRegion(), + "mixpanel_project_id": o.GetProjectID(), + "mixpanel_service_account_username": o.GetServiceAccountUsername(), + "mixpanel_service_account_password": d.Get("sink.0.mixpanel_service_account_password").(string), // Value does not get read back. + } +} + func expandLogStream(d *schema.ResourceData) *management.LogStream { config := d.GetRawConfig() @@ -414,6 +452,8 @@ func expandLogStream(d *schema.ResourceData) *management.LogStream { logStream.Sink = expandLogStreamSinkSplunk(sink) case management.LogStreamTypeSumo: logStream.Sink = expandLogStreamSinkSumo(sink) + case management.LogStreamTypeMixpanel: + logStream.Sink = expandLogStreamSinkMixpanel(sink) default: log.Printf("[WARN]: Unsupported log stream sink %s", logStream.GetType()) log.Printf("[WARN]: Raise an issue with the auth0 provider in order to support it:") @@ -483,3 +523,11 @@ func expandLogStreamSinkSumo(config cty.Value) *management.LogStreamSinkSumo { SourceAddress: value.String(config.GetAttr("sumo_source_address")), } } +func expandLogStreamSinkMixpanel(config cty.Value) *management.LogStreamSinkMixpanel { + return &management.LogStreamSinkMixpanel{ + Region: value.String(config.GetAttr("mixpanel_region")), + ProjectID: value.String(config.GetAttr("mixpanel_project_id")), + ServiceAccountUsername: value.String(config.GetAttr("mixpanel_service_account_username")), + ServiceAccountPassword: value.String(config.GetAttr("mixpanel_service_account_password")), + } +} diff --git a/internal/provider/resource_auth0_log_stream_test.go b/internal/provider/resource_auth0_log_stream_test.go index a54a18285..f104a5b07 100644 --- a/internal/provider/resource_auth0_log_stream_test.go +++ b/internal/provider/resource_auth0_log_stream_test.go @@ -603,3 +603,130 @@ resource "auth0_log_stream" "my_log_stream" { } } ` + +func TestAccLogStreamMixpanel(t *testing.T) { + httpRecorder := recorder.New(t) + + resource.Test(t, resource.TestCase{ + ProviderFactories: testProviders(httpRecorder), + Steps: []resource.TestStep{ + { + Config: template.ParseTestName(logStreamMixpanelConfig, t.Name()), + Check: resource.ComposeTestCheckFunc( + resource.TestCheckResourceAttr("auth0_log_stream.my_log_stream", "name", fmt.Sprintf("Acceptance-Test-LogStream-mixpanel-%s", t.Name())), + resource.TestCheckResourceAttr("auth0_log_stream.my_log_stream", "type", "mixpanel"), + resource.TestCheckResourceAttr("auth0_log_stream.my_log_stream", "sink.0.mixpanel_region", "us"), + resource.TestCheckResourceAttr("auth0_log_stream.my_log_stream", "sink.0.mixpanel_project_id", "123456789"), + resource.TestCheckResourceAttr("auth0_log_stream.my_log_stream", "sink.0.mixpanel_service_account_username", "fake-account.123abc.mp-service-account"), + resource.TestCheckResourceAttr("auth0_log_stream.my_log_stream", "sink.0.mixpanel_service_account_password", "8iwyKSzwV2brfakepassGGKhsZ3INozo"), + ), + }, + { + Config: template.ParseTestName(logStreamMixpanelConfigUpdate, t.Name()), + Check: resource.ComposeTestCheckFunc( + resource.TestCheckResourceAttr("auth0_log_stream.my_log_stream", "name", fmt.Sprintf("Acceptance-Test-LogStream-mixpanel-%s", t.Name())), + resource.TestCheckResourceAttr("auth0_log_stream.my_log_stream", "type", "mixpanel"), + resource.TestCheckResourceAttr("auth0_log_stream.my_log_stream", "filters.#", "0"), + resource.TestCheckResourceAttr("auth0_log_stream.my_log_stream", "sink.0.mixpanel_region", "us"), + resource.TestCheckResourceAttr("auth0_log_stream.my_log_stream", "sink.0.mixpanel_project_id", "987654321"), + resource.TestCheckResourceAttr("auth0_log_stream.my_log_stream", "sink.0.mixpanel_service_account_username", "fake-account.123abc.mp-service-account"), + resource.TestCheckResourceAttr("auth0_log_stream.my_log_stream", "sink.0.mixpanel_service_account_password", "8iwyKSzwV2brfakepassGGKhsZ3INozo"), + ), + }, + { + Config: template.ParseTestName(logStreamMixpanelConfigUpdateWithFilters, t.Name()), + Check: resource.ComposeTestCheckFunc( + resource.TestCheckResourceAttr("auth0_log_stream.my_log_stream", "name", fmt.Sprintf("Acceptance-Test-LogStream-mixpanel-%s", t.Name())), + resource.TestCheckResourceAttr("auth0_log_stream.my_log_stream", "type", "mixpanel"), + resource.TestCheckResourceAttr("auth0_log_stream.my_log_stream", "filters.#", "2"), + resource.TestCheckResourceAttr("auth0_log_stream.my_log_stream", "filters.0.type", "category"), + resource.TestCheckResourceAttr("auth0_log_stream.my_log_stream", "filters.0.name", "auth.login.fail"), + resource.TestCheckResourceAttr("auth0_log_stream.my_log_stream", "filters.1.type", "category"), + resource.TestCheckResourceAttr("auth0_log_stream.my_log_stream", "filters.1.name", "auth.signup.fail"), + resource.TestCheckResourceAttr("auth0_log_stream.my_log_stream", "sink.0.mixpanel_region", "us"), + resource.TestCheckResourceAttr("auth0_log_stream.my_log_stream", "sink.0.mixpanel_project_id", "987654321"), + resource.TestCheckResourceAttr("auth0_log_stream.my_log_stream", "sink.0.mixpanel_service_account_username", "fake-account.123abc.mp-service-account"), + resource.TestCheckResourceAttr("auth0_log_stream.my_log_stream", "sink.0.mixpanel_service_account_password", "8iwyKSzwV2brfakepassGGKhsZ3INozo"), + ), + }, + { + Config: template.ParseTestName(logStreamMixpanelConfigUpdateWithEmptyFilters, t.Name()), + Check: resource.ComposeTestCheckFunc( + resource.TestCheckResourceAttr("auth0_log_stream.my_log_stream", "name", fmt.Sprintf("Acceptance-Test-LogStream-mixpanel-%s", t.Name())), + resource.TestCheckResourceAttr("auth0_log_stream.my_log_stream", "type", "mixpanel"), + resource.TestCheckResourceAttr("auth0_log_stream.my_log_stream", "filters.#", "0"), + resource.TestCheckResourceAttr("auth0_log_stream.my_log_stream", "sink.0.mixpanel_region", "us"), + resource.TestCheckResourceAttr("auth0_log_stream.my_log_stream", "sink.0.mixpanel_project_id", "987654321"), + resource.TestCheckResourceAttr("auth0_log_stream.my_log_stream", "sink.0.mixpanel_service_account_username", "fake-account.123abc.mp-service-account"), + resource.TestCheckResourceAttr("auth0_log_stream.my_log_stream", "sink.0.mixpanel_service_account_password", "8iwyKSzwV2brfakepassGGKhsZ3INozo"), + ), + }, + }, + }) +} + +const logStreamMixpanelConfig = ` +resource "auth0_log_stream" "my_log_stream" { + name = "Acceptance-Test-LogStream-mixpanel-{{.testName}}" + type = "mixpanel" + sink { + mixpanel_region = "us" + mixpanel_project_id = "123456789" + mixpanel_service_account_username = "fake-account.123abc.mp-service-account" + mixpanel_service_account_password = "8iwyKSzwV2brfakepassGGKhsZ3INozo" + } +} +` +const logStreamMixpanelConfigUpdate = ` +resource "auth0_log_stream" "my_log_stream" { + name = "Acceptance-Test-LogStream-mixpanel-{{.testName}}" + type = "mixpanel" + sink { + mixpanel_region = "us" + mixpanel_project_id = "987654321" + mixpanel_service_account_username = "fake-account.123abc.mp-service-account" + mixpanel_service_account_password = "8iwyKSzwV2brfakepassGGKhsZ3INozo" + } +} +` + +const logStreamMixpanelConfigUpdateWithFilters = ` +resource "auth0_log_stream" "my_log_stream" { + name = "Acceptance-Test-LogStream-mixpanel-{{.testName}}" + type = "mixpanel" + + filters = [ + { + type = "category" + name = "auth.login.fail" + }, + { + type = "category" + name = "auth.signup.fail" + } + ] + + sink { + mixpanel_region = "us" + mixpanel_project_id = "987654321" + mixpanel_service_account_username = "fake-account.123abc.mp-service-account" + mixpanel_service_account_password = "8iwyKSzwV2brfakepassGGKhsZ3INozo" + } +} +` + +const logStreamMixpanelConfigUpdateWithEmptyFilters = ` +resource "auth0_log_stream" "my_log_stream" { + name = "Acceptance-Test-LogStream-mixpanel-{{.testName}}" + type = "mixpanel" + + filters = [ ] + + sink { + mixpanel_region = "us" + mixpanel_project_id = "987654321" + mixpanel_service_account_username = "fake-account.123abc.mp-service-account" + mixpanel_service_account_password = "8iwyKSzwV2brfakepassGGKhsZ3INozo" + } +} +` diff --git a/test/data/recordings/TestAccLogStreamMixpanel.yaml b/test/data/recordings/TestAccLogStreamMixpanel.yaml new file mode 100644 index 000000000..bf33a7c24 --- /dev/null +++ b/test/data/recordings/TestAccLogStreamMixpanel.yaml @@ -0,0 +1,578 @@ +--- +version: 2 +interactions: + - id: 0 + request: + proto: HTTP/1.1 + proto_major: 1 + proto_minor: 1 + content_length: 294 + transfer_encoding: [ ] + trailer: { } + host: terraform-provider-auth0-dev.eu.auth0.com + remote_addr: "" + request_uri: "" + body: | + {"name":"Acceptance-Test-LogStream-mixpanel-TestAccLogStreamMixpanel","type":"mixpanel","sink":{"mixpanelRegion":"us","mixpanelProjectId":"123456789","mixpanelServiceAccountUsername":"fake-account.123abc.mp-service-account","mixpanelServiceAccountPassword":"8iwyKSzwV2brfakepassGGKhsZ3INozo"}} + form: { } + headers: + Content-Type: + - application/json + User-Agent: + - Go-Auth0-SDK/0.13.1 + url: https://terraform-provider-auth0-dev.eu.auth0.com/api/v2/log-streams + method: POST + response: + proto: HTTP/2.0 + proto_major: 2 + proto_minor: 0 + transfer_encoding: [ ] + trailer: { } + content_length: -1 + uncompressed: true + body: '{"id":"lst_0000000000011205","name":"Acceptance-Test-LogStream-mixpanel-TestAccLogStreamMixpanel","type":"mixpanel","status":"active","sink":{"mixpanelRegion":"us","mixpanelProjectId":"123456789","mixpanelServiceAccountUsername":"fake-account.123abc.mp-service-account","mixpanelServiceAccountPassword":"********"}}' + headers: + Content-Type: + - application/json; charset=utf-8 + status: 200 OK + code: 200 + duration: 277.859191ms + - id: 1 + request: + proto: HTTP/1.1 + proto_major: 1 + proto_minor: 1 + content_length: 5 + transfer_encoding: [ ] + trailer: { } + host: terraform-provider-auth0-dev.eu.auth0.com + remote_addr: "" + request_uri: "" + body: | + null + form: { } + headers: + Content-Type: + - application/json + User-Agent: + - Go-Auth0-SDK/0.13.1 + url: https://terraform-provider-auth0-dev.eu.auth0.com/api/v2/log-streams/lst_0000000000011205 + method: GET + response: + proto: HTTP/2.0 + proto_major: 2 + proto_minor: 0 + transfer_encoding: [ ] + trailer: { } + content_length: -1 + uncompressed: true + body: '{"id":"lst_0000000000011205","name":"Acceptance-Test-LogStream-mixpanel-TestAccLogStreamMixpanel","type":"mixpanel","status":"active","sink":{"mixpanelRegion":"us","mixpanelProjectId":"123456789","mixpanelServiceAccountUsername":"fake-account.123abc.mp-service-account","mixpanelServiceAccountPassword":"********"}}' + headers: + Content-Type: + - application/json; charset=utf-8 + status: 200 OK + code: 200 + duration: 221.400575ms + - id: 2 + request: + proto: HTTP/1.1 + proto_major: 1 + proto_minor: 1 + content_length: 5 + transfer_encoding: [ ] + trailer: { } + host: terraform-provider-auth0-dev.eu.auth0.com + remote_addr: "" + request_uri: "" + body: | + null + form: { } + headers: + Content-Type: + - application/json + User-Agent: + - Go-Auth0-SDK/0.13.1 + url: https://terraform-provider-auth0-dev.eu.auth0.com/api/v2/log-streams/lst_0000000000011205 + method: GET + response: + proto: HTTP/2.0 + proto_major: 2 + proto_minor: 0 + transfer_encoding: [ ] + trailer: { } + content_length: -1 + uncompressed: true + body: '{"id":"lst_0000000000011205","name":"Acceptance-Test-LogStream-mixpanel-TestAccLogStreamMixpanel","type":"mixpanel","status":"active","sink":{"mixpanelRegion":"us","mixpanelProjectId":"123456789","mixpanelServiceAccountUsername":"fake-account.123abc.mp-service-account","mixpanelServiceAccountPassword":"********"}}' + headers: + Content-Type: + - application/json; charset=utf-8 + status: 200 OK + code: 200 + duration: 207.97085ms + - id: 3 + request: + proto: HTTP/1.1 + proto_major: 1 + proto_minor: 1 + content_length: 5 + transfer_encoding: [ ] + trailer: { } + host: terraform-provider-auth0-dev.eu.auth0.com + remote_addr: "" + request_uri: "" + body: | + null + form: { } + headers: + Content-Type: + - application/json + User-Agent: + - Go-Auth0-SDK/0.13.1 + url: https://terraform-provider-auth0-dev.eu.auth0.com/api/v2/log-streams/lst_0000000000011205 + method: GET + response: + proto: HTTP/2.0 + proto_major: 2 + proto_minor: 0 + transfer_encoding: [ ] + trailer: { } + content_length: -1 + uncompressed: true + body: '{"id":"lst_0000000000011205","name":"Acceptance-Test-LogStream-mixpanel-TestAccLogStreamMixpanel","type":"mixpanel","status":"active","sink":{"mixpanelRegion":"us","mixpanelProjectId":"123456789","mixpanelServiceAccountUsername":"fake-account.123abc.mp-service-account","mixpanelServiceAccountPassword":"********"}}' + headers: + Content-Type: + - application/json; charset=utf-8 + status: 200 OK + code: 200 + duration: 184.447487ms + - id: 4 + request: + proto: HTTP/1.1 + proto_major: 1 + proto_minor: 1 + content_length: 276 + transfer_encoding: [ ] + trailer: { } + host: terraform-provider-auth0-dev.eu.auth0.com + remote_addr: "" + request_uri: "" + body: | + {"name":"Acceptance-Test-LogStream-mixpanel-TestAccLogStreamMixpanel","sink":{"mixpanelRegion":"us","mixpanelProjectId":"987654321","mixpanelServiceAccountUsername":"fake-account.123abc.mp-service-account","mixpanelServiceAccountPassword":"8iwyKSzwV2brfakepassGGKhsZ3INozo"}} + form: { } + headers: + Content-Type: + - application/json + User-Agent: + - Go-Auth0-SDK/0.13.1 + url: https://terraform-provider-auth0-dev.eu.auth0.com/api/v2/log-streams/lst_0000000000011205 + method: PATCH + response: + proto: HTTP/2.0 + proto_major: 2 + proto_minor: 0 + transfer_encoding: [ ] + trailer: { } + content_length: -1 + uncompressed: true + body: '{"id":"lst_0000000000011205","name":"Acceptance-Test-LogStream-mixpanel-TestAccLogStreamMixpanel","type":"mixpanel","status":"active","sink":{"mixpanelRegion":"us","mixpanelProjectId":"987654321","mixpanelServiceAccountUsername":"fake-account.123abc.mp-service-account","mixpanelServiceAccountPassword":"********"}}' + headers: + Content-Type: + - application/json; charset=utf-8 + status: 200 OK + code: 200 + duration: 194.417906ms + - id: 5 + request: + proto: HTTP/1.1 + proto_major: 1 + proto_minor: 1 + content_length: 5 + transfer_encoding: [ ] + trailer: { } + host: terraform-provider-auth0-dev.eu.auth0.com + remote_addr: "" + request_uri: "" + body: | + null + form: { } + headers: + Content-Type: + - application/json + User-Agent: + - Go-Auth0-SDK/0.13.1 + url: https://terraform-provider-auth0-dev.eu.auth0.com/api/v2/log-streams/lst_0000000000011205 + method: GET + response: + proto: HTTP/2.0 + proto_major: 2 + proto_minor: 0 + transfer_encoding: [ ] + trailer: { } + content_length: -1 + uncompressed: true + body: '{"id":"lst_0000000000011205","name":"Acceptance-Test-LogStream-mixpanel-TestAccLogStreamMixpanel","type":"mixpanel","status":"active","sink":{"mixpanelRegion":"us","mixpanelProjectId":"987654321","mixpanelServiceAccountUsername":"fake-account.123abc.mp-service-account","mixpanelServiceAccountPassword":"********"}}' + headers: + Content-Type: + - application/json; charset=utf-8 + status: 200 OK + code: 200 + duration: 99.717783ms + - id: 6 + request: + proto: HTTP/1.1 + proto_major: 1 + proto_minor: 1 + content_length: 5 + transfer_encoding: [ ] + trailer: { } + host: terraform-provider-auth0-dev.eu.auth0.com + remote_addr: "" + request_uri: "" + body: | + null + form: { } + headers: + Content-Type: + - application/json + User-Agent: + - Go-Auth0-SDK/0.13.1 + url: https://terraform-provider-auth0-dev.eu.auth0.com/api/v2/log-streams/lst_0000000000011205 + method: GET + response: + proto: HTTP/2.0 + proto_major: 2 + proto_minor: 0 + transfer_encoding: [ ] + trailer: { } + content_length: -1 + uncompressed: true + body: '{"id":"lst_0000000000011205","name":"Acceptance-Test-LogStream-mixpanel-TestAccLogStreamMixpanel","type":"mixpanel","status":"active","sink":{"mixpanelRegion":"us","mixpanelProjectId":"987654321","mixpanelServiceAccountUsername":"fake-account.123abc.mp-service-account","mixpanelServiceAccountPassword":"********"}}' + headers: + Content-Type: + - application/json; charset=utf-8 + status: 200 OK + code: 200 + duration: 146.562934ms + - id: 7 + request: + proto: HTTP/1.1 + proto_major: 1 + proto_minor: 1 + content_length: 5 + transfer_encoding: [ ] + trailer: { } + host: terraform-provider-auth0-dev.eu.auth0.com + remote_addr: "" + request_uri: "" + body: | + null + form: { } + headers: + Content-Type: + - application/json + User-Agent: + - Go-Auth0-SDK/0.13.1 + url: https://terraform-provider-auth0-dev.eu.auth0.com/api/v2/log-streams/lst_0000000000011205 + method: GET + response: + proto: HTTP/2.0 + proto_major: 2 + proto_minor: 0 + transfer_encoding: [ ] + trailer: { } + content_length: -1 + uncompressed: true + body: '{"id":"lst_0000000000011205","name":"Acceptance-Test-LogStream-mixpanel-TestAccLogStreamMixpanel","type":"mixpanel","status":"active","sink":{"mixpanelRegion":"us","mixpanelProjectId":"987654321","mixpanelServiceAccountUsername":"fake-account.123abc.mp-service-account","mixpanelServiceAccountPassword":"********"}}' + headers: + Content-Type: + - application/json; charset=utf-8 + status: 200 OK + code: 200 + duration: 101.532708ms + - id: 8 + request: + proto: HTTP/1.1 + proto_major: 1 + proto_minor: 1 + content_length: 379 + transfer_encoding: [ ] + trailer: { } + host: terraform-provider-auth0-dev.eu.auth0.com + remote_addr: "" + request_uri: "" + body: | + {"name":"Acceptance-Test-LogStream-mixpanel-TestAccLogStreamMixpanel","filters":[{"name":"auth.login.fail","type":"category"},{"name":"auth.signup.fail","type":"category"}],"sink":{"mixpanelRegion":"us","mixpanelProjectId":"987654321","mixpanelServiceAccountUsername":"fake-account.123abc.mp-service-account","mixpanelServiceAccountPassword":"8iwyKSzwV2brfakepassGGKhsZ3INozo"}} + form: { } + headers: + Content-Type: + - application/json + User-Agent: + - Go-Auth0-SDK/0.13.1 + url: https://terraform-provider-auth0-dev.eu.auth0.com/api/v2/log-streams/lst_0000000000011205 + method: PATCH + response: + proto: HTTP/2.0 + proto_major: 2 + proto_minor: 0 + transfer_encoding: [ ] + trailer: { } + content_length: -1 + uncompressed: true + body: '{"id":"lst_0000000000011205","name":"Acceptance-Test-LogStream-mixpanel-TestAccLogStreamMixpanel","type":"mixpanel","status":"active","sink":{"mixpanelRegion":"us","mixpanelProjectId":"987654321","mixpanelServiceAccountUsername":"fake-account.123abc.mp-service-account","mixpanelServiceAccountPassword":"********"},"filters":[{"name":"auth.login.fail","type":"category"},{"name":"auth.signup.fail","type":"category"}]}' + headers: + Content-Type: + - application/json; charset=utf-8 + status: 200 OK + code: 200 + duration: 114.17275ms + - id: 9 + request: + proto: HTTP/1.1 + proto_major: 1 + proto_minor: 1 + content_length: 5 + transfer_encoding: [ ] + trailer: { } + host: terraform-provider-auth0-dev.eu.auth0.com + remote_addr: "" + request_uri: "" + body: | + null + form: { } + headers: + Content-Type: + - application/json + User-Agent: + - Go-Auth0-SDK/0.13.1 + url: https://terraform-provider-auth0-dev.eu.auth0.com/api/v2/log-streams/lst_0000000000011205 + method: GET + response: + proto: HTTP/2.0 + proto_major: 2 + proto_minor: 0 + transfer_encoding: [ ] + trailer: { } + content_length: -1 + uncompressed: true + body: '{"id":"lst_0000000000011205","name":"Acceptance-Test-LogStream-mixpanel-TestAccLogStreamMixpanel","type":"mixpanel","status":"active","sink":{"mixpanelRegion":"us","mixpanelProjectId":"987654321","mixpanelServiceAccountUsername":"fake-account.123abc.mp-service-account","mixpanelServiceAccountPassword":"********"},"filters":[{"name":"auth.login.fail","type":"category"},{"name":"auth.signup.fail","type":"category"}]}' + headers: + Content-Type: + - application/json; charset=utf-8 + status: 200 OK + code: 200 + duration: 112.667094ms + - id: 10 + request: + proto: HTTP/1.1 + proto_major: 1 + proto_minor: 1 + content_length: 5 + transfer_encoding: [ ] + trailer: { } + host: terraform-provider-auth0-dev.eu.auth0.com + remote_addr: "" + request_uri: "" + body: | + null + form: { } + headers: + Content-Type: + - application/json + User-Agent: + - Go-Auth0-SDK/0.13.1 + url: https://terraform-provider-auth0-dev.eu.auth0.com/api/v2/log-streams/lst_0000000000011205 + method: GET + response: + proto: HTTP/2.0 + proto_major: 2 + proto_minor: 0 + transfer_encoding: [ ] + trailer: { } + content_length: -1 + uncompressed: true + body: '{"id":"lst_0000000000011205","name":"Acceptance-Test-LogStream-mixpanel-TestAccLogStreamMixpanel","type":"mixpanel","status":"active","sink":{"mixpanelRegion":"us","mixpanelProjectId":"987654321","mixpanelServiceAccountUsername":"fake-account.123abc.mp-service-account","mixpanelServiceAccountPassword":"********"},"filters":[{"name":"auth.login.fail","type":"category"},{"name":"auth.signup.fail","type":"category"}]}' + headers: + Content-Type: + - application/json; charset=utf-8 + status: 200 OK + code: 200 + duration: 165.747674ms + - id: 11 + request: + proto: HTTP/1.1 + proto_major: 1 + proto_minor: 1 + content_length: 5 + transfer_encoding: [ ] + trailer: { } + host: terraform-provider-auth0-dev.eu.auth0.com + remote_addr: "" + request_uri: "" + body: | + null + form: { } + headers: + Content-Type: + - application/json + User-Agent: + - Go-Auth0-SDK/0.13.1 + url: https://terraform-provider-auth0-dev.eu.auth0.com/api/v2/log-streams/lst_0000000000011205 + method: GET + response: + proto: HTTP/2.0 + proto_major: 2 + proto_minor: 0 + transfer_encoding: [ ] + trailer: { } + content_length: -1 + uncompressed: true + body: '{"id":"lst_0000000000011205","name":"Acceptance-Test-LogStream-mixpanel-TestAccLogStreamMixpanel","type":"mixpanel","status":"active","sink":{"mixpanelRegion":"us","mixpanelProjectId":"987654321","mixpanelServiceAccountUsername":"fake-account.123abc.mp-service-account","mixpanelServiceAccountPassword":"********"},"filters":[{"name":"auth.login.fail","type":"category"},{"name":"auth.signup.fail","type":"category"}]}' + headers: + Content-Type: + - application/json; charset=utf-8 + status: 200 OK + code: 200 + duration: 217.728719ms + - id: 12 + request: + proto: HTTP/1.1 + proto_major: 1 + proto_minor: 1 + content_length: 289 + transfer_encoding: [ ] + trailer: { } + host: terraform-provider-auth0-dev.eu.auth0.com + remote_addr: "" + request_uri: "" + body: | + {"name":"Acceptance-Test-LogStream-mixpanel-TestAccLogStreamMixpanel","filters":[],"sink":{"mixpanelRegion":"us","mixpanelProjectId":"987654321","mixpanelServiceAccountUsername":"fake-account.123abc.mp-service-account","mixpanelServiceAccountPassword":"8iwyKSzwV2brfakepassGGKhsZ3INozo"}} + form: { } + headers: + Content-Type: + - application/json + User-Agent: + - Go-Auth0-SDK/0.13.1 + url: https://terraform-provider-auth0-dev.eu.auth0.com/api/v2/log-streams/lst_0000000000011205 + method: PATCH + response: + proto: HTTP/2.0 + proto_major: 2 + proto_minor: 0 + transfer_encoding: [ ] + trailer: { } + content_length: -1 + uncompressed: true + body: '{"id":"lst_0000000000011205","name":"Acceptance-Test-LogStream-mixpanel-TestAccLogStreamMixpanel","type":"mixpanel","status":"active","sink":{"mixpanelRegion":"us","mixpanelProjectId":"987654321","mixpanelServiceAccountUsername":"fake-account.123abc.mp-service-account","mixpanelServiceAccountPassword":"********"}}' + headers: + Content-Type: + - application/json; charset=utf-8 + status: 200 OK + code: 200 + duration: 125.004354ms + - id: 13 + request: + proto: HTTP/1.1 + proto_major: 1 + proto_minor: 1 + content_length: 5 + transfer_encoding: [ ] + trailer: { } + host: terraform-provider-auth0-dev.eu.auth0.com + remote_addr: "" + request_uri: "" + body: | + null + form: { } + headers: + Content-Type: + - application/json + User-Agent: + - Go-Auth0-SDK/0.13.1 + url: https://terraform-provider-auth0-dev.eu.auth0.com/api/v2/log-streams/lst_0000000000011205 + method: GET + response: + proto: HTTP/2.0 + proto_major: 2 + proto_minor: 0 + transfer_encoding: [ ] + trailer: { } + content_length: -1 + uncompressed: true + body: '{"id":"lst_0000000000011205","name":"Acceptance-Test-LogStream-mixpanel-TestAccLogStreamMixpanel","type":"mixpanel","status":"active","sink":{"mixpanelRegion":"us","mixpanelProjectId":"987654321","mixpanelServiceAccountUsername":"fake-account.123abc.mp-service-account","mixpanelServiceAccountPassword":"********"}}' + headers: + Content-Type: + - application/json; charset=utf-8 + status: 200 OK + code: 200 + duration: 150.301705ms + - id: 14 + request: + proto: HTTP/1.1 + proto_major: 1 + proto_minor: 1 + content_length: 5 + transfer_encoding: [ ] + trailer: { } + host: terraform-provider-auth0-dev.eu.auth0.com + remote_addr: "" + request_uri: "" + body: | + null + form: { } + headers: + Content-Type: + - application/json + User-Agent: + - Go-Auth0-SDK/0.13.1 + url: https://terraform-provider-auth0-dev.eu.auth0.com/api/v2/log-streams/lst_0000000000011205 + method: GET + response: + proto: HTTP/2.0 + proto_major: 2 + proto_minor: 0 + transfer_encoding: [ ] + trailer: { } + content_length: -1 + uncompressed: true + body: '{"id":"lst_0000000000011205","name":"Acceptance-Test-LogStream-mixpanel-TestAccLogStreamMixpanel","type":"mixpanel","status":"active","sink":{"mixpanelRegion":"us","mixpanelProjectId":"987654321","mixpanelServiceAccountUsername":"fake-account.123abc.mp-service-account","mixpanelServiceAccountPassword":"********"}}' + headers: + Content-Type: + - application/json; charset=utf-8 + status: 200 OK + code: 200 + duration: 92.539653ms + - id: 15 + request: + proto: HTTP/1.1 + proto_major: 1 + proto_minor: 1 + content_length: 0 + transfer_encoding: [ ] + trailer: { } + host: terraform-provider-auth0-dev.eu.auth0.com + remote_addr: "" + request_uri: "" + body: "" + form: { } + headers: + Content-Type: + - application/json + User-Agent: + - Go-Auth0-SDK/0.13.1 + url: https://terraform-provider-auth0-dev.eu.auth0.com/api/v2/log-streams/lst_0000000000011205 + method: DELETE + response: + proto: HTTP/2.0 + proto_major: 2 + proto_minor: 0 + transfer_encoding: [ ] + trailer: { } + content_length: 0 + uncompressed: false + body: "" + headers: + Content-Type: + - application/json; charset=utf-8 + status: 204 No Content + code: 204 + duration: 182.645957ms