Skip to content

Add support to create and manage Event Streams #1314

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

Open
wants to merge 5 commits into
base: main
Choose a base branch
from

Conversation

duedares-rvj
Copy link
Member

@duedares-rvj duedares-rvj commented Jul 19, 2025

🔧 Changes

  1. resource/auth0_event_stream: Add support for creating and updating a event stream.
  2. data-source/auth0_event_stream: Add support for retrieving a event stream.
resource "auth0_event_stream" "my_event_stream_event_bridge" {
  name             = "my-eventbridge"
  destination_type = "eventbridge"
  subscriptions = [
    "user.created",
    "user.updated"
  ]

  eventbridge_configuration {
    aws_account_id = "248457305777"
    aws_region     = "us-east-1"
  }
}

data "auth0_event_stream" "test" {
  id = auth0_event_stream.my_event_stream_event_bridge.id
}

📚 References

🔬 Testing

Required tests have been added.
make test-acc FILTER=TestAccDataSourceEventStream
make test-acc FILTER=TestAccEventStream

📝 Checklist

  • All new/changed/fixed functionality is covered by tests (or N/A)
  • I have added documentation for all new/changed functionality (or N/A)

@duedares-rvj duedares-rvj requested a review from a team as a code owner July 19, 2025 12:40
@duedares-rvj duedares-rvj self-assigned this Jul 19, 2025
Copy link

@Copilot Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This PR adds comprehensive support for creating and managing Auth0 Event Streams in the Terraform provider. It introduces both a resource and data source for event streams, supporting two destination types: EventBridge and Webhook configurations.

Key changes include:

  • New auth0_event_stream resource for creating, updating, and managing event streams
  • New auth0_event_stream data source for retrieving existing event streams by ID
  • Support for both EventBridge and Webhook destination types with proper validation

Reviewed Changes

Copilot reviewed 14 out of 14 changed files in this pull request and generated 3 comments.

Show a summary per file
File Description
internal/provider/provider.go Registers the new event stream resource and data source
internal/auth0/eventstream/resource.go Core resource implementation with CRUD operations
internal/auth0/eventstream/expand.go Functions to convert Terraform data to API structures
internal/auth0/eventstream/flatten.go Functions to convert API responses to Terraform state
internal/auth0/eventstream/data_source.go Data source implementation for retrieving event streams
internal/auth0/eventstream/resource_test.go Comprehensive tests for resource functionality
internal/auth0/eventstream/data_source_test.go Tests for data source functionality
examples/resources/auth0_event_stream/resource.tf Example Terraform configurations
docs/resources/event_stream.md Documentation for the resource
docs/data-sources/event_stream.md Documentation for the data source

Copy link
Contributor

@kushalshit27 kushalshit27 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM!

I've just added a few minor suggestions for refactoring.

Copy link
Contributor

@kushalshit27 kushalshit27 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

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

Successfully merging this pull request may close these issues.

2 participants