I am trying to create Log Stream for Auth0 to push logs to azure. There is a resource for it -
But when I try to specify the resource as
resource "auth0_log_stream" "example" {
name = "Azure logs"
type = "eventbridge"
status = "active"
sink {
azure_region = "westeurope"
azure_resource_group = "my_resource_group"
azure_subscription_id = "my-subscription-id"
}
}
It plans successfully with
+ resource "auth0_log_stream" "example" {
+ id = (known after apply)
+ is_priority = false
+ name = "Azure logs"
+ status = "active"
+ type = "eventbridge"
+ sink {
+ aws_partner_event_source = (known after apply)
+ azure_partner_topic = (known after apply)
+ azure_region = "westeurope"
+ azure_resource_group = "my_resource_group"
+ azure_subscription_id = "my-subscription-id"
+ http_content_format = (known after apply)
}
}
And then fails with
400 Bad Request: Payload validation error: 'Data does not match any schemas from 'oneOf''.
How to properly use it for azure only?
I am trying to create Log Stream for Auth0 to push logs to azure. There is a resource for it - https://registry.terraform.io/providers/auth0/auth0/latest/docs/resources/log_stream
But when I try to specify the resource as
resource "auth0_log_stream" "example" {
name = "Azure logs"
type = "eventbridge"
status = "active"
sink {
azure_region = "westeurope"
azure_resource_group = "my_resource_group"
azure_subscription_id = "my-subscription-id"
}
}
It plans successfully with
+ resource "auth0_log_stream" "example" {
+ id = (known after apply)
+ is_priority = false
+ name = "Azure logs"
+ status = "active"
+ type = "eventbridge"
+ sink {
+ aws_partner_event_source = (known after apply)
+ azure_partner_topic = (known after apply)
+ azure_region = "westeurope"
+ azure_resource_group = "my_resource_group"
+ azure_subscription_id = "my-subscription-id"
+ http_content_format = (known after apply)
}
}
And then fails with
400 Bad Request: Payload validation error: 'Data does not match any schemas from 'oneOf''.
How to properly use it for azure only?
Share Improve this question asked Mar 3 at 11:38 JoeBloggsJoeBloggs 1752 silver badges11 bronze badges 3- For Azure Event Grid type need to be specified is "eventgrid" not "eventbridge" the one youre tried is AWS-specific. @JoeBloggs – Vinay B Commented Mar 7 at 4:15
- Refer: registry.terraform.io/providers/auth0/auth0/latest/docs/… – Vinay B Commented Mar 7 at 6:11
- @VinayB, ah, thanks! have not noticed initially and only copied the example from above... – JoeBloggs Commented Mar 7 at 8:59
1 Answer
Reset to default 1Create Auth0 Log Stream for azure with terraform
As per the error description, the type mentioned in the `resource "auth0_log_stream"` is referring to "eventbridge" which in general refer AWS specific value.
When you are trying to create Log Stream for Auth0 to push logs to azure then we need to select the Azure specific value i.e., "eventgrid".
As per the documentation to push the logs we need to specify the type as per the cloud environment.
Demo configuration:
resource "auth0_log_stream" "example_azure" {
name = "Azure Event Grid Log Stream"
type = "eventgrid"
status = "active"
sink {
azure_region = "your_azure_region"
azure_resource_group = "your_resource_group_name"
azure_subscription_id = "your_subscription_id"
}
}
Refer:
https://github/auth0/terraform-provider-auth0/issues/886
发布者:admin,转转请注明出处:http://www.yc00.com/questions/1745096348a4611000.html
评论列表(0条)