Skip to content

Conversation

@nelsonmaia
Copy link
Contributor

🔧 Changes

This PR adds support for configuring ephemeral session lifetime settings at the tenant level in the Auth0 Terraform Provider.

New fields supported in the auth0_tenant resource:

  • ephemeral_session_lifetime – Number of hours an ephemeral (non-persistent) session will stay valid.
  • idle_ephemeral_session_lifetime – Number of hours an ephemeral session can remain idle before requiring the user to log in again.

These fields map to the corresponding properties in the Auth0 Management API, allowing Terraform users to manage session lifecycle behavior in a more fine-grained way.

Changes include:

  • Extension of the Go SDK structs (previously added).
  • Schema additions in the Terraform provider.
  • Serialization logic updates in expand.go, flatten.go, and resource.go.
  • Updates to TestAccTenant_Main to test default values and configuration behavior for ephemeral sessions.
  • Unit test coverage in flatten_test.go.

📚 References

Internal request: Add support for ephemeral session lifetime configuration in Terraform, aligned with the go-auth0 SDK changes.

🔬 Testing

  • ✅ Manual testing completed with local Terraform provider override.
  • terraform apply verified changes were applied to the tenant.
  • terraform plan showed no diffs after re-apply.
  • TestAccTenant_Main extended to assert ephemeral_session_lifetime and idle_ephemeral_session_lifetime.
  • flatten_test.go unit tests added for new fields.
  • make testacc passed and recorded using real tenant credentials.

📝 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)

@nelsonmaia nelsonmaia requested a review from a team as a code owner November 11, 2025 13:29
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